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

Diff of /FigKernelPackages/raelib.pm

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

revision 1.42, Sun Jan 14 18:15:43 2007 UTC revision 1.43, Tue Feb 5 02:05:47 2008 UTC
# Line 54  Line 54 
54  use FIG;  use FIG;
55  my $fig=new FIG;  my $fig=new FIG;
56    
57  =head2 new  =head2 Methods
58    
59    =head3 new
60    
61  Just instantiate the object and return $self  Just instantiate the object and return $self
62    
# Line 70  Line 72 
72    
73    
74    
75  =head2 features_on_contig  =head3 features_on_contig
76    
77   Returns a reference to an array containing all the features on a contig in a genome.   Returns a reference to an array containing all the features on a contig in a genome.
78    
# Line 105  Line 107 
107  }  }
108    
109    
110  =head2 mol_wt  =head3 mol_wt
111    
112  Calculate the molecular weight of a protein.  Calculate the molecular weight of a protein.
113    
# Line 124  Line 126 
126  }  }
127    
128    
129  =head2 pirsfcorrespondence  =head3 pirsfcorrespondence
130    
131  Generate the pirsf->fig id correspondence. This is only done once and the correspondence file is written. This is so that we can easily go back and forth.  Generate the pirsf->fig id correspondence. This is only done once and the correspondence file is written. This is so that we can easily go back and forth.
132    
# Line 169  Line 171 
171   return $linecount;   return $linecount;
172  }  }
173    
174  =head2 uniprotcorrespondence  =head3 uniprotcorrespondence
175    
176  Generate a correspondence table between uniprot knowledge base IDs and FIG ID's.  Generate a correspondence table between uniprot knowledge base IDs and FIG ID's.
177    
# Line 217  Line 219 
219   return $linecount;   return $linecount;
220  }  }
221    
222  =head2 prositecorrespondence  =head3 prositecorrespondence
223    
224  Generate a correspondence table between prosite and seed using sp id's and seed ids.  Generate a correspondence table between prosite and seed using sp id's and seed ids.
225    
# Line 276  Line 278 
278   }   }
279  }  }
280    
281  =head2 swiss_pir_ids()  =head3 swiss_pir_ids()
282    
283  SwissProt/PIR have lots of ID's that we want to get, usually in this order - uni --> tr --> sp. This routine will map swissprot/pir ids to fig id's, and return an array of FIG id's that match the ID.  SwissProt/PIR have lots of ID's that we want to get, usually in this order - uni --> tr --> sp. This routine will map swissprot/pir ids to fig id's, and return an array of FIG id's that match the ID.
284    
# Line 299  Line 301 
301   return ();   return ();
302  }  }
303    
304  =head2 ss_by_id  =head3 ss_by_id
305    
306   Generate a list of subsystems that a peg occurs in. This is a ; separated list.   Generate a list of subsystems that a peg occurs in. This is a ; separated list.
307   This is a wrapper that removes roles and ignores essential things   This is a wrapper that removes roles and ignores essential things
# Line 318  Line 320 
320   return $ssout;   return $ssout;
321  }  }
322    
323  =head2 ss_by_homol  =head3 ss_by_homol
324    
325   Generate a list of subsystems that homologs of a peg occur in. This is a ; separated list.   Generate a list of subsystems that homologs of a peg occur in. This is a ; separated list.
326   This is also a wrapper around sims and ss, but makes everything unified   This is also a wrapper around sims and ss, but makes everything unified
# Line 358  Line 360 
360   return $ssoutput;   return $ssoutput;
361  }  }
362    
363  =head2 tagvalue  =head3 tagvalue
364    
365   This will just check for tag value pairs and return either an array of values or a single ; separated list (if called as a scalar)   This will just check for tag value pairs and return either an array of values or a single ; separated list (if called as a scalar)
366    
# Line 381  Line 383 
383   return wantarray ? @return : join "; ", @return;   return wantarray ? @return : join "; ", @return;
384  }  }
385    
386  =head2 locations_on_contig  =head3 locations_on_contig
387    
388  Return the locations of a sequence on a contig.  Return the locations of a sequence on a contig.
389    
# Line 428  Line 430 
430  }  }
431    
432    
433  =head2 scrolling_org_list  =head3 scrolling_org_list
434    
435  This is the list from index.cgi, that I call often. It has one minor modification: the value returned is solely the organisms id and does not contain genus_species information. I abstracted this here: 1, so I could call it often, and 2, so I could edit it once.  This is the list from index.cgi, that I call often. It has one minor modification: the value returned is solely the organisms id and does not contain genus_species information. I abstracted this here: 1, so I could call it often, and 2, so I could edit it once.
436    
# Line 540  Line 542 
542  }  }
543    
544    
545  =head2 scrolling_subsys_list  =head3 scrolling_subsys_list
546    
547  Create a scrolling list of all subsystems. Just like scrolling_org_list, this will make the list and allow you to select multiples.  Create a scrolling list of all subsystems. Just like scrolling_org_list, this will make the list and allow you to select multiples.
548    
# Line 566  Line 568 
568   );   );
569  }  }
570    
571  =head2 subsys_names_for_display  =head3 subsys_names_for_display
572    
573  Return a list of subsystem names for display. This will take a list as an argument and return a nice clean list for display.  Return a list of subsystem names for display. This will take a list as an argument and return a nice clean list for display.
574    
# Line 582  Line 584 
584   return @ss;   return @ss;
585  }  }
586    
587  =head2 GenBank  =head3 GenBank
588    
589   This object will take a genome number and return a Bio::Seq::RichSeq object that has the whole genome   This object will take a genome number and return a Bio::Seq::RichSeq object that has the whole genome
590   in GenBank format. This should be a nice way of getting some data out, but will probably be quite slow   in GenBank format. This should be a nice way of getting some data out, but will probably be quite slow
# Line 712  Line 714 
714   return $sobj;   return $sobj;
715  }  }
716    
717  =head2 best_hit  =head3 best_hit
718    
719   Returns the FIG id of the single best hit to a peg   Returns the FIG id of the single best hit to a peg
720    
# Line 733  Line 735 
735  }  }
736    
737    
738  =head1 read_fasta  =head3 read_fasta
739    
740  Read a fasta format file and return a reference to a hash with the data. The key is the ID and the value is the sequence. If you supply the optional keep comments then the comments (anything after the first white space are returned as a sepaarte hash).  Read a fasta format file and return a reference to a hash with the data. The key is the ID and the value is the sequence. If you supply the optional keep comments then the comments (anything after the first white space are returned as a sepaarte hash).
741    
# Line 766  Line 768 
768   else {return \%f}   else {return \%f}
769  }  }
770    
771  =head1 rc  =head3 rc
772    
773  Reverse complement. It's too easy.  Reverse complement. It's too easy.
774    
# Line 780  Line 782 
782  }  }
783    
784    
785  =head2 cookies  =head3 cookies
786    
787  Handle cookies. This method will get and set the value of the FIG cookie. Cookies are name/value pairs that are stored on the users computer. We then retrieve them using this method. The cookies are passed in as a reference to a hash, and the method returns a tuple of the cookie that can be passed to the browser and a reference to a hash with the data.  Handle cookies. This method will get and set the value of the FIG cookie. Cookies are name/value pairs that are stored on the users computer. We then retrieve them using this method. The cookies are passed in as a reference to a hash, and the method returns a tuple of the cookie that can be passed to the browser and a reference to a hash with the data.
788    
# Line 823  Line 825 
825  }  }
826    
827    
828  =head1 is_number  =head3 is_number
829    
830  returns 1 if the argument is a number, and 0 if not. This is taken directly from the perl cookbook.  returns 1 if the argument is a number, and 0 if not. This is taken directly from the perl cookbook.
831    
# Line 837  Line 839 
839    
840    
841    
842  =head1 commify  =head3 commify
843    
844  Put commas in numbers. I think this comes straight from the perl cookbook and is very useful for nice displays  Put commas in numbers. I think this comes straight from the perl cookbook and is very useful for nice displays
845    
# Line 857  Line 859 
859  }  }
860    
861    
862  =head1 tab2excel  =head3 tab2excel
863    
864  This is experimental as of May, 2006.  This is experimental as of May, 2006.
865    
# Line 920  Line 922 
922  }  }
923    
924    
925  =head1 excel_file_link  =head3 excel_file_link
926    
927  Just returns the link to the file, if one has been created. If not, returns a non-breaking space ( )  Just returns the link to the file, if one has been created. If not, returns a non-breaking space ( )
928    
# Line 936  Line 938 
938    
939    
940    
941  =head1 make_excel_workbook  =head3 make_excel_workbook
942    
943  This is the method that actually makes individual workbook. You should call this once, with the name of the file that you want it to be known by. The options are to set borders and whatnot.  This is the method that actually makes individual workbook. You should call this once, with the name of the file that you want it to be known by. The options are to set borders and whatnot.
944    
# Line 978  Line 980 
980  }  }
981    
982    
983  =head1 make_excel_worksheet()  =head3 make_excel_worksheet()
984    
985  This is the method that makes the separate sheets in the file. You can add as many of these as you want.  This is the method that makes the separate sheets in the file. You can add as many of these as you want.
986    
# Line 1081  Line 1083 
1083    
1084    
1085    
1086  =head1 close_excel_file()  =head3 close_excel_file()
1087    
1088  We must explicitly close the file before creating the link so that the file is written. This is also what returns the link  We must explicitly close the file before creating the link so that the file is written. This is also what returns the link
1089    
# Line 1102  Line 1104 
1104    
1105    
1106    
1107  =head2 parse_cell()  =head3 parse_cell()
1108    
1109  A method to take the cell from the table where there is some formatting information and figure out what we know. Return the data and the format.  A method to take the cell from the table where there is some formatting information and figure out what we know. Return the data and the format.
1110    
# Line 1191  Line 1193 
1193  }  }
1194    
1195    
1196  =head1 clean_excel_cell  =head3 clean_excel_cell
1197    
1198  Process the cells to remove   and also convert relative URLs to full URLs  Process the cells to remove   and also convert relative URLs to full URLs
1199    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3