Question: Alignment plot of a small extract (sequence) from a .bam file
1
gravatar for Michi
4.5 years ago by
Michi950
Barcelona
Michi950 wrote:

Hi

I have a made variant callings of a bam file. Now instead of checking 100 variants one by one in a genome browser (such as IGV) and making screenshots, I am wondering if there is any software that allows me to create an alignment plot of a defined region.

 

Lets's say I am looking for something that works similarly to: 

`imaginary-alignment-plot-software --input my.bam --chr 7 --start 5000 --end 7000 etc....`

 

Thanks for any pointers!

Cheers,

sequencing bam snp alignment plot • 2.0k views
ADD COMMENTlink modified 4.5 years ago by Pierre Lindenbaum127k • written 4.5 years ago by Michi950
2
gravatar for Pierre Lindenbaum
4.5 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum127k wrote:

I wrote a

bam2svg : https://github.com/lindenb/jvarkit/wiki/Bam2SVG

bam2raster: https://github.com/lindenb/jvarkit/wiki/Bam2Raster

 

 

 

 

 

ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by Pierre Lindenbaum127k

Hello Pierre-- very useful application. thank you. Is there a way to control aesthetics of the svg? ie sample name, coordinates, grey banding in background? Thanks!

ADD REPLYlink written 8 months ago by lager0
1
gravatar for Nicola Casiraghi
4.5 years ago by
Germany, Heidelberg, DKFZ EMBL
Nicola Casiraghi450 wrote:

You can use samtools tview in order to visualize aligned reads spanning a specific position in you sorted bam. 

samtools tview [-p chr:pos] [-s STR] [-d display] <in.sorted.bam> [ref.fasta]

If -d is set to T you can visualize output as text alignment file. As example:

      47696431  47696441  47696451  47696461  47696471  47696481  47696491      
AATCCCCAGTCTTTGCCTTGCACAAACCTATATGCCCGTTGACTCTCTGGGGTGGGGAAAAAAAAAGTCATATTTAAGGT
................................................................................
,,,,,,,,,,,,,,,,,   ,,,,,,,,,,,,,,,,,,,,,,,,                   ,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,       
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,       
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,       
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,       
................................................................................
................................................................................
...................................A............................................
...................................A............................................
................................................................................
................................................................................
................................................................................
................................................................................
...................................A............................................
...................................A............................................
................................................................................
................................................................................
................................................................................

Take a look to this for further information.

ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by Nicola Casiraghi450
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: 1020 users visited in the last hour