Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit 8b33580

Browse files
committed
Switch back to using multiple threads for CRAM generation in benchmark mode, as even with a single thread the file sizes can differ
1 parent 0f141a8 commit 8b33580

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

gemBS/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,9 +799,9 @@ def mapping(name=None,index=None,fliInfo=None,inputFiles=None,ftype=None,filetyp
799799
if benchmark_mode:
800800
bamSort.append("--no-PG")
801801
if outfile.endswith('.cram'):
802-
bamSort.extend(['-O', 'CRAM']);
802+
bamSort.extend(['-O', 'CRAM', "-@", sort_threads]);
803803
if not benchmark_mode:
804-
bamSort.extend(['--reference', greference, "-@", sort_threads]);
804+
bamSort.extend(['--reference', greference]);
805805
else:
806806
bamSort.extend(["-@", sort_threads]);
807807

@@ -847,9 +847,9 @@ def merging(inputs=None,sample=None,threads="1",outname=None,tmpDir="/tmp/",benc
847847
if benchmark_mode:
848848
bammerging.append("--no-PG")
849849
if bam_filename.endswith('.cram'):
850-
bammerging.extend(['-O', 'CRAM']);
850+
bammerging.extend(['-O', 'CRAM', '--threads', threads]);
851851
if not benchmark_mode:
852-
bammerging.extend(['--reference', greference, '--threads', threads]);
852+
bammerging.extend(['--reference', greference]);
853853
else:
854854
bammerging.extend(['--threads', threads]);
855855

gemBS/production.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ def run(self,args):
989989
if len(self.contig_list) == 1:
990990
if os.path.isfile(self.contig_list[0]):
991991
#Check if contig_list is a file or just a list of chromosomes
992-
#Parse file to extract chromosme list
992+
#Parse file to extract chromosome list
993993
tmp_list = []
994994
with open(self.contig_list[0] , 'r') as chromFile:
995995
for line in chromFile:
@@ -1360,7 +1360,7 @@ def register(self,parser):
13601360
parser.add_argument('-N','--non-cpg', dest="non_cpg", action="store_true", help="Output gemBS bed with non-cpg sites.")
13611361
parser.add_argument('-B','--bed-methyl', dest="bedMethyl", action="store_true", help="Output bedMethyl files (bed and bigBed)")
13621362
parser.add_argument('-S','--snps', dest="snps", action="store_true",help="Output SNPs")
1363-
parser.add_argument('--extract-threads', dest="extract_threads", metavar="THREADS", help='Number of extra threads for extract step')
1363+
parser.add_argument('-t','--extract-threads', dest="extract_threads", metavar="THREADS", help='Number of extra threads for extract step')
13641364
parser.add_argument('--snp-list', dest="snp_list", help="List of SNPs to output")
13651365
parser.add_argument('--snp-db', dest="snp_db", help="dbSNP_idx processed SNP idx")
13661366
parser.add_argument('--dry-run', dest="dry_run", action="store_true", help="Output mapping commands without execution")

0 commit comments

Comments
 (0)