Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should provide neat html features and/or paired end reads for BAM tracks #2034

Closed
nathandunn opened this issue Feb 7, 2019 · 16 comments
Closed
Assignees
Milestone

Comments

@nathandunn
Copy link
Contributor

nathandunn commented Feb 7, 2019

Related to this conversations: http://gmod.827538.n3.nabble.com/Request-for-clarification-on-draggable-BAM-tracks-td4060195.html

Neat Features used to properly draw the introns. If I create NeatAlignments, however, there are some class problems that need to be solved with the new track types.

@nathandunn nathandunn added this to the 2.3.1 milestone Feb 7, 2019
@nathandunn
Copy link
Contributor Author

There are two options for this:

1 - enable neat features for BAMS. We did this neat features this way:

https://github.com/GMOD/Apollo/blob/master/client/apollo/js/View/Track/DraggableNeatHTMLFeatures.js

We would extend this instead:

https://github.com/GMOD/Apollo/blob/master/client/apollo/js/View/Track/DraggableAlignments.js

That being said, there were some ClassNotFound errors in the original NeatFeatures code (not in the original code), so either need to fix it there, or over-ride it in the new DraggableNeatAlignments class.

2 - employ paired end reads in the HTML alignment tracks, by either fixing the JBrowse Alignments in JBrowse, fixing it in the apollo draggable track. @cmdcolin did this for Canvas, though its probably more than we need:

https://github.com/GMOD/jbrowse/pull/1235/files#diff-4e9bd0916dfb5f75b9a47bc463e870a5

===

I'll probably attempt version 1 again later this week.

@cmdcolin
Copy link
Collaborator

cmdcolin commented Feb 7, 2019

paired read isn't necessary to display splicing. I think that, if you just apply the "track transformer" code in main.js to change Alignments2 to DraggableAlignments it should work. I would also probably not use neatfeatures on the alignments but that is preference I suppose

@nathandunn
Copy link
Contributor Author

@cmdcolin I think the goal was to show to display the splicing, but still have the track draggable, but as DraggableAlignments inherits from Alignments (both HTMLFeatures), it doesn't display the splicing (but is draggable).

That being said, while I like Neat Features for displaying predictions, I agree that they are a bit noisy for displaying read data, but any display is better than none.

@robsyme
Copy link
Contributor

robsyme commented Feb 7, 2019

@cmdcolin - I think that the difficulty is that tracks converted into WebApollo/View/Track/DraggableAlignments don't display gapped reads correctly. For example, RNAseq reads spanning an intron are rendered as a single block spanning the intron:

screenshot from 2019-02-07 12-42-28

{
   "formatVersion" : 1,
   "names" : {
      "type" : "Hash",
      "url" : "names/"
   },
   "tracks" : [
      {
         "category" : "Reference sequence",
         "chunkSize" : 20000,
         "key" : "Reference sequence",
         "label" : "DNA",
         "seqType" : "dna",
         "storeClass" : "JBrowse/Store/Sequence/StaticChunked",
         "type" : "SequenceTrack",
         "urlTemplate" : "seq/{refseq_dirpath}/{refseq}-"
      },
      {
         "key" : "Track/Alignments",
         "label" : "Alignments",
         "storeClass" : "JBrowse/Store/SeqFeature/BAM",
         "type" : "JBrowse/View/Track/Alignments",
         "urlTemplate" : "bams/inplanta-early.bam"
      },
      {
         "key" : "Track/Alignments2",
         "label" : "Alignments2",
         "storeClass" : "JBrowse/Store/SeqFeature/BAM",
         "type" : "JBrowse/View/Track/Alignments2",
         "urlTemplate" : "bams/inplanta-early.bam"
      }
    ]
}

In this case, the reads in Track/Alignments are converted into DraggableAlignments.

@cmdcolin
Copy link
Collaborator

cmdcolin commented Feb 7, 2019

Interesting thanks for testing that @robsyme

I checked in JBrowse 1 and it does still display spliced RNA-seq alignments with the HTML version JBrowse/View/Track/Alignments class

screenshot-localhost-2019 02 07-15-16-07

@nathandunn
Copy link
Contributor Author

@cmdcolin This might be easy to fix then if its just a bug in the Apollo DraggableAlignments code. Is this data part of the volvox sample data?

@nathandunn
Copy link
Contributor Author

@robsyme
Copy link
Contributor

robsyme commented Feb 7, 2019

FYI, The image above was using:

  • JBrowse 1.16.2-release
  • Webapollo 2.3.0 (e7adf93)

@nathandunn
Copy link
Contributor Author

Canvas on the top (translate to the WebApolloAlignments2) versus the HTML on the bottom translated to DraggableAlignment.

screen shot 2019-02-07 at 12 47 14 pm

screen shot 2019-02-07 at 12 47 26 pm

@nathandunn
Copy link
Contributor Author

duped @cmdcolin results in JBrowse:

screen shot 2019-02-07 at 1 08 00 pm

@nathandunn
Copy link
Contributor Author

Looks like a lot of the problems are CSS related from very very old code. This is a first-pass based on #2035 :

screen shot 2019-02-07 at 1 20 08 pm

@robsyme
Copy link
Contributor

robsyme commented Feb 7, 2019

That was quick! I've checked this on my instance and it does make split reads clear.

The complication is that annotations created from these reads do not retain the (implied) intron when dragged to the User-created annotations track:

webapollo-bug-report-2019-02-07_16 37 01

I hate to add things to your list, but is it possible (at whatever time) for split reads to create two or more CDS features?

@nathandunn
Copy link
Contributor Author

nathandunn commented Feb 7, 2019 via email

@robsyme
Copy link
Contributor

robsyme commented Feb 7, 2019

Done (#2036). Thanks Nathan!

@nathandunn
Copy link
Contributor Author

@robsyme This should now be fixed. I only fixed this for mRNA, but you can change the annotation type if you need to.

If doing this for non-coding RNA's is something that is fairly common you do (thus changing the annotation type constantly becomes a pain), let me know and I can fix that as well.

@robsyme
Copy link
Contributor

robsyme commented Feb 12, 2019

Perfect. I've just updated our instance and dragging reads to create new annotations works as expected. Thanks Nathan!
Congratulations on the new manuscript, btw. Great work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants