URL links in gbrowse 2, cont

View: New views
3 Messages — Rating Filter:   Alert me  

URL links in gbrowse 2, cont

by Maureen J. Donlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've continued to play with the code trying to get this simple URL
link to work.
I tried putting the link within  the subroutine that pulls out the
GeneID, but now all it does is take me to the gbrowse_details page,
but still does NOT link to the Gene database.

[GENE]
feature      = gene
glyph        = arrow
fgcolor      = red
linewidth    = 2
height       = 6
description  = sub {
        my $feature = shift;
        return $feature->attributes('geneid');
        link =  "http://www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term="$feature
        }
key          = Annotated Genes


Can anyone tell me why this link doesn't work and how I can fix it?
I've attached the conf file in case that helps.


Thanks,
Maureen

--
Maureen J. Donlin, Ph.D.

Research Associate Professor
Dept. of Biochemistry & Molecular Biology
Dept. of Molecular Microbiology & Immunology
Saint Louis University School of Medicine
507 Doisy Research Center
314-977-8858


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gmod-gbrowse mailing list
Gmod-gbrowse@...
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

drad2.conf (5K) Download Attachment

Re: URL links in gbrowse 2, cont

by Lincoln Stein-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Maureen,

I think you are misunderstanding how the callback works. You want to do this instead:

[GENE]
feature      = gene
glyph        = arrow
fgcolor      = red
linewidth    = 2
height       = 6
description  = sub {
       my $feature = shift;
       return $feature->attributes('geneid')
  }
link = sub {
       my $feature = shift;
       my ($geneid) = $feature->attributes('geneid');
       return "http://www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term=$geneid";
   }
key          = Annotated Genes
Lincoln

On Fri, Sep 4, 2009 at 4:05 PM, Maureen Donlin <donlinmj@...> wrote:
I've continued to play with the code trying to get this simple URL
link to work.
I tried putting the link within  the subroutine that pulls out the
GeneID, but now all it does is take me to the gbrowse_details page,
but still does NOT link to the Gene database.

[GENE]
feature      = gene
glyph        = arrow
fgcolor      = red
linewidth    = 2
height       = 6
description  = sub {
       my $feature = shift;
       return $feature->attributes('geneid');
       link            =  "http://www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term="$feature
       }
key          = Annotated Genes


Can anyone tell me why this link doesn't work and how I can fix it?
I've attached the conf file in case that helps.


Thanks,
Maureen

--
Maureen J. Donlin, Ph.D.

Research Associate Professor
Dept. of Biochemistry & Molecular Biology
Dept. of Molecular Microbiology & Immunology
Saint Louis University School of Medicine
507 Doisy Research Center
314-977-8858

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gmod-gbrowse mailing list
Gmod-gbrowse@...
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse




--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <Renata.Musa@...>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gmod-gbrowse mailing list
Gmod-gbrowse@...
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

Re: URL links in gbrowse 2, cont

by Maureen J. Donlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lincoln,

Thanks so very much.  Yes, that took care of the problem.

Regards and have a nice weekend.

Maureen

On Fri, Sep 4, 2009 at 3:10 PM, Lincoln Stein<lincoln.stein@...> wrote:

> Hi Maureen,
>
> I think you are misunderstanding how the callback works. You want to do this
> instead:
>
> [GENE]
> feature      = gene
> glyph        = arrow
> fgcolor      = red
> linewidth    = 2
> height       = 6
> description  = sub {
>        my $feature = shift;
>        return $feature->attributes('geneid')
>   }
> link = sub {
>        my $feature = shift;
>        my ($geneid) = $feature->attributes('geneid');
>        return
> "http://www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term=$geneid";
>    }
> key          = Annotated Genes
>
> Lincoln
>
> On Fri, Sep 4, 2009 at 4:05 PM, Maureen Donlin <donlinmj@...> wrote:
>>
>> I've continued to play with the code trying to get this simple URL
>> link to work.
>> I tried putting the link within  the subroutine that pulls out the
>> GeneID, but now all it does is take me to the gbrowse_details page,
>> but still does NOT link to the Gene database.
>>
>> [GENE]
>> feature      = gene
>> glyph        = arrow
>> fgcolor      = red
>> linewidth    = 2
>> height       = 6
>> description  = sub {
>>        my $feature = shift;
>>        return $feature->attributes('geneid');
>>        link            =
>>  "http://www.ncbi.nlm.nih.gov/sites/entrez?db=gene&cmd=search&term="$feature
>>        }
>> key          = Annotated Genes
>>
>>
>> Can anyone tell me why this link doesn't work and how I can fix it?
>> I've attached the conf file in case that helps.
>>
>>
>> Thanks,
>> Maureen
>>
>> --
>> Maureen J. Donlin, Ph.D.
>>
>> Research Associate Professor
>> Dept. of Biochemistry & Molecular Biology
>> Dept. of Molecular Microbiology & Immunology
>> Saint Louis University School of Medicine
>> 507 Doisy Research Center
>> 314-977-8858
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Gmod-gbrowse mailing list
>> Gmod-gbrowse@...
>> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
>>
>
>
>
> --
> Lincoln D. Stein
> Director, Informatics and Biocomputing Platform
> Ontario Institute for Cancer Research
> 101 College St., Suite 800
> Toronto, ON, Canada M5G0A3
> 416 673-8514
> Assistant: Renata Musa <Renata.Musa@...>
>



--
Maureen J. Donlin, Ph.D.

Research Associate Professor
Dept. of Biochemistry & Molecular Biology
Dept. of Molecular Microbiology & Immunology
Saint Louis University School of Medicine
507 Doisy Research Center
314-977-8858

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gmod-gbrowse mailing list
Gmod-gbrowse@...
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse