VIew reads sorted by name in IGV
2
0
Entering edit mode
7.2 years ago
nchuang ▴ 260

I have two sets of alignments from different sequencing runs that I want to compare in IGV. I want to maintain the order of the read alignments between the two bams so I can visually compare the alignments, but when I sort the bams I lose the order. I know I can use samtools sort -n but then I can't index it and open in IGV.

Is there a solution to this problem?

bam igv samtools • 4.9k views
ADD COMMENT
0
Entering edit mode

Hi- It's unclear to me what it is exactly that you want to compare. Different sequencing runs will give different read names, so regardless of the tool you use you cannot compare individual reads across runs. Even if read names were the same (say you match reads across runs using the flow cell coordinates), reads with the same coordinates from different runs probably come from different parts of the genome so I don't see how such comparison would be useful.

ADD REPLY
0
Entering edit mode

I was trying to simplify my question. My "reads" are consensus sequences of loci of interests that I named. One I did with Sanger sequencing and the other with PacBio.

ADD REPLY
1
Entering edit mode
7.2 years ago

Is there a solution to this problem?

no IGV , like most tools, can only use a bam sorted on coordinates. (however as far as I remember, you can sort the read by names in the vizualized window using right-click/menu)

you could use another, cmd-line based tool : https://www.google.com/search?q=compare+bam+site%3Abiostars.org to compare the files.

ADD COMMENT
0
Entering edit mode

thanks Pierre. I spent a few hours trying to figure this out at least now I know it cannot be done. I did try right clicking and sorting the alignment but it does not do it by name.

ADD REPLY
0
Entering edit mode
7.2 years ago
d-cameron ★ 2.9k

I can visually compare the alignments

IGV displays all alignments _relative to the reference genome_. The x axis in IGV is always reference genome coordinates. IGV will never display a read that is not aligned to the reference genome.

I have two sets of alignments from different sequencing runs that I want to compare in IGV ... I want to maintain the order of the read alignments between the two bams so I can visually compare the alignments

Firstly, read names are unique. Secondly if you have performed two different sequencing runs, you have sequenced a different set of DNA fragments in each run. There is not a one-to-one correspondence of reads between sequencing runs. In fact, the only time the two runs will sequence the 'same' thing is when they sequence different PCR duplicates of the same source molecule from the same library prep - something that you can neither tell has happen (exception: you could sequence a single cell), nor want (you want your PCR duplicate rate as low as possible when sequencing).

ADD COMMENT
0
Entering edit mode

I think dariober asked me the same thing and I explained it very briefly. I am just using IGV for visualization of my alignments and "reads" are actually individual consensus sequences I have sequenced and assembled separately. I want to line them up on IGV to see base differences between the assemblies.

ADD REPLY

Login before adding your answer.

Traffic: 2163 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