GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
460 stars 199 forks source link

Enhancer in GFF #928

Open billzt opened 6 years ago

billzt commented 6 years ago

Supporting a GFF file like this:

1   araport11   mRNA    52061   54689   .   +   .   ID=transcript:AT1G01110.1
1   araport11   exon    52061   52730   .   +   .   Parent=transcript:AT1G01110.1;Name=AT1G01110.1.exon1;constitutive=0;ensembl_end_phase=-1;ensembl_phase=-1;exon_id=AT1G01110.1.exon1;rank=1
1   araport11   five_prime_UTR  52061   52730   .   +   .   Parent=transcript:AT1G01110.1
1   araport11   five_prime_UTR  52938   53021   .   +   .   Parent=transcript:AT1G01110.1
1   araport11   exon    52938   53183   .   +   .   Parent=transcript:AT1G01110.1;Name=AT1G01110.1.exon2;constitutive=0;ensembl_end_phase=0;ensembl_phase=-1;exon_id=AT1G01110.1.exon2;rank=2
1   araport11   CDS 53022   53183   .   +   0   ID=CDS:AT1G01110.1;Parent=transcript:AT1G01110.1;protein_id=AT1G01110.1
1   araport11   exon    53484   53624   .   +   .   Parent=transcript:AT1G01110.1;Name=AT1G01110.2.exon4;constitutive=1;ensembl_end_phase=0;ensembl_phase=0;exon_id=AT1G01110.2.exon4;rank=3
1   araport11   CDS 53484   53624   .   +   0   ID=CDS:AT1G01110.1;Parent=transcript:AT1G01110.1;protein_id=AT1G01110.1
1   araport11   CDS 53703   54494   .   +   0   ID=CDS:AT1G01110.1;Parent=transcript:AT1G01110.1;protein_id=AT1G01110.1
1   araport11   exon    53703   54689   .   +   .   Parent=transcript:AT1G01110.1;Name=AT1G01110.1.exon4;constitutive=0;ensembl_end_phase=-1;ensembl_phase=0;exon_id=AT1G01110.1.exon4;rank=4
1   araport11   three_prime_UTR 54495   54689   .   +   .   Parent=transcript:AT1G01110.1
1   araport11   enhancer    41854   41953   .   +   .   Parent=transcript:AT1G01110.1

We manually add an "enhancer" for transcript AT1G01110.1 in front of the main region.

In JBrowse, the transcript can be rendered properly. However we cannot see the enhancer. tim 20170923172509

While in other genome browser such as IGV, it can render the "enhancer" after we directly load the GFF file:

tim 20170923172704

Is is a bug in JBrowse?

colindaven commented 6 years ago

How did you read in the GFF3 ?

If you used the bioperl parser (bin/flatfile-to-json.pl) I would guess enhancer is not being picked up.

One possible workaround is using all the options of the flatfile-to-json.pl script to explicitly mention the enhancer. Another is to declare the enhancer as a separate feature perhaps not related with Parent to the gene, but with a note pointing to the gene.

bin/flatfile-to-json.pl \
        --trackLabel $gff_name \
        --gff $gff3_file \
        --out $outdir \
        --key $gff_name  \
        --className transcript \
        --type mRNA \
        --autocomplete all \
        --getSubfeatures \
        --subfeatureClasses '{"enhancer":"exon","CDS":"transcript-CDS"}' \
        --arrowheadClass 'arrowhead' \
;
enuggetry commented 6 years ago

The enhancer doesn't show because it's outside of the transcript envelope, 52061

On Mon, Sep 25, 2017 at 11:49 PM, Colin Davenport notifications@github.com wrote:

How did you read in the GFF3 ?

If you used the bioperl parser (bin/flatfile-to-json.pl) I would guess enhancer is not being picked up.

One possible workaround is using all the options of the flatfile-to-json.pl script to explicitly mention the enhancer. Another is to declare the enhancer as a separate feature perhaps not related with Parent to the gene, but with a note pointing to the gene.

bin/flatfile-to-json.pl \ --trackLabel $gff_name \ --gff $gff3_file \ --out $outdir \ --key $gff_name \ --className transcript \ --type mRNA \ --autocomplete all \ --getSubfeatures \ --subfeatureClasses '{"enhancer":"exon","CDS":"transcript-CDS"}' \ --arrowheadClass 'arrowhead' \ ;

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GMOD/jbrowse/issues/928#issuecomment-332103041, or mute the thread https://github.com/notifications/unsubscribe-auth/AJlnARpwdz2C8leqRARn0-jLybffsdX0ks5smJ55gaJpZM4Phf8F .

enuggetry commented 6 years ago

one way is to just make it an independent feature.

On Tue, Sep 26, 2017 at 4:04 PM, Eric Yao ericiam@berkeley.edu wrote:

The enhancer doesn't show because it's outside of the transcript envelope, 52061

  • 54689. I don't know if there's a quick way around it.

On Mon, Sep 25, 2017 at 11:49 PM, Colin Davenport < notifications@github.com> wrote:

How did you read in the GFF3 ?

If you used the bioperl parser (bin/flatfile-to-json.pl) I would guess enhancer is not being picked up.

One possible workaround is using all the options of the flatfile-to-json.pl script to explicitly mention the enhancer. Another is to declare the enhancer as a separate feature perhaps not related with Parent to the gene, but with a note pointing to the gene.

bin/flatfile-to-json.pl \ --trackLabel $gff_name \ --gff $gff3_file \ --out $outdir \ --key $gff_name \ --className transcript \ --type mRNA \ --autocomplete all \ --getSubfeatures \ --subfeatureClasses '{"enhancer":"exon","CDS":"transcript-CDS"}' \ --arrowheadClass 'arrowhead' \ ;

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GMOD/jbrowse/issues/928#issuecomment-332103041, or mute the thread https://github.com/notifications/unsubscribe-auth/AJlnARpwdz2C8leqRARn0-jLybffsdX0ks5smJ55gaJpZM4Phf8F .

rbuels commented 6 years ago

I'd say the transcript glyph should probably just be extended to draw this enhancer directly, this might be a good small project for somebody looking to dip their toes in the codebase.

nathanhaigh commented 6 years ago

Could this be due to the "enhancer" being specified out of sort order (at the end) and even if it was in sorted order it would occur before the parent feature? If so, has this been fixed by https://github.com/GMOD/jbrowse/issues/780

cmdcolin commented 6 years ago

I think that making it an independant feature is probably more or less the best way to handle it as @enuggetry said.

Making an enhancer or promoter a "subfeature" of the gene parent, but then making it outside the coordinate boundary of the gene, is fairly awkward

The rendering system of jbrowse can actually be configured to render things outside the boundary of it's gene using maxFeatureGlyphExpansion but it gets a little weird!

An enhancement to this would maybe be having some sort of "relationship" type, but I don't really know how GFF handles this

nathanhaigh commented 6 years ago

@cmdcolin The GFF3 spec (https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md#parent-part_of-relationships) states:

The GFF3 format does not enforce a rule in which features must be wholly contained within the location of their parents, since some elements of the Sequence Ontology (e.g. enhancers in genes) allow for distant cis relationships.

So it would appear that the way this is specified in the GFF3 file provided by @billzt is the correct way to encode this relationship.