diff get_edge_data.py @ 1:f77ce4f92b46 draft

Use $GALAXY_SLOTS instead of $EDGE_PRO_SITE_OPTIONS. Add dependency on bowtie2. Add readme.rst .
author crs4
date Fri, 31 Jan 2014 05:44:03 -0500
parents 7af33315bc5e
children 407b894abb08
line wrap: on
line diff
--- a/get_edge_data.py	Mon Sep 09 06:11:47 2013 -0400
+++ b/get_edge_data.py	Fri Jan 31 05:44:03 2014 -0500
@@ -4,7 +4,7 @@
 import optparse
 import sys
 
-class GetData:
+class GetData(object):
 
     def __init__(self, gbkid, fnafile, pttfile, rntfile, gfffile):
         self.gbkid = gbkid
@@ -14,9 +14,6 @@
         self.gfffile = gfffile
         self.ftpurl = 'ftp.ncbi.nlm.nih.gov'
         self.folder = '/genomes/Bacteria/'
-
-    def getData(self):
-        """ """
         strainName = self._getStrainName()
         print strainName
         if not strainName:
@@ -25,7 +22,7 @@
         ftp.login()
         newDir = self.folder + strainName
         ftp.cwd(newDir)
-        
+
         directoryFiles = []
         ftp.retrlines('NLST',  directoryFiles.append)
         for fileName in directoryFiles:
@@ -58,7 +55,7 @@
         ftp = FTP(self.ftpurl)
         ftp.login()
         ftp.cwd(self.folder)
-        
+
         straindirectories = []
         ftp.retrlines("NLST " , straindirectories.append)
         #print "scanning directories..."
@@ -77,7 +74,6 @@
 
 
 def __main__():
-    """ main function """
     parser = optparse.OptionParser()
     parser.add_option('-i', dest='gbkid', help='RefSeq Genomic Accession ID')
     parser.add_option('--fna', dest='fnafile', help='Output FASTA file name')
@@ -87,9 +83,8 @@
     (options, args) = parser.parse_args()
     if len(args) > 0:
         parser.error('Wrong number of arguments')
-    
-    S = GetData(options.gbkid, options.fnafile, options.pttfile, options.rntfile, options.gfffile)
-    S.getData()
+
+    GetData(options.gbkid, options.fnafile, options.pttfile, options.rntfile, options.gfffile)
 
 
 if __name__ == "__main__":