Skip to content
Snippets Groups Projects
Commit ad06f674 authored by Bollen's avatar Bollen
Browse files

Use python drop-in replacement in case FASTQ_COUNT conig value is not supplied

parent 34268578
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,9 @@ is not yet in conda, it must be compiled on the user's system before
running the pipeline. When compiled, the path to the executable can be
supplied via `--config FASTQ_COUNT=/path/to/fastq-count`.
TODO: Implement drop-in replacement in python for users not wanting to
compile fastq-count.
A drop-in replacement implemented in python exists in this repository.
Not specifing the `FASTQ_COUNT` config value will use the python replacement.
Do note that this python replacement is an order of magnitude slower.
## Operating system
......
......@@ -29,6 +29,11 @@ colpy = join(join(_this_dir, "src"), "collect_stats.py")
vs_py = join(join(_this_dir, "src"), "vcfstats.py")
mpy = join(join(_this_dir, "src"), "merge_stats.py")
if FASTQ_COUNT is None:
fqc = "python {0}".format(join(join(_this_dir, "src"), "fastq-count.py"))
else:
fqc = FASTQ_COUNT
with open(config.get("SAMPLE_CONFIG")) as handle:
SAMPLE_CONFIG = json.load(handle)
SAMPLES = SAMPLE_CONFIG['samples'].keys()
......@@ -396,7 +401,7 @@ rule fqcount_preqc:
r1=out_path("{sample}/pre_process/{sample}.merged_R1.fastq.gz"),
r2=out_path("{sample}/pre_process/{sample}.merged_R2.fastq.gz")
params:
fastqcount=FASTQ_COUNT
fastqcount=fqc
output:
out_path("{sample}/pre_process/{sample}.preqc_count.json")
shell: "{params.fastqcount} {input.r1} {input.r2} > {output}"
......@@ -407,7 +412,7 @@ rule fqcount_postqc:
r1=out_path("{sample}/pre_process/{sample}.cutadapt_R1.fastq"),
r2=out_path("{sample}/pre_process/{sample}.cutadapt_R2.fastq")
params:
fastqcount=FASTQ_COUNT
fastqcount=fqc
output:
out_path("{sample}/pre_process/{sample}.postqc_count.json")
shell: "{params.fastqcount} {input.r1} {input.r2} > {output}"
......
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