[Bio] / FigMetagenomeTools / renumber_sequences.pl Repository:
ViewVC logotype

Diff of /FigMetagenomeTools/renumber_sequences.pl

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

revision 1.3, Sat Apr 14 20:56:12 2007 UTC revision 1.4, Sat Apr 14 22:35:31 2007 UTC
# Line 130  Line 130 
130  open (FA, ">$count.fa") || die "Can't open $count.fa for writing\n";  open (FA, ">$count.fa") || die "Can't open $count.fa for writing\n";
131  open (QU, ">$count.qual") || die "Can't open $count.qual for writing\n";  open (QU, ">$count.qual") || die "Can't open $count.qual for writing\n";
132    
133  my $exc=$dbh->prepare(qq(insert into DNA (count, genome, original_name, trace_file, sequence_file, quality_file)  my $exc=$dbh->prepare(qq(insert into DNA ( genome, original_name, trace_file, sequence_file, quality_file)
134                           values (?, ?, ?, ?, ?, ?)));                           values (?, ?, ?, ?, ?)));
135    
136  foreach my $s (keys %$fasta)  foreach my $s (keys %$fasta)
137  {  {
138        my $id;
139    
140          unless ($qual->{$s}) {print STDERR "No quality for $s. Skipped\n"; next}          unless ($qual->{$s}) {print STDERR "No quality for $s. Skipped\n"; next}
141          print FA ">$max\n", $fasta->{$s}, "\n";  
142          print QU ">$max\n", $qual->{$s}, "\n";      if ($genomeno)
         unless ($genomeno)  
143          {          {
144              $exc->execute($max, $count, $s, '', "$count.fa", "$count.qual")  || die $dbh->errstr;          $id = $max++;
145          }          }
146          $max++;      else
147        {
148            $exc->execute($count, $s, '', "$count.fa", "$count.qual")  || die $dbh->errstr;
149            $id = $dbh->{mysql_insertid};
150        }
151    
152        print FA ">$id\n", $fasta->{$s}, "\n";
153        print QU ">$id\n", $qual->{$s}, "\n";
154  }  }
155    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3