This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Stop BWA mem trimming

Hi, I am simulating a SAM file, I have a number of perfect quality reads for known regions in a FASTQ that I want to map. I used BWA mem and I found that it trims the read which is not what I need. I want to keep all the reads even with the lowest coverage.

How can I stop this trimming?

I remind you that there is no need to discard anything and I need the exact number of reads in the output SAM file as mapped or not-mapped reads. Thank you.

fasta2sam bwa bwa-mem alignment

1 answer

I feel there are some unstated details in your question. How would you like your untrimmed reads to match? Not at all?Would you prefer to have end mismatches in your alignment?

for bwa there is a scoring option that provides some control over clipping

   -L INT[,INT]  penalty for 5'- and 3'-end clipping [5,5]

though if you wanted a strictly non-clipping aligner you should use a different one like bowtie2

Thanks Albert, I did with bowtie2 and it works prefectly. About the bwa, as I mentioned before it is a simulated file so there is a 100% match with at least one region of the genome. So no need to consider mismatches. I was looking for a way to stop trimming, completely, because every base is important for my statistical calculation. For your information, I tried 22 different settings with bwa, but still, soft trimming is active. I appreciate your time.

Log in to answer this question.