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

Diff of /Sprout/SearchHelper.pm

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

revision 1.41, Wed Sep 3 20:54:47 2008 UTC revision 1.42, Fri Oct 17 16:41:47 2008 UTC
# Line 833  Line 833 
833    
834  =head3 ComputeFASTA  =head3 ComputeFASTA
835    
836      my $fasta = $shelp->ComputeFASTA($desiredType, $sequence, $flankingWidth);      my $fasta = $shelp->ComputeFASTA($desiredType, $sequence, $flankingWidth, $comments);
837    
838  Parse a sequence input and convert it into a FASTA string of the desired type with  Parse a sequence input and convert it into a FASTA string of the desired type with
839  the desired flanking width.  the desired flanking width.
# Line 860  Line 860 
860  protein translation of a feature doesn't always match the DNA and is taken directly  protein translation of a feature doesn't always match the DNA and is taken directly
861  from the database.  from the database.
862    
863    =item comments
864    
865    Comment string to be added to the FASTA header.
866    
867  =item RETURN  =item RETURN
868    
869  Returns a string in FASTA format representing the content of the desired sequence with  Returns a string in FASTA format representing the content of the desired sequence with
# Line 872  Line 876 
876    
877  sub ComputeFASTA {  sub ComputeFASTA {
878      # Get the parameters.      # Get the parameters.
879      my ($self, $desiredType, $sequence, $flankingWidth) = @_;      my ($self, $desiredType, $sequence, $flankingWidth, $comment) = @_;
880      # Declare the return variable. If an error occurs, it will remain undefined.      # Declare the return variable. If an error occurs, it will remain undefined.
881      my $retVal;      my $retVal;
882      # This variable will be cleared if an error is detected.      # This variable will be cleared if an error is detected.
# Line 903  Line 907 
907                  # In an emergency, fall back to the original ID.                  # In an emergency, fall back to the original ID.
908                  $fastaLabel = $fid;                  $fastaLabel = $fid;
909              }              }
910                # Add any specified comments.
911                if ($comment) {
912                    $fastaLabel .= " $comment";
913                }
914              # Now proceed according to the sequence type.              # Now proceed according to the sequence type.
915              if ($desiredType =~ /prot/) {              if ($desiredType =~ /prot/) {
916                  # We want protein, so get the translation.                  # We want protein, so get the translation.
# Line 1821  Line 1829 
1829                      # If we have children, create the child list with a recursive call.                      # If we have children, create the child list with a recursive call.
1830                      if ($hasChildren) {                      if ($hasChildren) {
1831                          Trace("Processing children of $myLabel.") if T(4);                          Trace("Processing children of $myLabel.") if T(4);
1832                          push @childHtml, ShowBranch($cgi, $myLabel, $myID, $myContent, $options, 'none');                          push @childHtml, ShowBranch($cgi, $myLabel, $myID, $myContent, $options, 'block');
1833                          Trace("Children of $myLabel finished.") if T(4);                          Trace("Children of $myLabel finished.") if T(4);
1834                      }                      }
1835                  }                  }

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3