Skip to content

Commit

Permalink
added unshuffled reads as temp file
Browse files Browse the repository at this point in the history
  • Loading branch information
idfarbanecha committed Jul 6, 2021
1 parent 917eec6 commit 4e42827
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions mess/scripts/simulate_reads.rules
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,10 @@ def concat_fastq(wildcards):
community=community_name, assemblyname=assemblynames)





rule concat_fastqs:
input: concat_fastq

output: 'simreads/{community}-{rep}_R{rd}.unshuffled.fq'
output: temp('simreads/{community}-{rep}_R{rd}.unshuffled.fq')

resources: parallel_cat = 1

Expand All @@ -257,6 +254,27 @@ rule concat_fastqs:
"""


rule shuffle_fastqs:
conda: "../envs/seqkit.yml"

input: 'simreads/{community}-{rep}_R{rd}.unshuffled.fq'

output: 'simreads/{community}-{rep}_R{rd}.fq.gz'

params: seed = lambda wildcards: seed_dic[int(wildcards.rep)]

log: "logs/shuffling/{community}-{rep}-{rd}.log"

benchmark: "benchmark/shuffle/{community}-{rep}_{rd}.txt"

threads: 10

shell:
"""
seqkit shuffle {input} -j {threads} -s {params.seed} -o {output} &> {log}
"""


rule get_taxonomic_profile:
conda: "../envs/utils.yml"

Expand Down Expand Up @@ -286,26 +304,3 @@ rule create_krona_chart:



rule shuffle_fastqs:
conda: "../envs/seqkit.yml"

input: 'simreads/{community}-{rep}_R{rd}.unshuffled.fq'

output: 'simreads/{community}-{rep}_R{rd}.fq.gz'

params: seed = lambda wildcards: seed_dic[int(wildcards.rep)]

log: "logs/shuffling/{community}-{rep}-{rd}.log"

benchmark: "benchmark/shuffle/{community}-{rep}_{rd}.txt"

threads: 10

shell:
"""
seqkit shuffle {input} -j {threads} -s {params.seed} -o {output} &> {log}
"""




0 comments on commit 4e42827

Please sign in to comment.