This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to use bowtie2, reporting only the chromosomal coordinate

I'm familiar with using bowtie2 to align sequence files to reference. But I want to get a simple report only showing the chromosomal coordinate. Such as chr4 \t 11111111111111 \t 33333333333333

Is there any way to do this?

Beforehand, I tried this command. bowtie2 -x genome_index -c CAACTCCAGTCCCAAATATGTAGCTGTT --very-sensitive

sequence alignment

1 answer

Aligners are going to generally output in SAM format. If you just need the chromosome and start position then you can pipe the output to awk and print the fields you need out.

bowtie2 -x genome -c CAACTCCAGTCCCAAATATGTAGCTGTT --very-sensitive | grep -v "^@" | awk -F "\t" '{OFS="\t"}{print $3,$4}'

Thank you so much! It perfectly does work for me

Log in to answer this question.