[Gmod-ajax] I give up. What is the magic to get subfeatures?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gmod-ajax] I give up. What is the magic to get subfeatures?

Paul Stodghill
I'm trying to create a feature track that contains nested features,
similar to the mRNA track in the Drosophila.

Here is the GFF file that I am using as input,

##gff-version 3
NC_004578 GenBank gene 8438 15223 . + 1 ID=1489763;
NC_004578 GenBank CDS 9000 10000 . + 1 ID=9695423; Parent:1489763;
NC_004578 GenBank CDS 11000 12000 . + 1 ID=9695424; Parent:1489763;

Here is how I am invoking  flatfile-to-json.pl,

./bin/flatfile-to-json.pl --gff2 test.gff --getType --getSubs
--tracklabel test --key test --subfeatureClasses '{"CDS":
"transcript-CDS"}'

I can see that both trackData.json and subfeatures-1.json are being
created in the right track directory.

Here is what gets inserted into trackInfo.js

   {
      "url" : "data/tracks/{refseq}/test/trackData.json",
      "type" : "FeatureTrack",
      "label" : "test",
      "key" : "test"
   }

For starters, I see that "subfeatures":true needs to be added to
trackInfo.js, but what else?

(I tried following the configuration provided for the Drosophila, but
the syntax used for that example and for the for the config file
reference documentation appear to be out of sync with the current
implementation.)

Thanks.

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: I give up. What is the magic to get subfeatures?

Scott Cain
Hi Paul,

Off hand, I don't know the details of JBrowse configuration, but I can
tell you that you GFF is wrong.  The Parent part should look like the
ID part, with tag=value, so the ninth column should look like this
"ID=9695423;Parent=1489763".  Also, there is no need for the CDS
features to have an ID unless those features have children as well;
IDs are only for identifying parent-child relationships.  You might
find the GFF3 validator useful:

  http://modencode.oicr.on.ca/cgi-bin/validate_gff3_online

Scott


On Fri, Aug 6, 2010 at 12:05 PM, Paul Stodghill
<[hidden email]> wrote:

> I'm trying to create a feature track that contains nested features,
> similar to the mRNA track in the Drosophila.
>
> Here is the GFF file that I am using as input,
>
> ##gff-version 3
> NC_004578       GenBank gene    8438    15223   .       +       1       ID=1489763;
> NC_004578       GenBank CDS     9000    10000   .       +       1       ID=9695423; Parent:1489763;
> NC_004578       GenBank CDS     11000   12000   .       +       1       ID=9695424; Parent:1489763;
>
> Here is how I am invoking  flatfile-to-json.pl,
>
> ./bin/flatfile-to-json.pl --gff2 test.gff --getType --getSubs
> --tracklabel test --key test --subfeatureClasses '{"CDS":
> "transcript-CDS"}'
>
> I can see that both trackData.json and subfeatures-1.json are being
> created in the right track directory.
>
> Here is what gets inserted into trackInfo.js
>
>   {
>      "url" : "data/tracks/{refseq}/test/trackData.json",
>      "type" : "FeatureTrack",
>      "label" : "test",
>      "key" : "test"
>   }
>
> For starters, I see that "subfeatures":true needs to be added to
> trackInfo.js, but what else?
>
> (I tried following the configuration provided for the Drosophila, but
> the syntax used for that example and for the for the config file
> reference documentation appear to be out of sync with the current
> implementation.)
>
> Thanks.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Gmod-ajax mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-ajax
>



--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: I give up. What is the magic to get subfeatures?

Mitch Skinner
In reply to this post by Paul Stodghill
  And once you've made the modifications that Scott recommends, it may
help to change the --gff2 parameter to --gff.  In this case, "--gff"
means GFF3.  When I wrote that code, I guess I was thinking of GFF3 as
being the typical version of GFF.  GFF3 was the first version JBrowse
supported, anyway, and when I added a separate code path for GFF2 then I
added the --gff2 parameter.

It's like the first part of the flatfile-to-json.pl usage message says:

USAGE: bin/flatfile-to-json.pl [--gff <gff3 file> | --gff2 <gff2 file> |
--bed <bed file>]

Sorry for any confusion,
Mitch

On 08/06/2010 09:05 AM, Paul Stodghill wrote:

> ##gff-version 3
> NC_004578 GenBank gene 8438 15223 . + 1 ID=1489763;
> NC_004578 GenBank CDS 9000 10000 . + 1 ID=9695423; Parent:1489763;
> NC_004578 GenBank CDS 11000 12000 . + 1 ID=9695424; Parent:1489763;
>
> Here is how I am invoking  flatfile-to-json.pl,
>
> ./bin/flatfile-to-json.pl --gff2 test.gff --getType --getSubs
> --tracklabel test --key test --subfeatureClasses '{"CDS":
> "transcript-CDS"}'
>


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: I give up. What is the magic to get subfeatures?

Mitch Skinner
In reply to this post by Paul Stodghill
  On 08/06/2010 09:05 AM, Paul Stodghill wrote:
> For starters, I see that "subfeatures":true needs to be added to
> trackInfo.js, but what else?

"subfeatures": true can go in the config file, yes, but it doesn't end
up in trackInfo.js, which is something else.

> (I tried following the configuration provided for the Drosophila, but
> the syntax used for that example and for the for the config file
> reference documentation appear to be out of sync with the current
> implementation.)

I'm not sure what specifically you're referring to here, but I'm
guessing that there may be some confusion related to the roles that the
different JS(ON) files play in JBrowse.

For biodb-to-json.pl, it goes:

