comparison utils.py @ 26:a4a54b925c73 draft

planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit e81fecac281f299db00cfc88a068e056b031ae9d-dirty
author yating-l
date Wed, 15 Mar 2017 10:51:23 -0400
parents e7c80e9b70ae
children d8049deb0c97
comparison
equal deleted inserted replaced
25:55c62db02917 26:a4a54b925c73
148 ''' 148 '''
149 Galaxy will name all the files and dirs as *.dat, 149 Galaxy will name all the files and dirs as *.dat,
150 the function is simply replacing '.' to '_' for the dirs 150 the function is simply replacing '.' to '_' for the dirs
151 ''' 151 '''
152 return input_path.replace('.', '_') 152 return input_path.replace('.', '_')
153
154 def createBamIndex(bamfile):
155 p = subprocess.Popen(['samtools', 'index', bamfile])
156 p.communicate()
157 filename = bamfile + '.bai'
158 if os.path.exists(filename):
159 return filename
160 else:
161 raise ValueError('Did not find bai file')