Multiqc: Cutadapt sample name parsing too simple. Option to use filename?

Created on 11 Apr 2019  路  5Comments  路  Source: ewels/MultiQC

Description of bug:
I'm running MultiQC in a folder containing many cutadapt log files. However, only one file is used (the last one), even if I specified one by one every files I want it to use.

MultiQC Error log:
There's not error log entry

File that triggers the error:
TE18-018_12S_cut_log.txt
TE18-019_12S_cut_log.txt

MultiQC run details:

  • Command used to run MultiQC: multiqc [list of files names] --module cutadapt -f
  • MultiQC Version: MultiQC v 1.7
  • Operating System: Ubuntu 18.04.2 LTS
  • Python Version: Python 2.7.15rc1
  • Method of MultiQC installation: pip
bug

Most helpful comment

For anyone else running across this, a temporary workaround is to ensure that the original cutadapt call ends with the input filename:

# wrong, sample will show up as "20"
cutadapt sample.fastq.gz -a AAAAA -q 20 

# correct, sample will show up as "sample.fastq.gz"
cutadapt -a AAAAA -q 20 sample.fastq.gz

All 5 comments

Hi @biodray,

Have you had a read of the docs on this subject? See https://multiqc.info/docs/#not-enough-samples-found

Let me know if these don't fix the problem for you and we can reopen the issue.

Phil

Hi @ewels ,

Thanks for your anwser, sadly it didn't fix my problem. A closer look within the html report make me realize that multiQC think all my files have one sample with the exact name --discard-untrimmed (which is an argument of cutadapt), so it is overwriting the results instead of aggregating them. So at the end only the last file is used ...

Hi @biodray,

The docs that I linked to cover exactly this scenario (specifically https://multiqc.info/docs/#clashing-sample-names ), there are several ways to modify the MultiQC behaviour to avoid identical sample names. Probably best here is to use sensibly named subdirectories. Not ideal I agree, but it should work.. 馃槃

However - using a cutadapt flag instead of a filename sounds like buggy behaviour. Looking at the code, it seems MultiQC just takes the final part of the cutadapt command: https://github.com/ewels/MultiQC/blob/2037d6322b2554146a74efbf869156ad20d4c4ec/multiqc/modules/cutadapt/cutadapt.py#L104-L105

I'm not sure of how else we can do this automatically, though this is another case similar to issues #864 and #890 where it could be nice to have an option to disable the automatic sample name behaviour and just use the input filenames.

Just sharing my case: I know current module handling the case where input is read from stdin, but I got a similar problem when I used process substitution as input.

In this cutadapt log example, MultiQC cathes 13 as a sample name.

This is cutadapt 1.15 with Python 3.5.2
Command line parameters: -a A{100} -m 20 -q 20,20 -b file:/proc/self/fd/12 /proc/self/fd/13

For anyone else running across this, a temporary workaround is to ensure that the original cutadapt call ends with the input filename:

# wrong, sample will show up as "20"
cutadapt sample.fastq.gz -a AAAAA -q 20 

# correct, sample will show up as "sample.fastq.gz"
cutadapt -a AAAAA -q 20 sample.fastq.gz
Was this page helpful?
0 / 5 - 0 ratings