From 3d65e2bd6ec48b77e53851ff3c512026473aa9bb Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:14:27 +0200 Subject: [PATCH 1/8] bump to 2.4.0dev --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index b82db937..923d86b8 100644 --- a/nextflow.config +++ b/nextflow.config @@ -256,7 +256,7 @@ manifest { description = """Nextflow rnafusion analysis pipeline, part of the nf-core community.""" mainScript = 'main.nf' nextflowVersion = '!>=22.10.1' - version = '2.3.0' + version = '2.4.0dev' doi = '' } From a2a2d86234ed434fe9e5b226fd7ff68546f84a41 Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Wed, 26 Apr 2023 09:53:05 +0200 Subject: [PATCH 2/8] change container for megafusion --- modules/local/megafusion/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/local/megafusion/main.nf b/modules/local/megafusion/main.nf index 2965177e..d8cb5db0 100644 --- a/modules/local/megafusion/main.nf +++ b/modules/local/megafusion/main.nf @@ -4,8 +4,8 @@ process MEGAFUSION { conda "conda-forge::python=3.8.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/python:3.9--1' : - 'quay.io/biocontainers/python:3.9--1' }" + 'https://depot.galaxyproject.org/singularity/pandas:1.5.2' : + 'quay.io/biocontainers/pandas:1.5.2' }" input: tuple val(meta), path(tsv), path(report) From a13eaa7b43eb14402adab7186efd2180a85515f3 Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:20:12 +0200 Subject: [PATCH 3/8] fix megafusion script --- bin/megafusion.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) mode change 100644 => 100755 bin/megafusion.py diff --git a/bin/megafusion.py b/bin/megafusion.py old mode 100644 new mode 100755 index 53e5a23d..82a53860 --- a/bin/megafusion.py +++ b/bin/megafusion.py @@ -100,8 +100,17 @@ def read_build_fusionreport(fusionreport_file): with open(fusionreport_file) as fusionreport: from_html = [line.split('rows": [')[1] for line in fusionreport if 'name="fusion_list' in line] expression = from_html[0].split('], "tool')[0] - return pd.DataFrame.from_dict(ast.literal_eval(expression)).set_index("fusion") - + fusion_report = pd.DataFrame.from_dict(ast.literal_eval(expression)).set_index("fusion") + if not 'arriba' in fusion_report.columns: + fusion_report['arriba'] = '' + if not 'fusioncatcher' in fusion_report.columns: + fusion_report['fusioncatcher'] = '' + if not 'pizzly' in fusion_report.columns: + fusion_report['pizzly'] = '' + if not 'squid' in fusion_report.columns: + fusion_report['squid'] = '' + if not 'starfusion' in fusion_report.columns: + fusion_report['starfusion'] = '' def column_manipulation(df): df["ALT"] = "" From c8c61701a6eabd3d5e704189e6c33152b26e99f0 Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:22:01 +0200 Subject: [PATCH 4/8] fix megafusion script --- bin/megafusion.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/megafusion.py b/bin/megafusion.py index 82a53860..31b07c32 100755 --- a/bin/megafusion.py +++ b/bin/megafusion.py @@ -111,6 +111,7 @@ def read_build_fusionreport(fusionreport_file): fusion_report['squid'] = '' if not 'starfusion' in fusion_report.columns: fusion_report['starfusion'] = '' + return fusionreport def column_manipulation(df): df["ALT"] = "" From f13512cc69d23e58a26fe9acaf98e257e46a567c Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:23:51 +0200 Subject: [PATCH 5/8] fix megafusion script --- bin/megafusion.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/megafusion.py b/bin/megafusion.py index 31b07c32..ee3d8615 100755 --- a/bin/megafusion.py +++ b/bin/megafusion.py @@ -101,17 +101,17 @@ def read_build_fusionreport(fusionreport_file): from_html = [line.split('rows": [')[1] for line in fusionreport if 'name="fusion_list' in line] expression = from_html[0].split('], "tool')[0] fusion_report = pd.DataFrame.from_dict(ast.literal_eval(expression)).set_index("fusion") - if not 'arriba' in fusion_report.columns: - fusion_report['arriba'] = '' - if not 'fusioncatcher' in fusion_report.columns: - fusion_report['fusioncatcher'] = '' - if not 'pizzly' in fusion_report.columns: - fusion_report['pizzly'] = '' - if not 'squid' in fusion_report.columns: - fusion_report['squid'] = '' - if not 'starfusion' in fusion_report.columns: - fusion_report['starfusion'] = '' - return fusionreport + if not 'arriba' in fusion_report.columns: + fusion_report['arriba'] = '' + if not 'fusioncatcher' in fusion_report.columns: + fusion_report['fusioncatcher'] = '' + if not 'pizzly' in fusion_report.columns: + fusion_report['pizzly'] = '' + if not 'squid' in fusion_report.columns: + fusion_report['squid'] = '' + if not 'starfusion' in fusion_report.columns: + fusion_report['starfusion'] = '' + return fusionreport def column_manipulation(df): df["ALT"] = "" From f6f1ea0d0c7e0d53447aad8ef57572bcb0a6dc1d Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:25:37 +0200 Subject: [PATCH 6/8] fix megafusion script --- bin/megafusion.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/megafusion.py b/bin/megafusion.py index ee3d8615..3a4bd092 100755 --- a/bin/megafusion.py +++ b/bin/megafusion.py @@ -97,10 +97,10 @@ def build_fusioninspector_dataframe(file, map): def read_build_fusionreport(fusionreport_file): - with open(fusionreport_file) as fusionreport: - from_html = [line.split('rows": [')[1] for line in fusionreport if 'name="fusion_list' in line] + with open(fusionreport_file) as f: + from_html = [line.split('rows": [')[1] for line in f if 'name="fusion_list' in line] expression = from_html[0].split('], "tool')[0] - fusion_report = pd.DataFrame.from_dict(ast.literal_eval(expression)).set_index("fusion") + fusion_report = pd.DataFrame.from_dict(ast.literal_eval(expression)).set_index("fusion") if not 'arriba' in fusion_report.columns: fusion_report['arriba'] = '' if not 'fusioncatcher' in fusion_report.columns: @@ -111,7 +111,7 @@ def read_build_fusionreport(fusionreport_file): fusion_report['squid'] = '' if not 'starfusion' in fusion_report.columns: fusion_report['starfusion'] = '' - return fusionreport + return fusion_report def column_manipulation(df): df["ALT"] = "" From 26bf92f0e2f35d3ba762220f8d733eb8a098197d Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:29:32 +0200 Subject: [PATCH 7/8] bump version --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 923d86b8..376567b7 100644 --- a/nextflow.config +++ b/nextflow.config @@ -256,7 +256,7 @@ manifest { description = """Nextflow rnafusion analysis pipeline, part of the nf-core community.""" mainScript = 'main.nf' nextflowVersion = '!>=22.10.1' - version = '2.4.0dev' + version = '2.3.2' doi = '' } From 1b41c3abb07cd82b1d2c4d362432a05a1ea4e4ad Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:30:13 +0200 Subject: [PATCH 8/8] black --- bin/megafusion.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/bin/megafusion.py b/bin/megafusion.py index 3a4bd092..6f27b296 100755 --- a/bin/megafusion.py +++ b/bin/megafusion.py @@ -101,18 +101,19 @@ def read_build_fusionreport(fusionreport_file): from_html = [line.split('rows": [')[1] for line in f if 'name="fusion_list' in line] expression = from_html[0].split('], "tool')[0] fusion_report = pd.DataFrame.from_dict(ast.literal_eval(expression)).set_index("fusion") - if not 'arriba' in fusion_report.columns: - fusion_report['arriba'] = '' - if not 'fusioncatcher' in fusion_report.columns: - fusion_report['fusioncatcher'] = '' - if not 'pizzly' in fusion_report.columns: - fusion_report['pizzly'] = '' - if not 'squid' in fusion_report.columns: - fusion_report['squid'] = '' - if not 'starfusion' in fusion_report.columns: - fusion_report['starfusion'] = '' + if not "arriba" in fusion_report.columns: + fusion_report["arriba"] = "" + if not "fusioncatcher" in fusion_report.columns: + fusion_report["fusioncatcher"] = "" + if not "pizzly" in fusion_report.columns: + fusion_report["pizzly"] = "" + if not "squid" in fusion_report.columns: + fusion_report["squid"] = "" + if not "starfusion" in fusion_report.columns: + fusion_report["starfusion"] = "" return fusion_report + def column_manipulation(df): df["ALT"] = "" df = df.reset_index()