aakechin / cutPrimers

curPrimers is a tool for trimming primer sequences from amplicon based NGS reads
GNU General Public License v3.0
17 stars 11 forks source link

fastq file trimmed after cutprimer can not correct run in mpileup #7

Closed liuyuan0546 closed 4 years ago

liuyuan0546 commented 5 years ago

Hello, This programme is very fantastic in my daily use. However, recently I found the fastq files trimmed after by cutprimers.py can not run correct by samtools mpileup programme. My analysis pipeline as following: Fastq reads trimmed by cutprimers.py-- bwa mem reads alignment-- samtools view convert file from sam to bam -- samtools sort to sort the bam file -- samtools mpileup -a to output all position statistics. But finnally the output file lost most positions it should be coveraged well. At the begining, I thought it might be the problems from the samtools mpileup programe. but when i skip the cutprimer step, all position is well reported in mpileup files. So, i write to find your help to solve this disaster problem. best regards, Yuanwu

aakechin commented 5 years ago

Hello, @liuyuan0546! Thank you for your comment! Are you sure that uncovered positions do not correspond to positions corresponding to primers? Anyway, you can also try to use cutPrimers to trim primer sequences in a BAM-file, i.e. in already mapped reads. Sometimes it gives more reliable results but also needs coordinates of your amplicons.

liuyuan0546 commented 5 years ago

Thanks for your quickly response. My problem might not caused by cutprimer.py but mpileup step, and I have find a way to solute this. By the way, I've try to use the BAM-file to cut primers but all my reads were cut to nothing left even i used the -primer3 parameter.

aakechin commented 5 years ago

@liuyuan0546, maybe there were some problems with coordinates of amplicons? You should use coordinates of internal sequences between two primers.

liuyuan0546 commented 5 years ago

Yes, I've check the coordinates of my amplicons I found i used the primer coordinates insead..... In addition I found a new published tools to trim primers very recently named pTrimmer, this tool is ultrafast than yours but without the function to process 3' of sequencing reads.

aakechin commented 5 years ago

I know about this tool but haven't tested it yet. Maybe in some cases it would be better, but cutPrimers is useful firstly for targted NGS where accuracy is the most important parameter.