This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using samtools to print only base pairs

Hello,

I was wondering if it is possible with samtools to print solely the base pairs of an alignment. Right now, I have used samtools to print out a sam file in a specific region:

samtools view ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/data/HG00099/alignment/HG00099.mapped.ILLUMINA.bwa.GBR.low_coverage.20130415.bam 17:7565097-7590856

The output of this is a massive file that prints out information like this (for many respective locations):

SRR062635.9218683    163    17    7565037    60    92M8S    =    7565137    199    
GGGATTACAGGCGGGAGCCACCGTGCCCGGCCTCCAGTATTTTGTTTATTTATTTTTTTTGAGACAGAGTCTCACTCTGTTGCACAGGCTGGGGGGCAGG    
0LMMMMMNPPPPGQK@?9F9:C5<@DDD2F<D=CD+;868GFG>C??9GG@3GGGHCHBC78:B<KDIDDBFHGGGDFAAIK7GAEFED>F#########    
X0:i:1    X1:i:0    XC:i:92    MD:Z:92    RG:Z:SRR062635    AM:i:37    NM:i:0    SM:i:37    MQ:i:60    XT:A:U    BQ:Z:
@JH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@@@@@@@@@

For my purposes, I was wondering if there is any way that I could just print out the base pairs (GGGATTTA etc.) without the other information.

Thanks,
Owen

samtools

0 answers

No answers yet.

Log in to answer this question.