Hi Biostars,

I have been using trimmomatic for quite some time, but realized that I don't get something.
So one can use LEADING and TRAILING options to remove bases from the beginning and end of the read, respectively. 
From manual:
LEADING Remove low quality bases from the beginning. As long as a base has a value below this 
threshold the base is removed and the next base will be investigated.

My question is:
"From the beginning" means from the beginning until the end of the read? If yes, then what is the meaning of having TRAILING option if the whole read is scanned?
Otherwise, until which base does trimmomatic scan by LEADING option?

Cheers,


According to the [documentation][1] both both options take the argument "quality":

LEADING:quality

leading: Cut bases off the start of a read, if below a threshold quality

quality: Specifies the minimum quality required to keep a base. Remove low quality or N bases.

Also from [the manual][2]: LEADING - Remove low quality bases from the beginning. As long as a base has a value below this threshold the base is removed and the next base will be investigated.

"LEADING 3" would delete all bases below a quality threshold of 3 or that are N, beginning at the first base and continuing until the first base that is at least a quality of 3 and is not N

AAAGGGTTT
012345678 - Leading 3 would cause the deletion of AAA

AAANNNTTT
012345678 - Leading 3 would cause the deletion of AAANNN

AAAGGGTTT
123456789 - Leading 3 would cause the deletion of AA

Same happens with trailing but from the other end


  [1]: http://www.usadellab.org/cms/?page=trimmomatic
  [2]: http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/TrimmomaticManual_V0.32.pdf