Skip to content

Commit

Permalink
fix sigprofiler module + mc subworkflow
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgiagandolfi committed Jan 22, 2025
1 parent 3e5ca68 commit 6307915
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
16 changes: 10 additions & 6 deletions modules/local/SigProfiler/SigProfiler/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ process SIGPROFILER {
import shutil
import pandas as pd
import multiprocessing
from importlib.metadata import version
from SigProfilerExtractor import sigpro as sig
from SigProfilerMatrixGenerator.scripts import SigProfilerMatrixGeneratorFunc as matGen
Expand Down Expand Up @@ -154,12 +155,15 @@ process SIGPROFILER {
shutil.copytree(source_dir, dest_dir, dirs_exist_ok=True)
# Write version
SigProfilerMatrixGenerator_version = os.popen("pip show SigProfilerMatrixGenerator | grep Version | awk '{print $NF}'").read().strip()
SigProfilerExtractor_version = os.popen("pip show SigProfilerExtractor | grep Version | awk '{print $NF}'").read().strip()
with open("versions.yml", "w") as f:
f.write(f'"$task.process":\n')
f.write(f' SigProfilerMatrixGenerator: {SigProfierMatrixGenerator_version}\n')
f.write(f' SigProfilerExtractor: {SigProfilerExtractor_version}\n')
SigProfilerMatrixGenerator_version = version("SigProfilerMatrixGenerator")
SigProfilerExtractor_version = version("SigProfilerExtractor")
with open('versions.yml', 'a') as f:
f.write('"${task.process}":'+"\\n")
f.write("\tSigProfilerMatrixGenerator: {SigProfilerMatrixGenerator_version}\\n")
f.write("\tSigProfilerExtractor: {SigProfilerExtractor_version}\\n")
"""

}
3 changes: 2 additions & 1 deletion subworkflows/local/signature_deconvolution/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ workflow SIGNATURE_DECONVOLUTION {
[meta.subMap('dataset', 'id'), tsv]}
| groupTuple

Sigprofiler_out = SIGPROFILER(input_sigprofiler, genome_path)
SIGPROFILER(input_sigprofiler, genome_path)
Sigprofiler_out = SIGPROFILER.out.sigprofiler_results
}

emit:
Expand Down

0 comments on commit 6307915

Please sign in to comment.