Re: [GMOD-devel] Accessing Alias variable for links

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

Re: [GMOD-devel] Accessing Alias variable for links

Scott Cain
Hi Scooter,

I'm ccing this to the GBrowse mailing list...

Certainly, the first thing you wrote won't work; there is no magic
$alias variable like the $name and $description variable for GBrowse
conf files.

The second thing should work though, unless this is in an uploaded GFF
file.  Does the apache error log give any indication that there is a
problem with processing that conf file?

Scott


On Wed, Jun 30, 2010 at 4:23 PM, Scooter Willis <[hidden email]> wrote:

> Scott
>
> If I have the following then I get the mouse pointer to change but it does
> not resolve the alias tag. If I replace with $name then it resolves to the
> name but it is not the name that uniprot understands.
>
> link         = http://www.uniprot.org/uniprot/$alias
>
> I tried the example below and results in no link being assigned to the
> glyph.
>
> If I do this as an example then no link gets assigned. It appears the code
> is not being evaluated.
>
> link         = sub {
>         return 'http://www.uniprot.org';
>         }
>
> Any suggestions?
>
> Thanks
>
> Scooter
>
>
> On 6/15/10 10:59 AM, "Scott Cain" <[hidden email]> wrote:
>
> Hi Scooter,
>
> You can use a perl callback to build the url, something like this:
>
> link  = sub {
>       my $f = shift;
>       my ($alias) = $obj->get_tag_values('Alias') if $obj->has_tag('Alias');
>       my $url = "http://google.com/?q=$alias";
>       return $url;
>   }
>
> Scott
>
>
> On Tue, Jun 15, 2010 at 10:37 AM, Scooter Willis <[hidden email]>
> wrote:
>>
>> I would like to use the value of the Alias value in the gff3 track to
>> build
>> a custom external link. It does not appear that Alias is being exported.
>> What gff3 attributes are being exported that I can use for building links
>> to
>> external servers? I am trying to associate a uniprot id with a predicted
>> gene where I can’t use ID or Name because that has implied meaning. Alias
>> seems like the proper use but does not appear to be working in gbrowse2.
>> Happy to use a different variable name but can’t find any docs on what the
>> options are.
>>
>> Thanks
>>
>> Scooter
>>
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Gmod-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gmod-devel
>>
>>
>
>
>
> --
> ------------------------------------------------------------------------
> Scott Cain, Ph. D.                                   scott at scottcain dot
> net
> GMOD Coordinator (http://gmod.org/)                     216-392-3087
> Ontario Institute for Cancer Research
>
>



--
------------------------------------------------------------------------
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [GMOD-devel] Accessing Alias variable for links

Scott Cain
Hi Scooter,

When I tried this method with one of my databases:

link         = sub {
                my $f = shift;
                my ($alias) = $f->synonyms;  #this is a chado specific
method, "aliases" should work
                return "http://www.google.com/?q=$alias"; #this url
doesn't work though
   }

and it worked.  The only thing I could think of that would cause a
problem with this is if you also have a "balloon click" option
declared as well, as the two conflict.  That might also be the case if
there is a balloon click directive in the TRACK DEFAULTS section as
well.

Scott


On Wed, Jun 30, 2010 at 4:45 PM, Scooter Willis <[hidden email]> wrote:

> Scott
>
> No error message and track loads as expected. It is not an uploaded GFF file. If I replace with $name then it works.
>
> Scooter
> ________________________________________
> From: Scott Cain [[hidden email]]
> Sent: Wednesday, June 30, 2010 4:31 PM
> To: Scooter Willis
> Cc: [hidden email]; Gbrowse (E-mail)
> Subject: Re: [GMOD-devel] Accessing Alias variable for links
>
> Hi Scooter,
>
> I'm ccing this to the GBrowse mailing list...
>
> Certainly, the first thing you wrote won't work; there is no magic
> $alias variable like the $name and $description variable for GBrowse
> conf files.
>
> The second thing should work though, unless this is in an uploaded GFF
> file.  Does the apache error log give any indication that there is a
> problem with processing that conf file?
>
> Scott
>
>
> On Wed, Jun 30, 2010 at 4:23 PM, Scooter Willis <[hidden email]> wrote:
>> Scott
>>
>> If I have the following then I get the mouse pointer to change but it does
>> not resolve the alias tag. If I replace with $name then it resolves to the
>> name but it is not the name that uniprot understands.
>>
>> link         = http://www.uniprot.org/uniprot/$alias
>>
>> I tried the example below and results in no link being assigned to the
>> glyph.
>>
>> If I do this as an example then no link gets assigned. It appears the code
>> is not being evaluated.
>>
>> link         = sub {
>>         return 'http://www.uniprot.org';
>>         }
>>
>> Any suggestions?
>>
>> Thanks
>>
>> Scooter
>>
>>
>> On 6/15/10 10:59 AM, "Scott Cain" <[hidden email]> wrote:
>>
>> Hi Scooter,
>>
>> You can use a perl callback to build the url, something like this:
>>
>> link  = sub {
>>       my $f = shift;
>>       my ($alias) = $obj->get_tag_values('Alias') if $obj->has_tag('Alias');
>>       my $url = "http://google.com/?q=$alias";
>>       return $url;
>>   }
>>
>> Scott
>>
>>
>> On Tue, Jun 15, 2010 at 10:37 AM, Scooter Willis <[hidden email]>
>> wrote:
>>>
>>> I would like to use the value of the Alias value in the gff3 track to
>>> build
>>> a custom external link. It does not appear that Alias is being exported.
>>> What gff3 attributes are being exported that I can use for building links
>>> to
>>> external servers? I am trying to associate a uniprot id with a predicted
>>> gene where I can’t use ID or Name because that has implied meaning. Alias
>>> seems like the proper use but does not appear to be working in gbrowse2.
>>> Happy to use a different variable name but can’t find any docs on what the
>>> options are.
>>>
>>> Thanks
>>>
>>> Scooter
>>>
>>> ------------------------------------------------------------------------------
>>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>>> lucky parental unit.  See the prize list and enter to win:
>>> http://p.sf.net/sfu/thinkgeek-promo
>>> _______________________________________________
>>> Gmod-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gmod-devel
>>>
>>>
>>
>>
>>
>> --
>> ------------------------------------------------------------------------
>> Scott Cain, Ph. D.                                   scott at scottcain dot
>> net
>> GMOD Coordinator (http://gmod.org/)                     216-392-3087
>> Ontario Institute for Cancer Research
>>
>>
>
>
>
> --
> ------------------------------------------------------------------------
> Scott Cain, Ph. D.                                   scott at scottcain dot net
> GMOD Coordinator (http://gmod.org/)                     216-392-3087
> Ontario Institute for Cancer Research
>



--
------------------------------------------------------------------------
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [GMOD-devel] Accessing Alias variable for links

Scooter Willis-2
Scott

I will give that code a try. If I leave the link = http://www.google.com/?q=$name then that works. It only seems to be a problem when doing the code which could indicate a problem with the code. I will try your example and see what happens.

Scooter

________________________________________
From: Scott Cain [[hidden email]]
Sent: Wednesday, June 30, 2010 5:19 PM
To: Scooter Willis
Cc: Gbrowse (E-mail)
Subject: Re: [GMOD-devel] Accessing Alias variable for links

Hi Scooter,

When I tried this method with one of my databases:

link         = sub {
                my $f = shift;
                my ($alias) = $f->synonyms;  #this is a chado specific
method, "aliases" should work
                return "http://www.google.com/?q=$alias"; #this url
doesn't work though
   }

and it worked.  The only thing I could think of that would cause a
problem with this is if you also have a "balloon click" option
declared as well, as the two conflict.  That might also be the case if
there is a balloon click directive in the TRACK DEFAULTS section as
well.

Scott


On Wed, Jun 30, 2010 at 4:45 PM, Scooter Willis <[hidden email]> wrote:

> Scott
>
> No error message and track loads as expected. It is not an uploaded GFF file. If I replace with $name then it works.
>
> Scooter
> ________________________________________
> From: Scott Cain [[hidden email]]
> Sent: Wednesday, June 30, 2010 4:31 PM
> To: Scooter Willis
> Cc: [hidden email]; Gbrowse (E-mail)
> Subject: Re: [GMOD-devel] Accessing Alias variable for links
>
> Hi Scooter,
>
> I'm ccing this to the GBrowse mailing list...
>
> Certainly, the first thing you wrote won't work; there is no magic
> $alias variable like the $name and $description variable for GBrowse
> conf files.
>
> The second thing should work though, unless this is in an uploaded GFF
> file.  Does the apache error log give any indication that there is a
> problem with processing that conf file?
>
> Scott
>
>
> On Wed, Jun 30, 2010 at 4:23 PM, Scooter Willis <[hidden email]> wrote:
>> Scott
>>
>> If I have the following then I get the mouse pointer to change but it does
>> not resolve the alias tag. If I replace with $name then it resolves to the
>> name but it is not the name that uniprot understands.
>>
>> link         = http://www.uniprot.org/uniprot/$alias
>>
>> I tried the example below and results in no link being assigned to the
>> glyph.
>>
>> If I do this as an example then no link gets assigned. It appears the code
>> is not being evaluated.
>>
>> link         = sub {
>>         return 'http://www.uniprot.org';
>>         }
>>
>> Any suggestions?
>>
>> Thanks
>>
>> Scooter
>>
>>
>> On 6/15/10 10:59 AM, "Scott Cain" <[hidden email]> wrote:
>>
>> Hi Scooter,
>>
>> You can use a perl callback to build the url, something like this:
>>
>> link  = sub {
>>       my $f = shift;
>>       my ($alias) = $obj->get_tag_values('Alias') if $obj->has_tag('Alias');
>>       my $url = "http://google.com/?q=$alias";
>>       return $url;
>>   }
>>
>> Scott
>>
>>
>> On Tue, Jun 15, 2010 at 10:37 AM, Scooter Willis <[hidden email]>
>> wrote:
>>>
>>> I would like to use the value of the Alias value in the gff3 track to
>>> build
>>> a custom external link. It does not appear that Alias is being exported.
>>> What gff3 attributes are being exported that I can use for building links
>>> to
>>> external servers? I am trying to associate a uniprot id with a predicted
>>> gene where I can’t use ID or Name because that has implied meaning. Alias
>>> seems like the proper use but does not appear to be working in gbrowse2.
>>> Happy to use a different variable name but can’t find any docs on what the
>>> options are.
>>>
>>> Thanks
>>>
>>> Scooter
>>>
>>> ------------------------------------------------------------------------------
>>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>>> lucky parental unit.  See the prize list and enter to win:
>>> http://p.sf.net/sfu/thinkgeek-promo
>>> _______________________________________________
>>> Gmod-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gmod-devel
>>>
>>>
>>
>>
>>
>> --
>> ------------------------------------------------------------------------
>> Scott Cain, Ph. D.                                   scott at scottcain dot
>> net
>> GMOD Coordinator (http://gmod.org/)                     216-392-3087
>> Ontario Institute for Cancer Research
>>
>>
>
>
>
> --
> ------------------------------------------------------------------------
> Scott Cain, Ph. D.                                   scott at scottcain dot net
> GMOD Coordinator (http://gmod.org/)                     216-392-3087
> Ontario Institute for Cancer Research
>



--
------------------------------------------------------------------------
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse