FelixKrueger / TrimGalore

A wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming to FastQ files, with extra functionality for RRBS data
GNU General Public License v3.0
462 stars 150 forks source link

adapter regular expression #40

Closed wangjiawen2013 closed 5 years ago

wangjiawen2013 commented 5 years ago

Dear, There are two adapters in my fastq (CATG/ TGCA) , can I remove them with regular expression CATG|TGCA ?

FelixKrueger commented 5 years ago

I am afraid this is not possible within Trim Galore, but you would have to run two consecutive runs.

wangjiawen2013 commented 5 years ago

I am afraid this is not possible within Trim Galore, but you would have to run two consecutive runs.

the adapter sequence is CATG, but I find the sequence that don't have CATG are also cut. I don't know why. Are the adapter too short ? here is the code: trim_galore --paired --dont_gzip --adapter CATG --adapter2 CATG --length 6 --fastqc --stringency 4 -e 0 rawdata/LR01_R1_promoter.fq rawdata/LR01_R2_promoter.fq

FelixKrueger commented 5 years ago

Hmm, to me it looks like his command would try to find CATG in Read 1, and CATG again in Read 2 (why not leave out --adapter2 then?) if the sequence is fully present in the sequence. In addition, sequences would also be quality trimmed with a Phred threshold of 20.

wangjiawen2013 commented 5 years ago

Good advice, thanks!