Question: Create Image From Mapping Region
2
gravatar for Yahan
6.2 years ago by
Yahan370
Belgium
Yahan370 wrote:

I am looking for a way to generate an image for a set of mapping positions in a bam file.

Instead of browsing to each position by providing the coordinates in a tool like samtools tview, which is pretty cumbersome, I could then provide a list of such coordinates after which for each of them an image would be created.

Then I could browse these images to get a first impression of how the mapping looks like.

Does anyone know of a tool that could do something like that?

Thanks

samtools • 1.5k views
ADD COMMENTlink modified 4.3 years ago by Biostar ♦♦ 20 • written 6.2 years ago by Yahan370
3
gravatar for Pierre Lindenbaum
6.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum115k wrote:

I wrote something like this for IGV: http://plindenbaum.blogspot.fr/2011/07/controlling-igv-through-port-my.html

and I also wrote a tool that takes a VCF input and a bam: see http://code.google.com/p/variationtoolkit/wiki/VcfTTView

$ 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****......................
ADD COMMENTlink written 6.2 years ago by Pierre Lindenbaum115k
1
gravatar for Sean Davis
6.2 years ago by
Sean Davis25k
National Institutes of Health, Bethesda, MD
Sean Davis25k wrote:

You can use IGV and talk to IGV via its port mechanism. If you are an R user, the SRAdb package has convenience functions to work with IGV to produce plots.

ADD COMMENTlink written 6.2 years ago by Sean Davis25k
0
gravatar for Fidel
6.2 years ago by
Fidel1.8k
Germany
Fidel1.8k wrote:

I've found that the best way to achieve what you want is using IGV batch script.

You can quickly generate a batch script as follows:

> echo "snapshotDirectory <some directory to put the images>" > igv_batch_script.txt
> cat file.bed | perl -lane 'print "goto $F[0]:$F[1]-$F[2]\nsnapshot";' >>  igv_batch_script.txt

Then you just load this file in IGV: "File" -> "Run Batch Script..."

For further info look at: http://www.broadinstitute.org/igv/batch

ADD COMMENTlink modified 6.2 years ago • written 6.2 years ago by Fidel1.8k
0
gravatar for Alex Reynolds
4.6 years ago by
Alex Reynolds26k
Seattle, WA USA
Alex Reynolds26k wrote:

If you are familiar with the UCSC browser, you could load your reads into a custom track, add annotation tracks (if desired) and use UCSC Fetch to generate screenshots around regions-of-interest.

You could then use something like SimpleViewer to make a quickly-browsable gallery.

ADD COMMENTlink written 4.6 years ago by Alex Reynolds26k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 741 users visited in the last hour