[Bio] / FigKernelPackages / FIGO.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIGO.pm

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

revision 1.27, Thu Oct 4 00:58:56 2007 UTC revision 1.30, Fri Nov 30 21:35:51 2007 UTC
# Line 17  Line 17 
17  #  #
18  ########################################################################  ########################################################################
19    
20    =head1 TODO
21    
22    =over 4
23    
24    =item Null arg to ContigO::dna_seq() should return entire contig seq.
25    
26    =item Add method to access "FIG::crude_estimate_of_distance()"
27    
28    =back
29    
30    =cut
31    
32  =head1 Overview  =head1 Overview
33    
34  This module is a set of packages encapsulating the SEED's core methods  This module is a set of packages encapsulating the SEED's core methods
35  using an "OOP-like" style.  using an "OOP-like" style.
36    
37  There are several modules clearly related to "individual genomes:"  There are several modules clearly related to "individual genomes:"
38  FIGO, GenomeO, ContigO, FeatureO (and I<maybe> AnnotationO).  GenomeO, ContigO, FeatureO (and I<maybe> AnnotationO).
39    
40  There are also modules that deal with complex relationships between  There are also modules that deal with complex relationships between
41  pairs or sets of features in one, two, or more genomes,  pairs or sets of features in one, two, or more genomes,
# Line 32  Line 44 
44    
45  Finally, the methods in "Attribute" might in principle attach  Finally, the methods in "Attribute" might in principle attach
46  "atributes" to any type of object.  "atributes" to any type of object.
47  (Likewise, in principle one might like to attach an "annotation"  (Likewise, in principle one might also want to attach an "annotation"
48  to any type of object  to any type of object,
49    although currently we only support annotations of "features.")
50    
51  The four modules dealing with "genomes" have a reasonable clear  The three modules that act on "individual genomes" have a reasonable clear
52  "implied heirarchy:"  "implied heirarchy" relative to FIGO:
53    
54  =over 4  =over 4
55    
# Line 693  Line 706 
706    
707  =item RETURNS:  =item RETURNS:
708    
709      string of DNA sequence running from $beg to $end  String containing DNA subsequence running from $beg to $end
710      (NOTE: if $beg > $end, returns reverse complement of DNA subsequence.)      (NOTE: if $beg > $end, returns reverse complement of DNA subsequence.)
711    
712  =back  =back
# Line 1207  Line 1220 
1220      my $fig = $figO->{_fig};      my $fig = $figO->{_fig};
1221      my($tmp_dir) = $figO->{_tmp_dir};      my($tmp_dir) = $figO->{_tmp_dir};
1222    
1223        my $tmp_dna  = "$tmp_dir/tmp_dna.$$.fasta";
1224        my $tmp_prot = "$tmp_dir/tmp_prot.$$.fasta";
1225    
1226      #...Skip tests and return '0' if truncated...      #...Skip tests and return '0' if truncated...
1227      if (! $self->possibly_truncated)      if (! $self->possibly_truncated)
1228      {      {
# Line 1261  Line 1277 
1277                      if (defined($dna) && (length($dna) > 90))                      if (defined($dna) && (length($dna) > 90))
1278                      {                      {
1279                          #...Open tmp-file and write FASTA containing DNA subregion to be BLASTed:                          #...Open tmp-file and write FASTA containing DNA subregion to be BLASTed:
1280                          open( TMP, ">$tmp_dir/tmp_dna") || die "could not open tmp_dna";                          open( TMP, ">$tmp_dna") || die "could not open $tmp_dna";
1281                          print TMP  ">dna\n$dna\n";                          print TMP  ">dna\n$dna\n";
1282                          close(TMP);                          close(TMP);
1283    
# Line 1272  Line 1288 
1288                          my $prot  = $pegO2->prot_seq;                          my $prot  = $pegO2->prot_seq;
1289                          if (defined($prot) && (length($prot) > 30))                          if (defined($prot) && (length($prot) > 30))
1290                          {                          {
1291                              open( TMP, ">$tmp_dir/tmp_prot") || die "could not open tmp_prot";                              open( TMP, ">$tmp_prot") || die "could not open $tmp_prot";
1292                              print TMP  ">tmp_prot\n$prot\n";                              print TMP  ">tmp_prot\n$prot\n";
1293                              close(TMP);                              close(TMP);
1294    
1295                              #...Build BLAST nucleotide database for extracted DNA region,                              #...Build BLAST nucleotide database for extracted DNA region,
1296                              #   and TBLASTN $peg2 against the DNA:                              #   and TBLASTN $peg2 against the DNA:
1297                              &run("formatdb -i $tmp_dir/tmp_dna -pF");                              &run("formatdb -i $tmp_dna -pF");
1298                              open(BLAST,"blastall -i $tmp_dir/tmp_prot -d $tmp_dir/tmp_dna -p tblastn -FF -e 1.0e-20 |")                              open(BLAST,"blastall -i $tmp_prot -d $tmp_dna -p tblastn -FF -e 1.0e-20 |")
1299                                  || die "could not blast";                                  || die "could not blast";
1300    
1301                              #...Parse the TBLASTN output; find and sort HSPs by left boundary:                              #...Parse the TBLASTN output; find and sort HSPs by left boundary:
# Line 1300  Line 1316 
1316                              #   w/ gaps < 9 bp (but not a multiple of 3), suspect a possible frameshift:                              #   w/ gaps < 9 bp (but not a multiple of 3), suspect a possible frameshift:
1317                              if (&covers(\@prot,length($prot),3,0) && &covers(\@dna,3*length($prot),9,1))                              if (&covers(\@prot,length($prot),3,0) && &covers(\@dna,3*length($prot),9,1))
1318                              {                              {
1319                                  return 1;                                  unlink($tmp_dna,$tmp_prot);
1320                                    return [$contig,$begA,$endA,$dna,$peg2];
1321                              }                              }
1322                          }                          }
1323                      }                      }
# Line 1308  Line 1325 
1325              }              }
1326          }          }
1327      }      }
1328        unlink($tmp_dna,$tmp_prot);
1329      return 0;      return 0;
1330  }  }
1331    

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.30

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3