2 package CXGN
::Blast
::SeqQuery
::Plugin
::TomatoGenomeIds
;
7 return "tomato genome identifiers";
15 return "Solyc01g005370
27 my @ids = split /\s+/, $input;
29 my $schema = $c->dbic_schema("Bio::Chado::Schema");
30 my $rna_id = $schema->resultset("Cv::Cvterm")->find( { name
=>'mRNA' })->cvterm_id();
33 foreach my $id (@ids) {
34 print STDERR
"Validating $id... ";
35 my $rs = $schema->resultset("Sequence::Feature")->search( { type_id
=>$rna_id, name
=> { ilike
=> "$id".'.%.1' } } );
36 if ($rs->count() ==0) {
37 print STDERR
" not found.\n";
40 else { print STDERR
"OK\n"; }
44 return "The folloing ids entered do not exist: ".(join ",", @missing);
56 my @ids = split /\s+/, $input;
58 my $schema = $c->dbic_schema("Bio::Chado::Schema");
59 my $rna_id = $schema->resultset("Cv::Cvterm")->find( { name
=>'mRNA' })->cvterm_id();
60 print STDERR
"RNA: $rna_id\n";
62 foreach my $id (@ids) {
63 my $rs = $schema->resultset("Sequence::Feature")->search( { type_id
=>$rna_id, name
=> { ilike
=> "$id".'.%.1' } } );
64 if (my $row = $rs->next()) {
66 push @seqs, ">".$row->name."\n".$row->residues();
69 die "ID $id does not exist!";
72 my $sequence = join "\n", @seqs;
73 print STDERR
"SEQUENCE = $sequence\n";