|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
question about give different color glyph to entries that are in the same featureHi all,
If I want that for different ID pattern, the graph display different color,what should I do, since I try my code as follows but it does not work: feature = region:omim glyph = box bgcolor = sub { my $f = shift; my ($name) = $f->attributes('ID'); if ($name =~ /omim/) {return 'cyan' ;} retun 'red'; } The data is like following: chr1 omim region 1224571 144979554 . + . ID=decipher4083;Note=1q21.1 recurrent microduplication (possible susceptiblity locus for neurodevelopmental disorders) chr1 omim region 2149993 2231511 . + . ID=omim1949;omimgene=164780;omimdisease=0;gene=SKI;Note=SKI-1p36 deletion syndrome The error_log shows the following error: An error occurred while evaluating the callback at section='OMIM', option='bgcolor':, referer: http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ => Missing right curly or square bracket at (eval 91) line 4, at end of line, referer: http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ syntax error at (eval 91) line 4, at EOF, referer: http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ at /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/Bio/Graphics/Browser.pm line 245, referer: http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ Thank you very much! Yours Josh ------------------------------------------------------------------------------ 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: question about give different color glyph to entries that are in the same featureHi Josh,
I think the problem is that the } on the last line does not have any whitespace in front of it. Add a blank or a tab and rerun. GBrowse treats anything that starts with leading whitespace as a continuation of the previous line. Dave C. On Wed, Sep 9, 2009 at 8:11 PM, 陈冠华 <cghhust@...> wrote: > Hi all, > > If I want that for different ID pattern, the graph display different > color,what should I do, since I try my code as follows but it does not work: > > feature = region:omim > glyph = box > bgcolor = sub { my $f = shift; my ($name) = $f->attributes('ID'); > if ($name =~ /omim/) {return 'cyan' ;} > retun 'red'; > } > > The data is like following: > > chr1 omim region 1224571 144979554 . + . > ID=decipher4083;Note=1q21.1 recurrent microduplication (possible > susceptiblity locus for neurodevelopmental disorders) > chr1 omim region 2149993 2231511 . + . > ID=omim1949;omimgene=164780;omimdisease=0;gene=SKI;Note=SKI-1p36 deletion > syndrome > > The error_log shows the following error: > An error occurred while evaluating the callback at section='OMIM', > option='bgcolor':, referer: > http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ > => Missing right curly or square bracket at (eval 91) line 4, at end of > line, referer: http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ > syntax error at (eval 91) line 4, at EOF, referer: > http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ > at > /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/Bio/Graphics/Browser.pm > line 245, referer: http://trish.med.unc.edu/cgi-bin/gb2/gbrowse/SLEP/ > > Thank you very much! > > Yours > Josh > > ------------------------------------------------------------------------------ > 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 > > -- * Please keep responses on the list! * Was this helpful? Let us know at http://gmod.org/wiki/Help_Desk_Feedback ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Gmod-gbrowse mailing list Gmod-gbrowse@... https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse |
| Free embeddable forum powered by Nabble | Forum Help |