[Bioperl-guts-l] bioperl commit

Brian Osborne bosborne at dev.open-bio.org
Thu Feb 6 08:12:55 EST 2003


Thu Feb  6 08:12:55 EST 2003
Update of /home/repository/bioperl/bioperl-live/scripts/index
In directory dev:/tmp/cvs-serv27219

Modified Files:
	bpindex.pl 
Log Message:
Added ability to index Genbank and SwissPfam
bioperl-live/scripts/index bpindex.pl,1.1,1.2
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/scripts/index/bpindex.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /tmp/T054aim1	2003-02-06 08:12:55.610008535 -0500
+++ /tmp/T164aim1	2003-02-06 08:12:55.620005850 -0500
@@ -108,6 +108,8 @@
 	require Bio::Index::Fasta;
 	require Bio::Index::EMBL;
 	require Bio::Index::Swissprot;
+	require Bio::Index::GenBank;
+	require Bio::Index::SwissPfam;
     };
     if ( $@ ) {
 	# one up from here is Bio directory - we hope!
@@ -115,7 +117,10 @@
 	eval {
 	    require Bio::Index::Fasta;
 	    require Bio::Index::EMBL;
-	};
+	    require Bio::Index::Swissprot;
+	    require Bio::Index::GenBank;
+	    require Bio::Index::SwissPfam;
+	 };
 	if ( $@ ) {
 	    print STDERR ("\nbpindex cannot find Bio::Index::Fasta and Bio::Index::EMBL\nbpindex needs to have bioperl installed for it to run.\nBioperl is very easy to install\nSee http://bio.perl.org for more information\n\n");
 	    exit(1);
@@ -155,18 +160,26 @@
 my $index;
 $_ = $fmt;
 SWITCH : {
-    /Fasta/ && do {
+    /Fasta/i && do {
 	$index = Bio::Index::Fasta->new("$dir/$name", 'WRITE');
 	last;
     };
-    /EMBL/ && do {
+    /EMBL/i && do {
 	$index = Bio::Index::EMBL->new("$dir/$name", 'WRITE');
 	last;
     };
-    /swiss/ && do {
+    /swissprot/i && do {
 	$index = Bio::Index::Swissprot->new("$dir/$name", 'WRITE');
 	last;
     };
+    /Genbank/i && do {
+	$index = Bio::Index::GenBank->new("$dir/$name", 'WRITE');
+	last;
+    };
+    /swisspfam/i && do {
+	$index = Bio::Index::SwissPfam->new("$dir/$name", 'WRITE');
+	last;
+    };
     die("No index format called $fmt");
 }
 



More information about the Bioperl-guts-l mailing list