jdidion / atropos

An NGS read trimming tool that is specific, sensitive, and speedy. (production)
Other
120 stars 15 forks source link

--nextseq-trim should trim from both reads when paired reads are given #58

Closed pkMyt1 closed 6 years ago

pkMyt1 commented 6 years ago

When running using the following config trim --aligner adapter -a AAAAAAAAAGGGGGGGGGGGGGGGG$ -a A{20}$ -a G{50}$

-A AAAAAAAAAGGGGGGGGGGGGGGGG$ -A A{20}$ -A G{50}$

-g file:/Google_Drive/scripts/atropos/atropos/adapters/5'_anchored_adapters.fa -G file:/Google_Drive/scripts/atropos/atropos/adapters/5'_anchored_adapters.fa -a file:/Google_Drive/scripts/atropos/atropos/adapters/3'_anchored_adapters.fa -A file:/Google_Drive/scripts/atropos/atropos/adapters/3'_anchored_adapters.fa

-o /Sequencing/Male_Trim1.R1.fastq -p /Sequencing/Male_Trim2.R3.fastq -pe1 /OneDrive/working/Male_S2_R1_001.fastq.gz -pe2 /OneDrive/working/Male_S2_R3_001.fastq.gz

--log-level INFO --op-order GAWCQ --nextseq-trim 1 --times 3 --threads 3 --quality-base 20 --stats both --report-file /Sequencing/Report.txt --read-queue-size 1000 --result-queue-size 1000 --max-reads 300000

I get this in the report


Trimming

Pairs records fraction


Total read pairs processed: 300,000 Read 1 with adapter: 55,077 18.4% Read 2 with adapter: 20,026 6.7% Pairs written (passing filters): 300,000 100.0%

Base pairs bp fraction


Total bp processed: 60,600,000 Read 1: 30,300,000 Read 2: 30,300,000 Quality trimmed (NextSeq) 186,150 0.3% Read 1: 186,150 0.6% Read 2: 0 0 Total bp written (filtered): 57,652,325 95.1% Read 1: 28,080,685 92.7% Read 2: 29,571,640 97.6%

Found the bug. Around line 435 in trim/init.py

modifiers.add_modifier( NextseqQualityTrimmer, read=1, cutoff=options.nextseq_trim, base=options.quality_base)

The read=1 needs to be read=1 | 2 Works as expected with that change.

jdidion commented 6 years ago

Thanks! Fix is in master and will be included in 1.1.16.