[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.4, Tue Apr 22 19:56:18 2008 UTC revision 1.6, Tue Apr 29 23:01:55 2008 UTC
# Line 149  Line 149 
149    
150  =pod  =pod
151    
152    =over 4
153    
154  =item * B<query_evalue> (I<evalue>)  =item * B<query_evalue> (I<evalue>)
155    
156  Set/get the expectation value which is currently used to query the database.  Set/get the expectation value which is currently used to query the database.
# Line 497  Line 499 
499    
500  =pod  =pod
501    
502    =item * B<get_recruitment_plot_data> (I<genome>)
503    
504    Given a genome id (83333.1), this method returns all sequence ids,
505    the alignment length, the match id and the taxonomy string for all
506    sequences which match the criteria and have their tax_str start equal
507    the genome tax string I<filter>.
508    
509    =cut
510    
511    sub get_recruitment_plot_data {
512      my ($self, $genome) = @_;
513    
514      my $table = $self->dbtable;
515      my $dbid  = $self->get_dataset_id("SEED");
516      my $where = $self->get_where_clause();
517      $where = ($where) ? "and $where" : '';
518    
519      my ($tax_id) = $self->dbh->selectrow_array("select tax_str from rdp_to_tax where seq_num='". $genome . "'");
520    
521      my $sth = $self->dbh->prepare("select s.id1, s.id2, s.b2, s.e2, s.logpsc from ( select id1, min(rank_psc) as rank from $table where dbid=$dbid $where group by id1) as b inner join $table as s on b.id1=s.id1 and b.rank=s.rank_psc where dbid=$dbid and s.tax_str='$tax_id'");
522    
523      $sth->execute;
524      my $result = $sth->fetchall_arrayref();
525    
526      return $result;
527    
528    }
529    
530    
531    
532    
533    =pod
534    
535  =item * B<get_hits_for_sequence> (I<seq_id>, I<dataset>, I<limit>)  =item * B<get_hits_for_sequence> (I<seq_id>, I<dataset>, I<limit>)
536    
537  Given a sequence id I<seq_id> (id1) and a dataset name (db_id), this method returns  Given a sequence id I<seq_id> (id1) and a dataset name (db_id), this method returns
# Line 546  Line 581 
581    
582  }  }
583    
584    =pod
585    
586    =back
587    
588    =cut

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3