Question on bbduk ftl option when used with adapter and quality trimming
2
1
Entering edit mode
4.5 years ago
tamu.anand ▴ 30

I am trying to use bbduk to do adapter and quality trimming and then use ftl=12.

When does the force trimming happen - I know that adapter trimming happens before quality trimming

My question: what's the order of operations if I use

bbduk.sh in=read.fq out=clean.fq ref=adapters.fa ftl=12 minlength=35 trimq=30 ktrim=r qtrim=rl k=23 mink=11 hdist=1

I am assuming that adapter trimming happens first, then quality trimming and then positional trimming -

Context: I am trying to do this based on Lexogen recommendation for Quantseq FWD: https://www.lexogen.com/quantseq-3mrna-sequencing/#quantseqfaq

What sequence should be trimmed: The reads should be trimmed to remove adapter sequences, poly(A) / poly(T) sequences, and low quality nucleotides. Reads that are too short (i.e., <20 nt) or have generally low quality scores should be removed from the set. As second strand synthesis is based on random priming, there may be a higher proportion of errors at the first nucleotides of the insert due to non-specific hybridization of the random primer to the cDNA template. For QuantSeq FWD data we therefore recommend using an aligner that can perform soft-clipping of the read ends (e.g., STAR aligner) during alignment, or increasing the number of allowed mismatches to 14. Alternatively, trimming the first 12 nt of Read 1 can be performed prior to alignment when using a more stringent aligner (e.g., HISAT2). While trimming the read can decrease the number of reads of suitable length for alignment, the absolute number of mapping reads may increase due to the improved read quality.

Thanks in advance

RNA-Seq bbduk • 2.1k views
ADD COMMENT
0
Entering edit mode

Tagging Brian Bushnell and Genomax for help on this. Thanks in advance.

ADD REPLY
0
Entering edit mode

I am bumping this question, especially because I would assume that 'ftl' (= Forced Trimming Left) would happen first, as doing it last would increase the risk of trimming away target sequence.

Tagging Brian Bushnell and Genomax again. I could not find the answer on SEQanswers' or JGI's page on BBDuk.

ADD REPLY
1
Entering edit mode
3.7 years ago
GenoMax 141k

@ DriesB : Only Brian can provide a definite answer but I will provide a work around. You could simply do the following if you want to ensure ftl happens first.

bbduk.sh in=read.fq out=stdout.fq ftl=12 | bbduk.sh in=stdin.fq out=clean.fq ref=adapters.fa minlength=35 trimq=30 ktrim=r qtrim=rl k=23 mink=11 hdist=1

Swap the order if you want ftl to happen last.

bbduk.sh in=read.fq out=stdout.fq ref=adapters.fa minlength=35 trimq=30 ktrim=r qtrim=rl k=23 mink=11 hdist=1 | bbduk.sh in=stdin.fq out=final.fq ftl=12
ADD COMMENT
1
Entering edit mode
3.7 years ago
DriesB ▴ 110

Funnily enough, while searching for some more information about the piping suggested by genomax, I did find the answer on BBDuk's SEQanswers' page, message number 43.

Here Brian Bushnell states that the order is currently:

  1. filter by minAvgQuality
  2. force-trim
  3. kmer-analyze (trim, filter, or mask)
  4. trim by overlap
  5. quality-trim
ADD COMMENT

Login before adding your answer.

Traffic: 1999 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6