From 8b33580390dd0f975dbb0f7e3f72ed34ce7b17c1 Mon Sep 17 00:00:00 2001 From: Simon Heath Date: Wed, 18 Mar 2020 12:35:53 +0100 Subject: [PATCH] Switch back to using multiple threads for CRAM generation in benchmark mode, as even with a single thread the file sizes can differ --- gemBS/__init__.py | 8 ++++---- gemBS/production.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gemBS/__init__.py b/gemBS/__init__.py index e8ed7858..3e41753e 100644 --- a/gemBS/__init__.py +++ b/gemBS/__init__.py @@ -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]); @@ -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]); diff --git a/gemBS/production.py b/gemBS/production.py index 3d9fc41a..6e922fec 100644 --- a/gemBS/production.py +++ b/gemBS/production.py @@ -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: @@ -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")