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.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.