jbrowse icon indicating copy to clipboard operation
jbrowse copied to clipboard

RNA seq reads need indication of orientation

Open selewis opened this issue 9 years ago • 9 comments

Reads should be visually segregated (plus strand above, minus strand below) so that it is easier to see which gene models they support.

selewis avatar Apr 10 '15 18:04 selewis

There has been a lot of work done on this already in the past year (see the several issues and long conversations). It has been resolved by read colouring and AFAIK integrated into the present version 1.11.6. I've not had a chance to upgrade and test though yet!

colindaven avatar Apr 14 '15 08:04 colindaven

So JB 1.11.6 lets you colour according to the XS tag which is output by Tophat. Sadly this is not output by the popular STAR aligner (at least for stranded RNA-seq data, which all of mine are).

I'll have to look into other options for STAR. At the moment I split tracks into forward and reverse orientated read pairs using ngsutils. This works well.

colindaven avatar Jun 15 '15 08:06 colindaven

Is your data paired-end and stranded? I know it's possible to have single end stranded too, and in that case, it should display fine without the new options in 1.11.6. The option in 1.11.6 "useReverseTemplate" will use the multi_segment_template flag in the BAM file to flip the pairs in the same direction

Example of the paired-end stranded rna-seq with the use reverse template option: screenshot-george missouri edu 2015-06-15 10-21-50

The XS tag is sort of a separate issue, and I don't think you need it if your data is stranded (since that retains the strand information. The XS tag is what strand is inferred by the aligner according to splice site info)

For reference this is what the XS option in 1.11.6 looks like screenshot-hymenopteragenome org 8080 2015-06-15 10-11-55

cmdcolin avatar Jun 15 '15 15:06 cmdcolin

Hi Colin,

thanks, the 'reverse template' does the job extremely nicely with paired end strand specific data aligned by STAR.

That's very useful information and a nice implementation.

However I do think it will be difficult to non-expert users to interpret the 'reverse template' or 'Use XS' tags. It might be worthwhile calling them

'reverse template (RNA-seq orientation)' 'Use XS (RNA-seq orientation)'

or the same without 'orientation'.

colindaven avatar Jun 19 '15 12:06 colindaven

Well, alignments tracks have an option to hide reads aligned to the forward strand, or aligned to the reverse strand, so you can filter that way. But it's kind of cumbersome for the use case of evaluating gene model support.

@nathandunn is Apollo doing anything to work around this right now?

We should talk about what needs to be done about this a.) in the JBrowse 1.x series, and b.) how 2.x should approach it

rbuels avatar Feb 01 '18 18:02 rbuels

The 'useXS' and 'useReverseTemplate' should take care of extra "biological" cases of strand display. These can also be enabled via the user interface track menu for easy usability. To describe these in more detail:

useXS allows strand of RNA-seq reads to be inferred from RNA-seq reads by matching the splice site orientation in a certain direction (therefore inferring strand)

useReverseTemplate enables actual "stranded" RNA-seq data, a special protocol that not all RNA-seq bam files have, to display the paired end reads in a specific direction (even though the pairs from "stranded" RNA-seq are in different directions, the flag when this is enables displays them all in a specific direction)

note that these are both canvasfeatures specific

cmdcolin avatar Mar 14 '18 02:03 cmdcolin

Screenshots previously in this thread show both cases

cmdcolin avatar Mar 14 '18 02:03 cmdcolin

There will be a new BAM tag called TS that can indicate strand of reads https://github.com/samtools/hts-specs/issues/276

This is basically identical to XS:A which is a custom field used by tophat and some other programs but it will be standardized as TS

cmdcolin avatar Apr 03 '18 00:04 cmdcolin

I am incorporating the suggestion to make those options say "RNA-seq orientation" in my paired read branch

cmdcolin avatar Nov 15 '18 20:11 cmdcolin