[Bio] / SeedViewer / MetagenomeAnalysis.pm Repository:
ViewVC logotype

Diff of /SeedViewer/MetagenomeAnalysis.pm

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

revision 1.17, Fri Jun 13 16:47:56 2008 UTC revision 1.18, Mon Jul 14 22:12:45 2008 UTC
# Line 660  Line 660 
660                                     FROM $table                                     FROM $table
661                                     WHERE id1=? AND dbid=? AND rank_psc < ?));                                     WHERE id1=? AND dbid=? AND rank_psc < ?));
662    $sth->execute($id, $dbid, $limit);    $sth->execute($id, $dbid, $limit);
663    
664      my $result = $sth->fetchall_arrayref();
665    
666      return $result;
667    
668    }
669    
670    =item * B<get_best_hit_for_sequence> (I<seq_id>, I<dataset>)
671    
672    Given a sequence id I<seq_id> (id1) and a dataset name (db_id), this method returns
673    the first row of hit data for this sequence.
674    It returns (match id, taxonomy string, log evalue, bitscore, alignment length,
675    percent identity, start1, end1) per hit.
676    
677    =cut
678    
679    sub get_best_hit_for_sequence {
680      my ($self, $id, $dataset) = @_;
681    
682      my $table = $self->dbtable;
683      my $dbid  = $self->get_dataset_id($dataset);
684    
685      my $sth = $self->dbh->prepare(qq(SELECT id2, tax_str, logpsc, bsc, ali_ln,
686                                            iden, b1, e1, b2, e2
687                                       FROM $table
688                                       WHERE id1=? AND dbid=?));
689      $sth->execute($id, $dbid);
690    
691    my $result = $sth->fetchall_arrayref();    my $result = $sth->fetchall_arrayref();
692    
693    return $result;    return $result;

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3