This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can Bwa Trim Barcode From 3 End?

"-B" can trim given length barcode from 5'. Does BWA can do similar trimming from 3'?

bwa

2 answers

I don't think that BWA supports trimming a fixed-length barcode from the 3' end of reads, but if your reads are in fasta or fastq format, you can use the fastx toolkit:

http://hannonlab.cshl.edu/fastx_toolkit/commandline.html#fastx_trimmer_usage

for example, to trim the last 6 bases of a 50-base read:

fastx_trimmer -l 44 -i untrimmed.fa -o trimmed.fa

Yes, you can optionally trim the 3'-end in BWA using the -q option but this is based on quality rather than a given length.

Log in to answer this question.