JSON config file--->biodb-to-json.pl--->(one entry in data/trackInfo.js,
data/tracks/<refseq>/<tracklabel>/trackData.json, optionally
data/tracks/<refseq>/<tracklabel>/subfeatures-*.json)

for flatfile-to-json.pl, it goes:

command line parameters--->flatfile-to-json.pl--->(one entry in
data/trackInfo.js, data/tracks/<refseq>/<tracklabel>/trackData.json,
optionally data/tracks/<refseq>/<tracklabel>/subfeatures-*.json)

So the config file looks different from (and serves a different role
from) data/trackInfo.js.  The config file tells biodb-to-json.pl how to
generate the JSON for each track; trackInfo.js tells the client-side
javascript what tracks are available.

Regards,
Mitch

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: I give up. What is the magic to get subfeatures?

Paul Stodghill
In reply to this post by Scott Cain
That helped. With this new GFF file,

##gff-version 3
NC_004578 GenBank gene 8438 15223 . + 1 ID=1489763
NC_004578 GenBank CDS 9000 10000 . + 1 Parent=1489763
NC_004578 GenBank CDS 11000 12000 . + 1 Parent=1489763

and this command,

./bin/flatfile-to-json.pl --gff test.gff \
    --getType --getSubs --tracklabel test --key test \
    --subfeatureClasses '{"CDS": "transcript-CDS"}'

I am closer to the resutls that I want.

Thank you.

On Fri, Aug 6, 2010 at 1:10 PM, Scott Cain <[hidden email]> wrote:

> Hi Paul,
>
> Off hand, I don't know the details of JBrowse configuration, but I can
> tell you that you GFF is wrong.  The Parent part should look like the
> ID part, with tag=value, so the ninth column should look like this
> "ID=9695423;Parent=1489763".  Also, there is no need for the CDS
> features to have an ID unless those features have children as well;
> IDs are only for identifying parent-child relationships.  You might
> find the GFF3 validator useful:
>
>  http://modencode.oicr.on.ca/cgi-bin/validate_gff3_online
>
> Scott
>
>
> On Fri, Aug 6, 2010 at 12:05 PM, Paul Stodghill
> <[hidden email]> wrote:
>> I'm trying to create a feature track that contains nested features,
>> similar to the mRNA track in the Drosophila.
>>
>> Here is the GFF file that I am using as input,
>>
>> ##gff-version 3
>> NC_004578       GenBank gene    8438    15223   .       +       1       ID=1489763;
>> NC_004578       GenBank CDS     9000    10000   .       +       1       ID=9695423; Parent:1489763;
>> NC_004578       GenBank CDS     11000   12000   .       +       1       ID=9695424; Parent:1489763;
>>
>> Here is how I am invoking  flatfile-to-json.pl,
>>
>> ./bin/flatfile-to-json.pl --gff2 test.gff --getType --getSubs
>> --tracklabel test --key test --subfeatureClasses '{"CDS":
>> "transcript-CDS"}'
>>
>> I can see that both trackData.json and subfeatures-1.json are being
>> created in the right track directory.
>>
>> Here is what gets inserted into trackInfo.js
>>
>>   {
>>      "url" : "data/tracks/{refseq}/test/trackData.json",
>>      "type" : "FeatureTrack",
>>      "label" : "test",
>>      "key" : "test"
>>   }
>>
>> For starters, I see that "subfeatures":true needs to be added to
>> trackInfo.js, but what else?
>>
>> (I tried following the configuration provided for the Drosophila, but
>> the syntax used for that example and for the for the config file
>> reference documentation appear to be out of sync with the current
>> implementation.)
>>
>> Thanks.
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by
>>
>> Make an app they can't live without
>> Enter the BlackBerry Developer Challenge
>> http://p.sf.net/sfu/RIM-dev2dev
>> _______________________________________________
>> Gmod-ajax mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gmod-ajax
>>
>
>
>
> --
> ------------------------------------------------------------------------
> Scott Cain, Ph. D.                                   scott at scottcain dot net
> GMOD Coordinator (http://gmod.org/)                     216-392-3087
> Ontario Institute for Cancer Research
>

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: I give up. What is the magic to get subfeatures?

Paul Stodghill
In reply to this post by Mitch Skinner
Using --gff instead of --gff2 helps too. Thanks.

On Fri, Aug 6, 2010 at 1:51 PM, Mitch Skinner
<[hidden email]> wrote:

>  And once you've made the modifications that Scott recommends, it may help
> to change the --gff2 parameter to --gff.  In this case, "--gff" means GFF3.
>  When I wrote that code, I guess I was thinking of GFF3 as being the typical
> version of GFF.  GFF3 was the first version JBrowse supported, anyway, and
> when I added a separate code path for GFF2 then I added the --gff2
> parameter.
>
> It's like the first part of the flatfile-to-json.pl usage message says:
>
> USAGE: bin/flatfile-to-json.pl [--gff <gff3 file> | --gff2 <gff2 file> |
> --bed <bed file>]
>
> Sorry for any confusion,
> Mitch
>
> On 08/06/2010 09:05 AM, Paul Stodghill wrote:
>>
>> ##gff-version 3
>> NC_004578       GenBank gene    8438    15223   .       +       1
>> ID=1489763;
>> NC_004578       GenBank CDS     9000    10000   .       +       1
>> ID=9695423; Parent:1489763;
>> NC_004578       GenBank CDS     11000   12000   .       +       1
>> ID=9695424; Parent:1489763;
>>
>> Here is how I am invoking  flatfile-to-json.pl,
>>
>> ./bin/flatfile-to-json.pl --gff2 test.gff --getType --getSubs
>> --tracklabel test --key test --subfeatureClasses '{"CDS":
>> "transcript-CDS"}'
>>
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax