How to access subroutines declared in GBrowse.conf init_code from other datasources.conf files

How to access subroutines declared in GBrowse.conf init_code from other datasources.conf files

Hi

I have problems in accessing the subroutines declared in init_code of
GBrowse.conf from other datasource.conf files.
I get 'Undefined subroutine'. I tried giving package name to the
init_code and called the subroutines in other datasources.conf files
with full package name. Still get the same error.

Earlier with 1.79, we used to initialize in each datasource.conf files
and it was not a problem. Wanted to take advantage of the centralized
GBrowse.conf and thought of moving all the init_code stuffs to it. But
couldn't access it from other confs. Does anyone have concrete
examples that is working with subroutines declared in init_code?

Re: How to access subroutines declared in GBrowse.conf init_code from other datasources.conf files

In continuation with the above,

I get the below error

An error occurred while evaluating the callback at section='Example
Region', option='link':
=> Undefined subroutine
&Bio__Graphics__Browser2__DataSource_HASH_0x4b765d0_::mySubroutine
called at (eval 151) line 8.
at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205

> Hi
>
> I have problems in accessing the subroutines declared in init_code of
> GBrowse.conf from other datasource.conf files.
> I get 'Undefined subroutine'. I tried giving package name to the
> init_code and called the subroutines in other datasources.conf files
> with full package name. Still get the same error.
>
> Earlier with 1.79, we used to initialize in each datasource.conf files
> and it was not a problem. Wanted to take advantage of the centralized
> GBrowse.conf and thought of moving all the init_code stuffs to it. But
> couldn't access it from other confs. Does anyone have concrete
> examples that is working with subroutines declared in init_code?
>
> Thanks and Regards
> Prem
>

An error occurred while evaluating the callback at section='Example
Region', option='link':
=> Undefined subroutine
&Bio__Graphics__Browser2__DataSource_HASH_0x4b765d0_::mySubroutine
called at (eval 151) line 8.
at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205

> Hi
>
> I have problems in accessing the subroutines declared in init_code of
> GBrowse.conf from other datasource.conf files.
> I get 'Undefined subroutine'. I tried giving package name to the
> init_code and called the subroutines in other datasources.conf files
> with full package name. Still get the same error.
>
> Earlier with 1.79, we used to initialize in each datasource.conf files
> and it was not a problem. Wanted to take advantage of the centralized
> GBrowse.conf and thought of moving all the init_code stuffs to it. But
> couldn't access it from other confs. Does anyone have concrete
> examples that is working with subroutines declared in init_code?
>
> Thanks and Regards
> Prem
>

Re: How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files

> Hi Prem,
> Yes, this error occurs when it isn't able to recognize your subroutine
>
> This is how it should be.. attached herewith..
>
> Pushkala Jayaraman
> Programmer/Analyst
> Rat Genome Database
> Human and Molecular Genetics Center
> Medical College of Wisconsin
> Email: [hidden email]> Work: 414-955-2229
> www.rgd.mcw.edu
>
>
> -----Original Message-----
> From: Prem Anand [mailto:[hidden email]]
> Sent: Friday, June 25, 2010 7:14 AM
> To: [hidden email]> Subject: Re: [Gmod-gbrowse] How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files
>
> In continuation with the above,
>
> I get the below error
>
> An error occurred while evaluating the callback at section='Example
> Region', option='link':
> => Undefined subroutine
> &Bio__Graphics__Browser2__DataSource_HASH_0x4b765d0_::mySubroutine
> called at (eval 151) line 8.
> at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205
>
> Thanks
> Prem
>
> On Fri, Jun 25, 2010 at 11:54 AM, Prem Anand <[hidden email]> wrote:
>> Hi
>>
>> I have problems in accessing the subroutines declared in init_code of
>> GBrowse.conf from other datasource.conf files.
>> I get 'Undefined subroutine'. I tried giving package name to the
>> init_code and called the subroutines in other datasources.conf files
>> with full package name. Still get the same error.
>>
>> Earlier with 1.79, we used to initialize in each datasource.conf files
>> and it was not a problem. Wanted to take advantage of the centralized
>> GBrowse.conf and thought of moving all the init_code stuffs to it. But
>> couldn't access it from other confs. Does anyone have concrete
>> examples that is working with subroutines declared in init_code?
>>
>> Thanks and Regards
>> Prem
>>
>
> ------------------------------------------------------------------------------
> 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-gbrowse mailing list
> [hidden email]> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse>

Re: How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files

I did try the way you did with the callbacks. It still doesn't work. I
keep getting this error.
An error occurred while evaluating the callback at section=Example
STANZA', option='link':
=> Undefined subroutine
&Bio__Graphics__Browser2__DataSource_HASH_0x26a7cf0_::mySubRoutine
called at (eval 134) line 9.
at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205

I tried putting the call backs under init_code in GBrowseConf and also
separately by putting them in a separate datasource file. It doesn't
work in both cases.

> Hi Prem,
> Yes, this error occurs when it isn't able to recognize your subroutine
>
> This is how it should be.. attached herewith..
>
> Pushkala Jayaraman
> Programmer/Analyst
> Rat Genome Database
> Human and Molecular Genetics Center
> Medical College of Wisconsin
> Email: [hidden email]> Work: 414-955-2229
> www.rgd.mcw.edu
>
>
> -----Original Message-----
> From: Prem Anand [mailto:[hidden email]]
> Sent: Friday, June 25, 2010 7:14 AM
> To: [hidden email]> Subject: Re: [Gmod-gbrowse] How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files
>
> In continuation with the above,
>
> I get the below error
>
> An error occurred while evaluating the callback at section='Example
> Region', option='link':
> => Undefined subroutine
> &Bio__Graphics__Browser2__DataSource_HASH_0x4b765d0_::mySubroutine
> called at (eval 151) line 8.
> at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205
>
> Thanks
> Prem
>
> On Fri, Jun 25, 2010 at 11:54 AM, Prem Anand <[hidden email]> wrote:
>> Hi
>>
>> I have problems in accessing the subroutines declared in init_code of
>> GBrowse.conf from other datasource.conf files.
>> I get 'Undefined subroutine'. I tried giving package name to the
>> init_code and called the subroutines in other datasources.conf files
>> with full package name. Still get the same error.
>>
>> Earlier with 1.79, we used to initialize in each datasource.conf files
>> and it was not a problem. Wanted to take advantage of the centralized
>> GBrowse.conf and thought of moving all the init_code stuffs to it. But
>> couldn't access it from other confs. Does anyone have concrete
>> examples that is working with subroutines declared in init_code?
>>
>> Thanks and Regards
>> Prem
>>
>
> ------------------------------------------------------------------------------
> 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-gbrowse mailing list
> [hidden email]> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse>

Re: How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files

Wait,
Gbrowse.conf will no longer carry any code except base configuration.
Please do send me your config file.. I will take a look.. I think it may be a very obvious error elsewhere that isn't letting it access the callbacks.. Ive come across this problem a million times.. It takes a while to debug.

I did try the way you did with the callbacks. It still doesn't work. I
keep getting this error.
An error occurred while evaluating the callback at section=Example
STANZA', option='link':
=> Undefined subroutine
&Bio__Graphics__Browser2__DataSource_HASH_0x26a7cf0_::mySubRoutine
called at (eval 134) line 9.
at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205

I tried putting the call backs under init_code in GBrowseConf and also
separately by putting them in a separate datasource file. It doesn't
work in both cases.

> Hi Prem,
> Yes, this error occurs when it isn't able to recognize your subroutine
>
> This is how it should be.. attached herewith..
>
> Pushkala Jayaraman
> Programmer/Analyst
> Rat Genome Database
> Human and Molecular Genetics Center
> Medical College of Wisconsin
> Email: [hidden email]> Work: 414-955-2229
> www.rgd.mcw.edu
>
>
> -----Original Message-----
> From: Prem Anand [mailto:[hidden email]]
> Sent: Friday, June 25, 2010 7:14 AM
> To: [hidden email]> Subject: Re: [Gmod-gbrowse] How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files
>
> In continuation with the above,
>
> I get the below error
>
> An error occurred while evaluating the callback at section='Example
> Region', option='link':
> => Undefined subroutine
> &Bio__Graphics__Browser2__DataSource_HASH_0x4b765d0_::mySubroutine
> called at (eval 151) line 8.
> at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205
>
> Thanks
> Prem
>
> On Fri, Jun 25, 2010 at 11:54 AM, Prem Anand <[hidden email]> wrote:
>> Hi
>>
>> I have problems in accessing the subroutines declared in init_code of
>> GBrowse.conf from other datasource.conf files.
>> I get 'Undefined subroutine'. I tried giving package name to the
>> init_code and called the subroutines in other datasources.conf files
>> with full package name. Still get the same error.
>>
>> Earlier with 1.79, we used to initialize in each datasource.conf files
>> and it was not a problem. Wanted to take advantage of the centralized
>> GBrowse.conf and thought of moving all the init_code stuffs to it. But
>> couldn't access it from other confs. Does anyone have concrete
>> examples that is working with subroutines declared in init_code?
>>
>> Thanks and Regards
>> Prem
>>
>
> ------------------------------------------------------------------------------
> 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-gbrowse mailing list
> [hidden email]> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse>

Re: How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files

Thanks Pushkala,

Infact, I had the init_code, and some header and footer code in
GBrowse.conf and tried to access it from other conf. Thought it's the
right place to put to avoid replicating the code in all the confs.
Anyhow, as you have suggested, I have removed all the code from
GBrowse.conf and tried again. But it didn't work. We have been using
the callbacks for quite a while with GBrowse 1.x. But with GBrowse
2.x, not able to make even a simple call.

Have attached two GBrowse.conf and Rn_RGSC3.4.conf, both has just the
basic stuffs and a very simple callback method testInit defined under
init_code. I somehow wanted to get access to the value returned by
testInit method.

Re: How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files

Still having problems with calling code initialised in init_code with
renderfarm enabled and getting 'Undefined subroutine' error.

I am able to call the subroutines initialised in init_code (thanks to
your earlier tips), if I disable the renderfarm and use only the
Master server. Also am able to call other callbacks(if not using the
subroutines in init_code) even with renderfarm enabled. I have issues
only with the code in init_code. Is there any restrictions for the
gbrowse_slaves to get access to these code?
Or is it a namespace issue?

I have seen some of your earlier posts where you had issues with
SELinux, security,ports and gbrowse_slaves etc.,. during your
installation. We are also running gbrowse on our vms(ubuntu) and as
we don't use SELinux, not sure if it is related.

If you have come across this issue please do let me know if there is a
way around.

Still having problems with calling code initialised in init_code with
renderfarm enabled and getting 'Undefined subroutine' error.

I am able to call the subroutines initialised in init_code (thanks to
your earlier tips), if I disable the renderfarm and use only the
Master server. Also am able to call other callbacks(if not using the
subroutines in init_code) even with renderfarm enabled. I have issues
only with the code in init_code. Is there any restrictions for the
gbrowse_slaves to get access to these code?
Or is it a namespace issue?

I have seen some of your earlier posts where you had issues with
SELinux, security,ports and gbrowse_slaves etc.,. during your
installation. We are also running gbrowse on our vms(ubuntu) and as
we don't use SELinux, not sure if it is related.

If you have come across this issue please do let me know if there is a
way around.

Many ThanksPrem

On Mon, Jun 28, 2010 at 4:16 PM, Jayaraman, Pushkala <[hidden email]> wrote:
> Wait,
> Gbrowse.conf will no longer carry any code except base configuration.
> Please do send me your config file.. I will take a look.. I think it may be a very obvious error elsewhere that isn't letting it access the callbacks.. Ive come across this problem a million times.. It takes a while to debug.
>
>
> Pushkala Jayaraman
> Programmer/Analyst
> Rat Genome Database
> Human and Molecular Genetics Center
> Medical College of Wisconsin
> Email: [hidden email]
> Work: 414-955-2229
> www.rgd.mcw.edu
>
>
> -----Original Message-----
> From: Prem Anand [mailto:[hidden email]]
> Sent: Monday, June 28, 2010 10:00 AM
> To: Jayaraman, Pushkala
> Cc: [hidden email]
> Subject: Re: [Gmod-gbrowse] How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files
>
> Hi Pushkala
>
> I did try the way you did with the callbacks. It still doesn't work. I
> keep getting this error.
> An error occurred while evaluating the callback at section=Example
> STANZA', option='link':
> => Undefined subroutine
> &Bio__Graphics__Browser2__DataSource_HASH_0x26a7cf0_::mySubRoutine
> called at (eval 134) line 9.
> at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205
>
> I tried putting the call backs under init_code in GBrowseConf and also
> separately by putting them in a separate datasource file. It doesn't
> work in both cases.
>
> Thanks
> Prem
> On Fri, Jun 25, 2010 at 5:15 PM, Jayaraman, Pushkala <[hidden email]> wrote:
>> Hi Prem,
>> Yes, this error occurs when it isn't able to recognize your subroutine
>>
>> This is how it should be.. attached herewith..
>>
>> Pushkala Jayaraman
>> Programmer/Analyst
>> Rat Genome Database
>> Human and Molecular Genetics Center
>> Medical College of Wisconsin
>> Email: [hidden email]
>> Work: 414-955-2229
>> www.rgd.mcw.edu
>>
>>
>> -----Original Message-----
>> From: Prem Anand [mailto:[hidden email]]
>> Sent: Friday, June 25, 2010 7:14 AM
>> To: [hidden email]
>> Subject: Re: [Gmod-gbrowse] How to access subroutines declared inGBrowse.conf init_code from other datasources.conf files
>>
>> In continuation with the above,
>>
>> I get the below error
>>
>> An error occurred while evaluating the callback at section='Example
>> Region', option='link':
>> => Undefined subroutine
>> &Bio__Graphics__Browser2__DataSource_HASH_0x4b765d0_::mySubroutine
>> called at (eval 151) line 8.
>> at /usr/local/lib/perl/5.8.8/Bio/Graphics/Browser2/RenderPanels.pm line 2205
>>
>> Thanks
>> Prem
>>
>> On Fri, Jun 25, 2010 at 11:54 AM, Prem Anand <[hidden email]> wrote:
>>> Hi
>>>
>>> I have problems in accessing the subroutines declared in init_code of
>>> GBrowse.conf from other datasource.conf files.
>>> I get 'Undefined subroutine'. I tried giving package name to the
>>> init_code and called the subroutines in other datasources.conf files
>>> with full package name. Still get the same error.
>>>
>>> Earlier with 1.79, we used to initialize in each datasource.conf files
>>> and it was not a problem. Wanted to take advantage of the centralized
>>> GBrowse.conf and thought of moving all the init_code stuffs to it. But
>>> couldn't access it from other confs. Does anyone have concrete
>>> examples that is working with subroutines declared in init_code?
>>>
>>> Thanks and Regards
>>> Prem
>>>
>>
>> ------------------------------------------------------------------------------
>> 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-gbrowse mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
>>
>