Question: Trimming adapters with bbduk
1
gravatar for darzenis
2.8 years ago by
darzenis30
darzenis30 wrote:

I want to use bbduk to remove adapters from my paired end reads. I am using my own file with adapters, but I have to specify if I want to use that file as lref (to trim the left side / 5' ends) or rref (to trim the right side / 3' ends). The following is my code:

bbduk2 in1=sample_R.fq in2=sample_L.fq out1=sample_R_trimmed.fq out2=sample_L_trimmed.fq lref=/path_to_file_with_adapters.fa k=23 mink=11 hdist=1 tbo tpe

I don't understand why I have to specify lref or rref, and which one to choose. Are adapters only found on one side of the reads?

I ran the command with both rref and lref. Both methods produced two output files of smaller sizes than the original (so something was trimmed using either method), but only rref produced outputs that were of the same size (meaning that both the left and right reads were kept in pairs). I don't understand why this is so.

rna-seq • 2.9k views
ADD COMMENTlink modified 2.8 years ago by GenoMax96k • written 2.8 years ago by darzenis30

Couple of questions.

  1. I assume bbduk2 is a spelling error above. Can you provide a reference to the lref=? I don't recollect seeing that option before.
  2. Why do you need to trim both ends of the fragment? Is this some special kind of library modification? With Illumina, you only expect to find adapters on 3'-end of reads in cases where the length of sequencing is longer than insert size and you expect read-through. You are not specifying a trim mode (ktrim= or qtrim=) in your command above.
ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by GenoMax96k
  1. bbduk2 is almost the same as bbduk but can run several operations simultaneously (and I will eventually want to do that). There doesn't seem to be a simple "ref" option: instead there are fref (file used for filtering), rref (for trimming right), lref (for trimming left), etc. Here is a good summary of bbduk2 parameters: https://github.com/BioInfoTools/BBMap/blob/master/sh/bbduk2.sh

  2. The library is not anything special (I'm just new at this) - it is a stranded Illumina truseq cDNA library for paired end reads. I wasn't aware that I would only find adapters on the 3'-end. In that case, I would only need to do right trimming. Do you have a reference for this? I thought Ilumina put adapters on both sides, which is why I was confused as to why I had to pick right or left trimming.

Also, I tried to run the command using ktrim but got errors saying that I had to specify rref or lref instead.

ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by darzenis30
0
gravatar for GenoMax
2.8 years ago by
GenoMax96k
United States
GenoMax96k wrote:

You are NOT using the official software repo that is hosted on SF. Here is the link for that.

You are also using a 2 yr old version of BBMap suite. bbduk2 was included/supported in that version (current BBMap is at v.38.01 and does not have bbduk2). I suggest that you switch to using the software from SourceForge.

There are adapters on both ends of the fragment being sequenced. Sequencing primer is located at a position where the first base sequenced is from the insert. So generally you should worry about adapters sequence being present only on 3'-end of the read.

ADD COMMENTlink written 2.8 years ago by GenoMax96k

Thank you so much! That helps.

ADD REPLYlink written 2.8 years ago by darzenis30
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: 1746 users visited in the last hour
_