[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Omaha.pm] Regex X-treme!
That's a lot of mojo. :)
j
$linkrule =~ s/\$(\w+)/
CGI::escape(
$1 eq 'ref' ? (($n = $seq_id) && "$n") || ''
: $1 eq 'name' ? (($n = $feature->display_name) &&
"$n") || ''
: $1 eq 'class' ? eval {$feature->class} || ''
: $1 eq 'type' ? eval {$feature->method} ||
$feature->primary_tag || ''
: $1 eq 'method' ? eval {$feature->method} ||
$feature->primary_tag || ''
: $1 eq 'source' ? eval {$feature->source} ||
$feature->source_tag || ''
: $1 =~ 'seq_?id' ? eval{$feature->seq_id} ||
eval{$feature->location->seq_id} || ''
: $1 eq 'start' ? $feature->start || ''
: $1 eq 'end' ? $feature->end || ''
: $1 eq 'stop' ? $feature->end || ''
: $1 eq 'segstart' ? $panel->start || ''
: $1 eq 'segend' ? $panel->end || ''
: $1 eq 'description' ? eval {join '',$feature->notes} || ''
: $1 eq 'id' ? $feature->feature_id || ''
: '$'.$1
)
/exg;
Bio/Graphics/FeatureFile.pm link_pattern()
Lincoln Stein lstein@cshl.org
Copyright (c) 2001 Cold Spring Harbor Laboratory