Mercurial > repos > yating-l > hubarchivecreator
comparison util/subtools.py @ 57:b39dd0b5a166 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit ce28781f52a4f84039de300cb41e3982f2e8bf51-dirty
| author | yating-l |
|---|---|
| date | Fri, 30 Jun 2017 14:49:14 -0400 |
| parents | 04cc7c2e7b47 |
| children | 4ca7cbf2d9b8 |
comparison
equal
deleted
inserted
replaced
| 56:04cc7c2e7b47 | 57:b39dd0b5a166 |
|---|---|
| 180 array_call = ['sort', '-k2rn', two_bit_info_file_name, '-o', chrom_sizes_file_name] | 180 array_call = ['sort', '-k2rn', two_bit_info_file_name, '-o', chrom_sizes_file_name] |
| 181 p = _handleExceptionAndCheckCall(array_call) | 181 p = _handleExceptionAndCheckCall(array_call) |
| 182 return p | 182 return p |
| 183 | 183 |
| 184 def bedToBigBed(sorted_bed_file_name, chrom_sizes_file_name, big_bed_file_name, | 184 def bedToBigBed(sorted_bed_file_name, chrom_sizes_file_name, big_bed_file_name, |
| 185 typeOption=None, autoSql=None, tab=False): | 185 typeOption=None, autoSql=None, tab=False, extraIndex=None): |
| 186 """ | 186 """ |
| 187 Call bedToBigBed on sorted_bed_file_name, using chrom_sizes_file_name and write the result into big_bed_file_name | 187 Call bedToBigBed on sorted_bed_file_name, using chrom_sizes_file_name and write the result into big_bed_file_name |
| 188 :param sorted_bed_file_name: | 188 :param sorted_bed_file_name: |
| 189 :param chrom_sizes_file_name: | 189 :param chrom_sizes_file_name: |
| 190 :param big_bed_file_name: | 190 :param big_bed_file_name: |
| 207 if autoSql: | 207 if autoSql: |
| 208 autoSql = ''.join(['-as=', autoSql]) | 208 autoSql = ''.join(['-as=', autoSql]) |
| 209 array_call.append(autoSql) | 209 array_call.append(autoSql) |
| 210 if tab: | 210 if tab: |
| 211 array_call.append('-tab') | 211 array_call.append('-tab') |
| 212 if extraIndex: | |
| 213 index = ''.join(['-extraIndex=', extraIndex]) | |
| 214 array_call.append(index) | |
| 212 | 215 |
| 213 p = _handleExceptionAndCheckCall(array_call) | 216 p = _handleExceptionAndCheckCall(array_call) |
| 214 return p | 217 return p |
| 215 | 218 |
| 216 def sortBam(input_bam_file_name, output_sorted_bam_name): | 219 def sortBam(input_bam_file_name, output_sorted_bam_name): |
