Skip to content

Commit

Permalink
Merge pull request #218 from AlexandrovLab/i4608
Browse files Browse the repository at this point in the history
I4608
  • Loading branch information
mdbarnesUCSD authored Sep 15, 2023
2 parents ea54ec2 + 8418de1 commit e807db2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
dist: xenial
language: python

vm:
size: 2x-large

python:
- '3.8'

Expand Down
4 changes: 2 additions & 2 deletions SigProfilerExtractor/sigpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def sigProfilerExtractor(input_type,
mtypes = ["CNV48"]
elif mtypes[0]=="32":
mtypes = ["SV32"]
elif mtypes[0]=="96" or "288" or "384" or "1536":
elif mtypes[0]=="96" or "288" or "384" or "1536" or "4608":
mtypes = ["SBS"+mtypes[0]]
else:
mtypes = ["CH"+mtypes[0]]
Expand Down Expand Up @@ -608,7 +608,7 @@ def sigProfilerExtractor(input_type,

if m.startswith("SBS"):
mutation_type = m
elif m in ["96","288","384","1536"]:
elif m in ["96","288","384","1536", "4608"]:
mutation_type="SBS"+m
elif m.startswith("78"):
mutation_type="DBS78"
Expand Down
15 changes: 9 additions & 6 deletions SigProfilerExtractor/subroutines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,19 +1095,22 @@ def export_information(loopResults, mutation_type, output, index, colnames, sequ


if m=="DBS78":
plot.plotDBS(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot" , "S"+str(i), "78", True, custom_text_upper=stability_list, custom_text_middle=total_mutation_list)
plot.plotDBS(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot/" , "S"+str(i), "78", True, custom_text_upper=stability_list, custom_text_middle=total_mutation_list)
elif m=="ID83":
plot.plotID(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot" , "S"+str(i), "83", True, custom_text_upper=stability_list, custom_text_middle=total_mutation_list)
plot.plotID(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot/" , "S"+str(i), "83", True, custom_text_upper=stability_list, custom_text_middle=total_mutation_list)
elif m=="CNV48":
plot.plotCNV(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot" , "S"+str(i), "pdf", percentage=True, aggregate=False)
plot.plotCNV(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot/" , "S"+str(i), "pdf", percentage=True, aggregate=False)
elif m=="SV32":
plot.plotSV(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot" , "S"+str(i), "pdf", percentage=True, aggregate=False)
elif m=="SBS96" or m=="SBS288" or m=="SBS384" or m=="SBS1536" or m=="4608":
plot.plotSV(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot/" , "S"+str(i), "pdf", percentage=True, aggregate=False)
elif m=="SBS96" or m=="SBS288" or m=="SBS384" or m=="SBS1536" or m=="SBS4608":
# parse 'm' to be accepted by the plotSBS function
tmp_m = m
if m.startswith("SBS"):
tmp_m = m[3:]
plot.plotSBS(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot", "S"+str(i), tmp_m, True, custom_text_upper=stability_list, custom_text_middle=total_mutation_list)
if m=="SBS96" or m=="SBS288" or m=="SBS384" or m=="SBS1536":
plot.plotSBS(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot/", "S"+str(i), tmp_m, True, custom_text_upper=stability_list, custom_text_middle=total_mutation_list)
elif m=="SBS4608":
plot.plotSBS(signature_subdirectory+"/"+mutation_type+"_S"+str(i)+"_Signatures"+".txt", signature_subdirectory+"/Signature_plot/", "S"+str(i), tmp_m, True)
else:
custom_signatures_plot(processes, signature_subdirectory)

Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if os.path.exists("dist"):
shutil.rmtree("dist")

VERSION = '1.1.21'
VERSION = '1.1.22'


with open('README.md') as f:
Expand All @@ -20,7 +20,7 @@ def write_version_py(filename='SigProfilerExtractor/version.py'):
# THIS FILE IS GENERATED FROM SIGPROFILEREXTRACTOR SETUP.PY
short_version = '%(version)s'
version = '%(version)s'
Update = 'Upgrade v1.1.21: Resolve plotSBS context issue.'
Update = 'Upgrade v1.1.22: Resolve issue with 4608 plotting as custom'
"""
fh = open(filename, 'w')
Expand All @@ -32,9 +32,9 @@ def write_version_py(filename='SigProfilerExtractor/version.py'):
'numpy>=1.21.2',
'pandas>=1.2.4',
'nimfa>=1.1.0',
'SigProfilerMatrixGenerator>=1.2.12',
'sigProfilerPlotting>=1.3.10',
'SigProfilerAssignment>=0.0.25',
'SigProfilerMatrixGenerator>=1.2.17',
'sigProfilerPlotting>=1.3.16',
'SigProfilerAssignment>=0.0.32',
'pillow',
'statsmodels>=0.9.0',
'scikit-learn>=0.24.2',
Expand Down

0 comments on commit e807db2

Please sign in to comment.