[Bio] / Sprout / SHToolSearch.pm Repository:
ViewVC logotype

Diff of /Sprout/SHToolSearch.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Thu Aug 16 19:23:38 2007 UTC revision 1.5, Thu Dec 6 14:58:03 2007 UTC
# Line 123  Line 123 
123                                      output => \&blastXML,                                      output => \&blastXML,
124                                      inputType => 'prot',                                      inputType => 'prot',
125                                      extras => [[bsc => 0, title => "Bit Score", style => "rightAlign", download => 'num'],                                      extras => [[bsc => 0, title => "Bit Score", style => "rightAlign", download => 'num'],
126                                                 [queryLoc => 1, title => "Query Location", style => "leftAlign", download => 'text'],                                                 [queryLoc => undef, title => "Query Location", style => "leftAlign", download => 'text'],
127                                                 [hitLoc => 2, title => "Hit Location", style => "leftAlign", download => 'text'],                                                 [hitLoc => undef, title => "Hit Location", style => "leftAlign", download => 'text'],
128                                                 [alignment => undef, title => "Alignment", style => "code", download => 'align']],                                                 [alignment => undef, title => "Alignment", style => "code", download => 'align']],
129                                      buttonName => 'BLAST',                                      buttonName => 'BLAST',
130                                      targetRelationship => 'HasFeature',                                      targetRelationship => 'HasFeature',
# Line 135  Line 135 
135                                      output => \&blastXML,                                      output => \&blastXML,
136                                      inputType => 'prot',                                      inputType => 'prot',
137                                      extras => [[bsc => 0, title => "Bit Score", style => "rightAlign", download => 'num'],                                      extras => [[bsc => 0, title => "Bit Score", style => "rightAlign", download => 'num'],
138                                                 [queryLoc => 1, title => "Query Location", style => "leftAlign", download => 'text'],                                                 [queryLoc => undef, title => "Query Location", style => "leftAlign", download => 'text'],
139                                                 [hitLoc => 2, title => "Hit Location", style => "leftAlign", download => 'text'],                                                 [hitLoc => undef, title => "Hit Location", style => "leftAlign", download => 'text'],
140                                                 [alignment => undef, title => "Alignment", style => "code", download => 'align']],                                                 [alignment => undef, title => "Alignment", style => "code", download => 'align']],
141                                      buttonName => 'BLAST',                                      buttonName => 'BLAST',
142                                      targetRelationship => 'HasFeature',                                      targetRelationship => 'HasFeature',
# Line 147  Line 147 
147                                      output => \&blastXML,                                      output => \&blastXML,
148                                      inputType => 'dna',                                      inputType => 'dna',
149                                      extras => [[bsc => 0, title => "Bit Score", style => "rightAlign", download => 'num'],                                      extras => [[bsc => 0, title => "Bit Score", style => "rightAlign", download => 'num'],
150                                                 [queryLoc => 1, title => "Query Location", style => "leftAlign", download => 'text'],                                                 [queryLoc => undef, title => "Query Location", style => "leftAlign", download => 'text'],
151                                                 [hitLoc => 2, title => "Hit Location", style => "leftAlign", download => 'text'],                                                 [hitLoc => undef, title => "Hit Location", style => "leftAlign", download => 'text'],
152                                                 [alignment => undef, title => "Alignment", style => "code", download => 'align']],                                                 [alignment => undef, title => "Alignment", style => "code", download => 'align']],
153                                      buttonName => 'BLAST',                                      buttonName => 'BLAST',
154                                      targetRelationship => 'HasContig',                                      targetRelationship => 'HasContig',
# Line 180  Line 180 
180    
181  =head3 ExecTool  =head3 ExecTool
182    
183  C<< my @sims = $shelp->ExecTool($seqFile, \@genomes, $tool, $options); >>      my @sims = $shelp->ExecTool($seqFile, \@genomes, $tool, $options);
184    
185  Call a tool to search for DNA sequences or features.  Call a tool to search for DNA sequences or features.
186    
# Line 292  Line 292 
292    
293  =head3 blastXML  =head3 blastXML
294    
295  C<< my @dataRows = $shelp->blastXML(\@data, $maxHits, $genome); >>      my @dataRows = $shelp->blastXML(\@data, $maxHits, $genome);
296    
297  Process XML output from Blast.  Process XML output from Blast.
298    
# Line 376  Line 376 
376                  # We need to create an output tuple for this hit. First, we                  # We need to create an output tuple for this hit. First, we
377                  # create the alignment string.                  # create the alignment string.
378                  my $alignment = join("<br />", $point->{Hsp_qseq}, $point->{Hsp_midline}, $point->{Hsp_hseq});                  my $alignment = join("<br />", $point->{Hsp_qseq}, $point->{Hsp_midline}, $point->{Hsp_hseq});
379                  # Next, we need to create the locations.                  # Convert the spaces to non-breaking so that they aren't mucked up by HTML formatting.
380                    $alignment =~ s/ /&nbsp;/g;
381                    # Next, we need to create the locations. The fields Hsp_query-frame and Hsp_hit-frame indicate
382                    # whether the location is on the plus or minus strand.
383                  my $hitLoc = BasicLocation->new($hitArea, $point->{'Hsp_hit-from'}, "_", $point->{'Hsp_hit-to'});                  my $hitLoc = BasicLocation->new($hitArea, $point->{'Hsp_hit-from'}, "_", $point->{'Hsp_hit-to'});
384                    $hitLoc->Reverse if $point->{'Hsp_hit-frame'} < 0;
385                  my $queryLoc = BasicLocation->new($queryName, $point->{'Hsp_query-from'}, "_", $point->{'Hsp_query-to'});                  my $queryLoc = BasicLocation->new($queryName, $point->{'Hsp_query-from'}, "_", $point->{'Hsp_query-to'});
386                    $queryLoc->Reverse if $point->{'Hsp_query-frame'} < 0;
387                  # Finally, we get the bit score, formatted nicely for the display.                  # Finally, we get the bit score, formatted nicely for the display.
388                  my $bsc = sprintf("%0.3f", $point->{'Hsp_bit-score'});                  my $bsc = sprintf("%0.3f", $point->{'Hsp_bit-score'});
389                  # Now we can build our output tuple.                  # Now we can build our output tuple.
# Line 400  Line 405 
405    
406  =head3 scanLines  =head3 scanLines
407    
408  C<< my @dataRows = $shelp->scanLines(\@data, $maxHits, $genome); >>      my @dataRows = $shelp->scanLines(\@data, $maxHits, $genome);
409    
410  Process output from the scan-for-matches tool. Each match consists of two  Process output from the scan-for-matches tool. Each match consists of two
411  output lines. The first contains the hit source (feature or contig), the  output lines. The first contains the hit source (feature or contig), the
# Line 470  Line 475 
475    
476  =head3 Canonize  =head3 Canonize
477    
478  C<< my $newName = CallScanner::Canonize($name, $genomeID); >>      my $newName = CallScanner::Canonize($name, $genomeID);
479    
480  If the specified name is a contig ID, insure it has a genome ID in front of it.  If the specified name is a contig ID, insure it has a genome ID in front of it.
481    
# Line 507  Line 512 
512    
513  =head3 VerifyDB  =head3 VerifyDB
514    
515  C<< CallScanner::VerifyDB($db, $type); >>      CallScanner::VerifyDB($db, $type);
516    
517  Verify that the specified FASTA file has BLAST databases. If the databases  Verify that the specified FASTA file has BLAST databases. If the databases
518  do not exist, they will be created. If they are older than the FASTA file,  do not exist, they will be created. If they are older than the FASTA file,
# Line 546  Line 551 
551    
552  =head3 ToolSortKey  =head3 ToolSortKey
553    
554  C<< my $key = $shelp->ToolSortKey($genome, $bsc, $hitLoc); >>      my $key = $shelp->ToolSortKey($genome, $bsc, $hitLoc);
555    
556  Return the sort key for a match result against the specified  Return the sort key for a match result against the specified
557  genome with the specified bit-score. The results are  genome with the specified bit-score. The results are
# Line 609  Line 614 
614    
615  =head3 Form  =head3 Form
616    
617  C<< my $html = $shelp->Form(); >>      my $html = $shelp->Form();
618    
619  Generate the HTML for a form to request a new search.  Generate the HTML for a form to request a new search.
620    
# Line 673  Line 678 
678    
679  =head3 Find  =head3 Find
680    
681  C<< my $resultCount = $shelp->Find(); >>      my $resultCount = $shelp->Find();
682    
683  Conduct a search based on the current CGI query parameters. The search results will  Conduct a search based on the current CGI query parameters. The search results will
684  be written to the session cache file and the number of results will be  be written to the session cache file and the number of results will be
# Line 767  Line 772 
772    
773  =head3 Description  =head3 Description
774    
775  C<< my $htmlText = $shelp->Description(); >>      my $htmlText = $shelp->Description();
776    
777  Return a description of this search. The description is used for the table of contents  Return a description of this search. The description is used for the table of contents
778  on the main search tools page. It may contain HTML, but it should be character-level,  on the main search tools page. It may contain HTML, but it should be character-level,
# Line 784  Line 789 
789    
790  =head3 SearchTitle  =head3 SearchTitle
791    
792  C<< my $titleHtml = $shelp->SearchTitle(); >>      my $titleHtml = $shelp->SearchTitle();
793    
794  Return the display title for this search. The display title appears above the search results.  Return the display title for this search. The display title appears above the search results.
795  If no result is returned, no title will be displayed. The result should be an html string  If no result is returned, no title will be displayed. The result should be an html string

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3