Question: Question on bbduk ftl option when used with adapter and quality trimming
1
gravatar for tamu.anand
10 months ago by
tamu.anand10
tamu.anand10 wrote:

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 • 342 views
ADD COMMENTlink modified 5 weeks ago by DriesB90 • written 10 months ago by tamu.anand10

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

ADD REPLYlink written 10 months ago by tamu.anand10

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 REPLYlink written 5 weeks ago by DriesB90
1
gravatar for genomax
5 weeks ago by
genomax90k
United States
genomax90k wrote:

@ 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 COMMENTlink modified 5 weeks ago • written 5 weeks ago by genomax90k
1
gravatar for DriesB
5 weeks ago by
DriesB90
Leiden, The Netherlands
DriesB90 wrote:

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 COMMENTlink written 5 weeks ago by DriesB90
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1656 users visited in the last hour