Opened 10 years ago

Last modified 10 years ago

#1370 new enhancement

Pedigree links for NSGC not ported to GG

Reported by: dbmuqs Owned by: dbmulg
Priority: minor Milestone: 1.10.2
Component: Public Website App. Version: N/A
Severity: Keywords:
Cc: Database Engine: N/A
Operating System: N/A

Description

In GC for NSGC accessions the pedigree was parsed by the display program and links were created for the members of the pedigree e.g.

Jefferson sibMaybelle/Rosemont

At least the Maybelle and Rosemont links would have been clickable with the query being sent the taxonomy and the cultivar name.

Change History (1)

comment:1 by dbmuqs, 10 years ago

Quinn found the GC Perl Code that put links into NSGC pedigrees. It’s a complicated set of regular expressions replacing certain patterns with a link to a program called grin-acid.pl which would find accessions based on PI or CI numbers or the plant name and taxonomy.


For what it’s worth, here’s the code:


$select = "SELECT to_char(p.released, decode(p.datefmt,'YYYY','YYYY',

'MM/YYYY','Mon-YYYY','MM/DD/YYYY','DD-Mon-YYYY')),

p.pedigree, p.citno, a.taxno, a.site

FROM prod.ped p, prod.acc a

WHERE p.acid = :1 AND a.acid = p.acid";


&OraOpenBind(\$pd2_csr, $select, $acid);


while (my($released, $pedigree, $citno, $taxno, $site)

&ora_fetch($pd2_csr))

{


$base = "$pedigree";

if (($site =~ /NSGC/) &&

($pedigree =~ /\
$pedigree =~ / from/))

{

$base = " ";

if (index($pedigree,':') > 0)

{

($base, $pedigree) = split(/:/,$pedigree,2);

}

if ($pedigree =~ / sib$/)

{

# Ends with sib


$pedigree =~ s/ sib$;

$pedigree =~ s/ *$;

$sib = 'sib';

$pedigree =~

s/(\w+)([\s\-\.\']){0,1}(\w+)([\s\-\.\']){0,1}(\w+){0,1}([\/\(\)\=\*]{0,2})/

<A HREF=$cgibin\/grin-acid.pl?$1$3$5+$taxno+ped>

$1$2$3$4$5<\/A> $6/g;

$pedigree = "$pedigree $sib";

$base = "$base $pedigree";

} elsif ($pedigree =~ /[Ss]election from/) {

$pedigree =~

s/([sS]election from\s)([A-Z])(\w+)([\n\.\,\(].+){0,1}/

$1<A HREF=$cgibin\/grin-acid.pl?$2$3$4+$taxno+ped>

$2$3$4<\/A>/g;

my $m1 = index($pedigree,'?');

my $m2 = index($pedigree,'>',$m1);

substr($pedigree,$m1,$m2 - $m1) =~ s/ /%20/g;

$base = "$base $pedigree";

} elsif ($pedigree =~ /cross/
$pedigree =~ /mutant/
$pedigree =~ /unrecorded/) {

$base = "$base $pedigree";

} elsif ($pedigree =~ /\) {

$pedigree =~

s/(\w+)([\s\-\.\']){0,1}(\w+)([\s\-\.\']){0,1}(\w+){0,1}([\/\(\)\=\*]{0,2})/

<A HREF=$cgibin\/grin-acid.pl?$1$3$5+$taxno+ped>

$1$2$3$4$5<\/A> $6/g;

$base = "$base $pedigree";

} else {

$base = "$base $pedigree";

}

}

if ($released ne )

{ $base = "$base.<BR> Released: $released.<BR>\n"; }

$base =~ s/ *;

$base =~ s/ / /g;

print "$base";


&PedCitDisp ($citno) if ($citno > 0);


Kurt

Note: See TracTickets for help on using tickets.