Skip to content

Commit

Permalink
add rule to determine fastq length
Browse files Browse the repository at this point in the history
  • Loading branch information
lauralwd committed Jan 8, 2020
1 parent 54c74ab commit 5c17cc5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1254,3 +1254,18 @@ rule checkm_curated_bins:
fi
checkm lineage_wf -t {threads} {params.options} {input.bins} {params.dir} -f {output.table} > {log.stdout} 2> {log.stderr}
"""
rule fastq_length:
input:
"{folder}/{file}.fastq.gz"
output:
"{folder}/{file}.fastq_length"
log:
stderr="logs/fastq_length_{folder}_{file}.stderr"
shell:
"""
echo "$(zcat {input} | wc -l) / 4" | bc > {output}
"""

rule collect_fastq_lengths:
input:
expand("data/sequencing_genomic/{hostcode}_R1.fastq_length",hostcode=HOSTCODES)

0 comments on commit 5c17cc5

Please sign in to comment.