Paired end reads linkage in BAM and CRAM file #521

Open
Kinztan opened this Issue Oct 17, 2014 · 13 comments

Comments

Projects
None yet
6 participants
@Kinztan

Kinztan commented Oct 17, 2014

Is there any function that can enable to visualize the paired end links between two pair ends. Just like the broad IGV did, it is quite important to visualize the linkage of pair end sequence to understand their mechanism. Is there any configuration I need to change for that?

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Oct 17, 2014

Contributor

Do you have a link for how this looks? I don't think we have this feature

http://www.broadinstitute.org/igv/view_as_pairs

You could however, color by template length, which might give you some ideas for how the paired end reads are linked in a region.

You can do this by using the style.color as a javascript callback (short mailing list thread here with example http://sourceforge.net/p/gmod/mailman/message/32619454/)

Other links
http://gmod.827538.n3.nabble.com/Gmod-ajax-connecting-paired-end-reads-with-Alignments2-td4045949.html

Contributor

cmdcolin commented Oct 17, 2014

Do you have a link for how this looks? I don't think we have this feature

http://www.broadinstitute.org/igv/view_as_pairs

You could however, color by template length, which might give you some ideas for how the paired end reads are linked in a region.

You can do this by using the style.color as a javascript callback (short mailing list thread here with example http://sourceforge.net/p/gmod/mailman/message/32619454/)

Other links
http://gmod.827538.n3.nabble.com/Gmod-ajax-connecting-paired-end-reads-with-Alignments2-td4045949.html

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Oct 17, 2014

Contributor

Note that "template_length" would be used in place of "length_on_ref" RE: http://sourceforge.net/p/gmod/mailman/message/32619454/

Contributor

cmdcolin commented Oct 17, 2014

Note that "template_length" would be used in place of "length_on_ref" RE: http://sourceforge.net/p/gmod/mailman/message/32619454/

@selewis

This comment has been minimized.

Show comment
Hide comment
@selewis

selewis Oct 18, 2014

Hi Colin,

We should discuss this because we -did- have a means of doing this that
should be re-instituted.

And the data needs to use a standardized method for indicating the pairs so
they may be recognized (not name-based preferably)

-S

On Fri, Oct 17, 2014 at 8:22 AM, Colin Diesh notifications@github.com
wrote:

Note that "template_length" would be used in place of "length_on_ref" RE:
http://sourceforge.net/p/gmod/mailman/message/32619454/


Reply to this email directly or view it on GitHub
#521 (comment).

selewis commented Oct 18, 2014

Hi Colin,

We should discuss this because we -did- have a means of doing this that
should be re-instituted.

And the data needs to use a standardized method for indicating the pairs so
they may be recognized (not name-based preferably)

-S

On Fri, Oct 17, 2014 at 8:22 AM, Colin Diesh notifications@github.com
wrote:

Note that "template_length" would be used in place of "length_on_ref" RE:
http://sourceforge.net/p/gmod/mailman/message/32619454/


Reply to this email directly or view it on GitHub
#521 (comment).

@Kinztan

This comment has been minimized.

Show comment
Hide comment
@Kinztan

Kinztan Oct 23, 2014

So is that means currently jbrowse still does not have solution on visualizing paired end strands connected each other similar with IGV?

Kinztan commented Oct 23, 2014

So is that means currently jbrowse still does not have solution on visualizing paired end strands connected each other similar with IGV?

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Oct 23, 2014

Contributor

@Kinztan I don't think so although I haven't used IGV with paired end reads.

There are some other features in jbrowse that can sort of help with this however. For example, paired end reads are colored based on whether they are properly paired or whether there is aberrant pairing in jbrowse. This helps you quickly identify the reads that have strange pairing patterns (no mate pair, or abberant mate pair) and can call your attention.

We may also have a further discussion about this as @selewis said

Contributor

cmdcolin commented Oct 23, 2014

@Kinztan I don't think so although I haven't used IGV with paired end reads.

There are some other features in jbrowse that can sort of help with this however. For example, paired end reads are colored based on whether they are properly paired or whether there is aberrant pairing in jbrowse. This helps you quickly identify the reads that have strange pairing patterns (no mate pair, or abberant mate pair) and can call your attention.

We may also have a further discussion about this as @selewis said

@cmdcolin cmdcolin modified the milestone: 1.11.6 Jan 23, 2015

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Feb 5, 2015

Contributor

Some discussion that was sort of tangential was moved to here #560

Contributor

cmdcolin commented Feb 5, 2015

Some discussion that was sort of tangential was moved to here #560

@rbuels

This comment has been minimized.

Show comment
Hide comment
@rbuels

rbuels Feb 1, 2018

Collaborator

@scottcain you have some paired reads data that you have been working with at wormbase, could you maybe paste your configuration here?

Collaborator

rbuels commented Feb 1, 2018

@scottcain you have some paired reads data that you have been working with at wormbase, could you maybe paste your configuration here?

@scottcain

This comment has been minimized.

Show comment
Hide comment
@scottcain

scottcain Feb 1, 2018

Member

@rbuels, as much as I'd like for it to be generally applicable to BAM read pairs, the work I've done with pair ESTs is sufficiently different as to not be very helpful. What I've done hinges on preprocessing the EST match GFF and creating a parent "experimental_feature" feature that has the two match features as children. So it looks kind of like this:

experimental_feature
   match (for the 5' EST)
      match_part
      match_part
   match (for the 3' EST)
      match_part
      match_part

The only way I could see this working for BAM data would be if there were a process in JBrowse that would do the same sort of thing, but I have a hard time believing it would be anywhere near fast enough.

If it's helpful at all, the glyph I wrote is here:

https://github.com/WormBase/website-genome-browsers/blob/est_glyph/jbrowse/jbrowse/plugins/wormbase-glyphs/js/LinkedEST.js

Member

scottcain commented Feb 1, 2018

@rbuels, as much as I'd like for it to be generally applicable to BAM read pairs, the work I've done with pair ESTs is sufficiently different as to not be very helpful. What I've done hinges on preprocessing the EST match GFF and creating a parent "experimental_feature" feature that has the two match features as children. So it looks kind of like this:

experimental_feature
   match (for the 5' EST)
      match_part
      match_part
   match (for the 3' EST)
      match_part
      match_part

The only way I could see this working for BAM data would be if there were a process in JBrowse that would do the same sort of thing, but I have a hard time believing it would be anywhere near fast enough.

If it's helpful at all, the glyph I wrote is here:

https://github.com/WormBase/website-genome-browsers/blob/est_glyph/jbrowse/jbrowse/plugins/wormbase-glyphs/js/LinkedEST.js

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Feb 1, 2018

Contributor

This is a code for connecting bam reads that adds two new glyphs, one using arcs and another with lines https://github.com/elsiklab/apollo_lsaa/tree/master/client/PairedReadViewer

It uses the bam coordinate position of the mate pairs to just draw lines "towards" it's mate

Contributor

cmdcolin commented Feb 1, 2018

This is a code for connecting bam reads that adds two new glyphs, one using arcs and another with lines https://github.com/elsiklab/apollo_lsaa/tree/master/client/PairedReadViewer

It uses the bam coordinate position of the mate pairs to just draw lines "towards" it's mate

@keiranmraine

This comment has been minimized.

Show comment
Hide comment
@keiranmraine

keiranmraine Feb 2, 2018

Contributor

@rbuels , WGS paired end data available here:

ftp://ngs.sanger.ac.uk/production/cancer/dockstore/cgpwgs/

Corresponding ref is Human GRCh37 (no chr prefix)

Contributor

keiranmraine commented Feb 2, 2018

@rbuels , WGS paired end data available here:

ftp://ngs.sanger.ac.uk/production/cancer/dockstore/cgpwgs/

Corresponding ref is Human GRCh37 (no chr prefix)

@rbuels

This comment has been minimized.

Show comment
Hide comment
@rbuels

rbuels Feb 3, 2018

Collaborator
Collaborator

rbuels commented Feb 3, 2018

@rbuels rbuels added this to the 1.15.0 milestone May 2, 2018

@rbuels rbuels modified the milestones: 1.15.0, 1.15.1 May 15, 2018

@rbuels rbuels added the big task label Jul 18, 2018

@rbuels

This comment has been minimized.

Show comment
Hide comment
@rbuels

rbuels Jul 18, 2018

Collaborator

implementation sketch

  • have a checkbox where you can turn on and off "connect paired reads", I guess it would default to on, but that could be configurable, cause this will have a significant performance hit
  • do the rendering in two passes. fetch all the data in one pass and make sure it's cached, then go through again and search the cache for each read's mate and aggregate them into parent/child features
Collaborator

rbuels commented Jul 18, 2018

implementation sketch

  • have a checkbox where you can turn on and off "connect paired reads", I guess it would default to on, but that could be configurable, cause this will have a significant performance hit
  • do the rendering in two passes. fetch all the data in one pass and make sure it's cached, then go through again and search the cache for each read's mate and aggregate them into parent/child features

@rbuels rbuels changed the title from Paired end reads linkage in bam file to Paired end reads linkage in BAM and CRAM file Jul 18, 2018

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Jul 20, 2018

Contributor

The IGV concept of "view as pairs" is probably sort of the idea we want to get at. They have this feature in igv js code here https://github.com/igvteam/igv.js/blob/master/js/bam/bamSource.js

An igv screenshot shows the idea, especially related to revealing structural issues like deletion it is great.

screenshot is near bottom of page here https://bioinformaticsdotca.github.io/BiCG_2017_module2_igv

Contributor

cmdcolin commented Jul 20, 2018

The IGV concept of "view as pairs" is probably sort of the idea we want to get at. They have this feature in igv js code here https://github.com/igvteam/igv.js/blob/master/js/bam/bamSource.js

An igv screenshot shows the idea, especially related to revealing structural issues like deletion it is great.

screenshot is near bottom of page here https://bioinformaticsdotca.github.io/BiCG_2017_module2_igv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment