Entering edit mode
2.2 years ago
Kyle
•
0
Hi everyone,
I have some BAM files but not the original FASTQs. Normally, I use fastp to trim FASTQs, but it does not accept BAM files. I was wondering if there is a way that can trim BAM files directly?
Thank you!
You can export fastq data from your BAM's, trim and realign.
If you don't want to do that then this may be an option: Trim bam file reads to remove all nucleotide over a certain length
How to trim alignments in a BAM file to a restricted genomic window?
What are you going to base your trimming on?
In addition to GenoMax 's answer, I'll like to mention another tool called iVar.
I am basing my trimming on base quality. I found a tool that does trimming of bam files directly (BamUtil, trimBAM) but you have to manually enter how many bases you want to trim from each end. Is there anything like fastp that does the trimming automatically based on quality?
Also, iVar seems like it's for viral amplicon-based sequencing, which I don't think would be appropriate here.