Skip to content

Commit

Permalink
Switch back to using multiple threads for CRAM generation in benchmar…
Browse files Browse the repository at this point in the history
…k mode, as even with a single thread the file sizes can differ
  • Loading branch information
heathsc committed Mar 18, 2020
1 parent 0f141a8 commit 8b33580
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions gemBS/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,9 +799,9 @@ def mapping(name=None,index=None,fliInfo=None,inputFiles=None,ftype=None,filetyp
if benchmark_mode:
bamSort.append("--no-PG")
if outfile.endswith('.cram'):
bamSort.extend(['-O', 'CRAM']);
bamSort.extend(['-O', 'CRAM', "-@", sort_threads]);
if not benchmark_mode:
bamSort.extend(['--reference', greference, "-@", sort_threads]);
bamSort.extend(['--reference', greference]);
else:
bamSort.extend(["-@", sort_threads]);

Expand Down Expand Up @@ -847,9 +847,9 @@ def merging(inputs=None,sample=None,threads="1",outname=None,tmpDir="/tmp/",benc
if benchmark_mode:
bammerging.append("--no-PG")
if bam_filename.endswith('.cram'):
bammerging.extend(['-O', 'CRAM']);
bammerging.extend(['-O', 'CRAM', '--threads', threads]);
if not benchmark_mode:
bammerging.extend(['--reference', greference, '--threads', threads]);
bammerging.extend(['--reference', greference]);
else:
bammerging.extend(['--threads', threads]);

Expand Down
4 changes: 2 additions & 2 deletions gemBS/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ def run(self,args):
if len(self.contig_list) == 1:
if os.path.isfile(self.contig_list[0]):
#Check if contig_list is a file or just a list of chromosomes
#Parse file to extract chromosme list
#Parse file to extract chromosome list
tmp_list = []
with open(self.contig_list[0] , 'r') as chromFile:
for line in chromFile:
Expand Down Expand Up @@ -1360,7 +1360,7 @@ def register(self,parser):
parser.add_argument('-N','--non-cpg', dest="non_cpg", action="store_true", help="Output gemBS bed with non-cpg sites.")
parser.add_argument('-B','--bed-methyl', dest="bedMethyl", action="store_true", help="Output bedMethyl files (bed and bigBed)")
parser.add_argument('-S','--snps', dest="snps", action="store_true",help="Output SNPs")
parser.add_argument('--extract-threads', dest="extract_threads", metavar="THREADS", help='Number of extra threads for extract step')
parser.add_argument('-t','--extract-threads', dest="extract_threads", metavar="THREADS", help='Number of extra threads for extract step')
parser.add_argument('--snp-list', dest="snp_list", help="List of SNPs to output")
parser.add_argument('--snp-db', dest="snp_db", help="dbSNP_idx processed SNP idx")
parser.add_argument('--dry-run', dest="dry_run", action="store_true", help="Output mapping commands without execution")
Expand Down

0 comments on commit 8b33580

Please sign in to comment.