Skip to content

Commit 31f3ccd

Browse files
committed
refactor: remove duplicate reference_paths() calls and dead os.system comments
1 parent 3956389 commit 31f3ccd

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎SigProfilerSimulator/SigProfilerSimulator.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ def SigProfilerSimulator (project, project_path, genome, contexts, exome=None, s
149149

150150
chromosome_string_path, ref_dir = matRef.reference_paths(genome)
151151
if species == 'custom':
152-
chromosome_string_path, ref_dir = matRef.reference_paths(genome)
153152
chromosomes = os.listdir(chromosome_string_path)
154153
if ".DS_Store" in chromosomes:
155154
chromosomes.remove(".DS_Store")
@@ -172,10 +171,8 @@ def SigProfilerSimulator (project, project_path, genome, contexts, exome=None, s
172171
os.makedirs(project_path + "logs/")
173172

174173
if os.path.exists(error_file):
175-
# os.system("rm " + error_file)
176174
os.remove(error_file)
177175
if os.path.exists(log_file):
178-
# os.system("rm " + log_file)
179176
os.remove(log_file)
180177

181178

@@ -200,7 +197,6 @@ def SigProfilerSimulator (project, project_path, genome, contexts, exome=None, s
200197

201198
############################## Pre-simulation Checks ##################################################################################################
202199
# Ensures that the chromosome strings are saves properly:
203-
chromosome_string_path, ref_dir = matRef.reference_paths(genome)
204200
if os.path.exists(chromosome_string_path) == False or len(os.listdir(chromosome_string_path)) < len(chromosomes):
205201
print(" The chromosome strings were not saved properly or have not been created yet. Please refer to the SigProfilerMatrixGenerator README for installation instructions:\n\thttps://github.com/AlexandrovLab/SigProfilerMatrixGenerator")
206202
sys.exit()

0 commit comments

Comments
 (0)