Skip to content
Snippets Groups Projects
Commit 98848d41 authored by christine.tranchant_ird.fr's avatar christine.tranchant_ird.fr
Browse files

remove get_threads( function

parent db3245b6
No related branches found
No related tags found
No related merge requests found
...@@ -30,4 +30,4 @@ rule abyss_merge: ...@@ -30,4 +30,4 @@ rule abyss_merge:
process = subprocess.run(cmd, shell=True, capture_output=True, text=True) process = subprocess.run(cmd, shell=True, capture_output=True, text=True)
if process.returncode != 0: if process.returncode != 0:
raise ValueError(f"Error executing command: {process.stderr}") raise ValueError(f"Error executing command: {process.stderr}")
\ No newline at end of file
...@@ -7,7 +7,7 @@ rule samtools_flagstat: ...@@ -7,7 +7,7 @@ rule samtools_flagstat:
log: log:
output = f"{frangipane_obj.path_logs}/stats/flagstat-{{sample_name}}-{{ref_name}}.o", output = f"{frangipane_obj.path_logs}/stats/flagstat-{{sample_name}}-{{ref_name}}.o",
error = f"{frangipane_obj.path_logs}/stats/flagstat-{{sample_name}}-{{ref_name}}.e" error = f"{frangipane_obj.path_logs}/stats/flagstat-{{sample_name}}-{{ref_name}}.e"
threads: get_threads('samtools_flagstat', 1) threads: 1
message: message:
f"""-------------------- f"""--------------------
-Running {{rule}} -Running {{rule}}
...@@ -28,4 +28,4 @@ rule samtools_flagstat: ...@@ -28,4 +28,4 @@ rule samtools_flagstat:
""" """
cmd="samtools flagstat -@ {threads} {input.bam_file}"; cmd="samtools flagstat -@ {threads} {input.bam_file}";
(echo $cmd) > {log.output}; (echo $cmd) > {log.output};
($cmd) 1> {output.stat_file} 2> {log.error}""" ($cmd) 1> {output.stat_file} 2> {log.error}"""
\ No newline at end of file
...@@ -10,7 +10,7 @@ rule samtools_view: ...@@ -10,7 +10,7 @@ rule samtools_view:
output = f"{frangipane_obj.path_logs}/samtools_view/{{sample_name}}-{{ref_name}}.o" output = f"{frangipane_obj.path_logs}/samtools_view/{{sample_name}}-{{ref_name}}.o"
params: params:
other_options = frangipane_obj.get_config_value("PARAMS","samtools_view"), other_options = frangipane_obj.get_config_value("PARAMS","samtools_view"),
threads: get_threads('samtools_view', 1) threads: 1
message: message:
f"""-------------------- f"""--------------------
-Running {{rule}} -Running {{rule}}
...@@ -37,4 +37,4 @@ rule samtools_view: ...@@ -37,4 +37,4 @@ rule samtools_view:
cmd2="samtools index -@ {threads} {output.bam_file}"; cmd2="samtools index -@ {threads} {output.bam_file}";
(echo $cmd2) >> {log.output}; (echo $cmd2) >> {log.output};
($cmd2) 1>> {log.output} 2>> {log.error}""" ($cmd2) 1>> {log.output} 2>> {log.error}"""
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment