Question: VIew reads sorted by name in IGV
0
gravatar for nchuang
2.1 years ago by
nchuang200
United States
nchuang200 wrote:

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?

igv samtools bam • 1.3k views
ADD COMMENTlink modified 2.1 years ago by d-cameron2.1k • written 2.1 years ago by nchuang200

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 REPLYlink written 2.1 years ago by dariober10k

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 REPLYlink written 2.1 years ago by nchuang200
1
gravatar for Pierre Lindenbaum
2.1 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum123k wrote:

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 COMMENTlink modified 2.1 years ago • written 2.1 years ago by Pierre Lindenbaum123k

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 REPLYlink written 2.1 years ago by nchuang200
0
gravatar for d-cameron
2.1 years ago by
d-cameron2.1k
Australia
d-cameron2.1k wrote:

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 COMMENTlink written 2.1 years ago by d-cameron2.1k

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 REPLYlink written 2.1 years ago by nchuang200
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: 2665 users visited in the last hour