[Gmod-ajax] extraData

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

[Gmod-ajax] extraData

Mariette
Hi everyone,
I have a jbrowse track where features have a urlTemplate,
so my config file looks like this :

{
  "description": "data",
  "db_adaptor": "Bio::DB::SeqFeature::Store",
  "db_args": { "-adaptor": "memory",
               "-dir": "/path/" },

  "TRACK DEFAULTS": {
    "class": "feature",
    "autocomplete": "all"
  },

  "tracks": [
    {
      "track": "ncRNA",
      "key": "ncRNA",
      "feature": ["ncRNA"],
      "class": "feature5",
      "urlTemplate": "http://url/index?id={name}",
    }
  ]
}
what is working with a gff looking like this :
sample    tRNAscan-SE    ncRNA    16995    17070    91.83    +    .    
Name=000002
sample    tRNAscan-SE    ncRNA    17079    17163    67.63    +    .    
Name=000003
...

however, I'd like the display name is different than the link value ! So
I change for this :

  "tracks": [
    {
      "track": "ncRNA",
      "key": "ncRNA",
      "feature": ["ncRNA"],
      "class": "feature5",
      "urlTemplate": "http://url/index?id={load_id}",
      "extraData": {"load_id": "sub {shift->attributes(\"load_id\");}"}
    }
with this gff :
sample    tRNAscan-SE    ncRNA    16995    17070    91.83    +    .    
Name=test1;load_id=000002
sample    tRNAscan-SE    ncRNA    17079    17163    67.63    +    .    
Name=test2;load_id=000003
...


In the trackData.json, I do have the header looking like this :
"headers":["start","end","strand","id","name","load_id"]

but the values doesn't integrate the load_id ! I'm guessing the probleme
is coming from the sub but I have no idea how to fixe this.
any help,
thx,

Jerome


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: extraData

Mariette

ok I use "alias" instead of "load_id" (which was used in a jbrowse exemple)
and it's working just fine !

thx,
Jerome





Mariette a écrit :

> Hi everyone,
> I have a jbrowse track where features have a urlTemplate,
> so my config file looks like this :
>
> {
>   "description": "data",
>   "db_adaptor": "Bio::DB::SeqFeature::Store",
>   "db_args": { "-adaptor": "memory",
>                "-dir": "/path/" },
>
>   "TRACK DEFAULTS": {
>     "class": "feature",
>     "autocomplete": "all"
>   },
>
>   "tracks": [
>     {
>       "track": "ncRNA",
>       "key": "ncRNA",
>       "feature": ["ncRNA"],
>       "class": "feature5",
>       "urlTemplate": "http://url/index?id={name}",
>     }
>   ]
> }
> what is working with a gff looking like this :
> sample    tRNAscan-SE    ncRNA    16995    17070    91.83    +    .    
> Name=000002
> sample    tRNAscan-SE    ncRNA    17079    17163    67.63    +    .    
> Name=000003
> ...
>
> however, I'd like the display name is different than the link value ! So
> I change for this :
>
>   "tracks": [
>     {
>       "track": "ncRNA",
>       "key": "ncRNA",
>       "feature": ["ncRNA"],
>       "class": "feature5",
>       "urlTemplate": "http://url/index?id={load_id}",
>       "extraData": {"load_id": "sub {shift->attributes(\"load_id\");}"}
>     }
> with this gff :
> sample    tRNAscan-SE    ncRNA    16995    17070    91.83    +    .    
> Name=test1;load_id=000002
> sample    tRNAscan-SE    ncRNA    17079    17163    67.63    +    .    
> Name=test2;load_id=000003
> ...
>
>
> In the trackData.json, I do have the header looking like this :
> "headers":["start","end","strand","id","name","load_id"]
>
> but the values doesn't integrate the load_id ! I'm guessing the probleme
> is coming from the sub but I have no idea how to fixe this.
> any help,
> thx,
>
> Jerome
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev 
> _______________________________________________
> Gmod-ajax mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-ajax
>  


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax