This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Visualization Of Short Read Mapping To The Reference Sequence

Hi

Is there any script that can visualize the short read mapping to the reference sequence? such as this effect.

Great thanks!

mapping

3 answers

if you want a script that prints the content of a bam to stdout, I wrote a tool based on samtools tview at http://code.google.com/p/variationtoolkit/

$ echo -e "ref\t3\nref2\t2" |\
  vcfttview -x 3 -B toy.bam -R toy.fa

>ref:3

1         11              21        31         41        51        61           
AGCATGTTAGATAA****GATA**GCTGTGCTAGTAGGCAG*TCAGCGCCATNNNNNNNNNNNNNNNNNNNNNNNNNNNN
      ........    ....  ......K.K......K. ..........                            
      ........AGAG....***...      ,,,,,    ,,,,,,,,,                            
        ......GG**....AA                                                        
        ..C...**** ...**...>>>>>>>>>>>>>>T.....

>ref2:2

1         11            21        31        41        51        61              
aggttttataaaac****aattaagtctacagagcaactacgcgNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
.............Y    ..W...................                                        
..............****..A...                                                        
 .............****..A...T.                                                      
     .........AAAT.............                                                 
         C...T****....................                                          
           ..T****.....................                                         
             T****......................

great thanks for your tools.

For small numbers of sequences of ~20bp or longer you can use blat and then visualize the alignments in the genome browser. But, for larger numbers of reads you probably want to use an aligner like bwa and then load the result into a viewer like IGV.

Tablet is also a good tool for visualizing short read alignments to a reference sequence.

Log in to answer this question.