Mercurial > repos > yating-l > jbrowse_hub
diff utils.py @ 50:3e5b6f6a9abe draft
planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit 6391cdb975d14b5a7060fa1665a8a575797a0eaa-dirty
author | yating-l |
---|---|
date | Thu, 30 Mar 2017 16:03:16 -0400 |
parents | d8049deb0c97 |
children |
line wrap: on
line diff
--- a/utils.py Wed Mar 29 14:46:23 2017 -0400 +++ b/utils.py Thu Mar 30 16:03:16 2017 -0400 @@ -35,13 +35,11 @@ except IOError as err: print "Cannot create tempfile err({0}): {1}".format(err.errno, err.strerror) try: - p = subprocess.Popen(['faToTwoBit', reference, twoBitFile.name]) - p.communicate() + subprocess.call(['faToTwoBit', reference, twoBitFile.name]) except OSError as err: print "Cannot generate twoBitFile from faToTwoBit err({0}): {1}".format(err.errno, err.strerror) try: - p = subprocess.Popen(['twoBitInfo', twoBitFile.name, chrom_sizes.name]) - p.communicate() + subprocess.call(['twoBitInfo', twoBitFile.name, chrom_sizes.name]) except OSError as err: print "Cannot generate chrom_sizes from twoBitInfo err({0}): {1}".format(err.errno, err.strerror) return chrom_sizes @@ -155,8 +153,7 @@ return "gonramp_" + sanitized_name def createBamIndex(bamfile): - p = subprocess.Popen(['samtools', 'index', bamfile]) - p.communicate() + subprocess.call(['samtools', 'index', bamfile]) filename = bamfile + '.bai' if os.path.exists(filename): return filename