Alignment plot of a small extract (sequence) from a .bam file
2
1
Entering edit mode
9.2 years ago
Michi ▴ 990

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.

Let'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

bam SNP sequencing plot alignment • 3.8k views
ADD COMMENT
2
Entering edit mode
ADD COMMENT
0
Entering edit mode

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 REPLY
1
Entering edit mode
9.2 years ago

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 at this for further information.

ADD COMMENT

Login before adding your answer.

Traffic: 2538 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6