Skip to content
Snippets Groups Projects
Commit de0a927c authored by Haarst, Jan van's avatar Haarst, Jan van
Browse files

Subsample reads, so that crossmathc doesn't choke

parent 7be54d96
No related branches found
No related tags found
No related merge requests found
"""
@version: 0.1
Use seqtk toolkit
Required programs:
* seqtk (bioconda)
"""
import os, subprocess
import configparser
__author__ = "Jan van Haarst"
__email__ = "jan.vanhaarst@wur.nl"
rule seqtk_sample:
input: "{name}.fasta"
params:
number = CONFIG["seqtk"]["options"]["number"],
seed = CONFIG["seqtk"]["options"]["seed"]
output: "{name}.sampled.fasta"
shell:
"""
seqtk sample -s{params.seed} {input} {params.number} > {output}
"""
......@@ -50,6 +50,9 @@ workdir: CONFIG["base"]["working_dir"]
# Include necessary rules
include: ruleDir + "/repeats/reas.rules"
include: ruleDir + "/fastqProcessors/Sra.rules"
include: ruleDir + "/fastqProcessors/Seqtk.rules"
os.mkdir(strip_path_level(CONFIG['executables']['reas'],1))
rule all:
input:
......
......@@ -48,6 +48,12 @@
"seg_file" : "seg.fa"
}
},
"seqtk":{
"options":{
"number" : "1000000",
"seed" : "314159"
}
},
"sra":
{
"sra_download" :{
......@@ -57,5 +63,5 @@
"options" : "--split-files --fasta"
}
},
"reads" : "{download_dir}sra/ERR171441_1.fasta"
"reads" : "{download_dir}sra/ERR171441_1.sampled.fasta"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment