Commit 3b152cbc authored by Slaheddine Kastalli's avatar Slaheddine Kastalli
Browse files

add rule

parent a360a180
{
"THREADS": 1,
"srr": ["SRR1187735"],
"SAMPLES": ["SRR1187735"],
"FIVE_PRIMER": {"SRR1187735": "GTGYCAGCMGCCGCGGTA"},
"THREE_PRIMER": {"SRR1187735": "ACTYAAAKGAATTGRCGGGG"},
"THREADS": 5,
"SAMPLES": ["SRR5625858", "SRR5625859", "SRR5625860", "SRR5625864", "SRR5625861" ],
"FIVE_PRIMER": {"SRR5625858": "GTGYCAGCMGCCGCGGTA", "SRR5625859": "GTGYCAGCMGCCGCGGTA", "SRR5625860": "GTGYCAGCMGCCGCGGTA", "SRR5625864": "GTGYCAGCMGCCGCGGTA", "SRR5625861": "GTGYCAGCMGCCGCGGTA" },
"THREE_PRIMER": {"SRR5625858": "ACTYAAAKGAATTGRCGGGG", "SRR5625859": "ACTYAAAKGAATTGRCGGGG", "SRR5625860": "ACTYAAAKGAATTGRCGGGG", "SRR5625864": "ACTYAAAKGAATTGRCGGGG", "SRR5625861": "ACTYAAAKGAATTGRCGGGG"},
"DATABASE": "/db/frogs_databanks/assignation/16S/silva_132_16S_pintail100/silva_132_16S_pintail100.fasta"
}
}
\ No newline at end of file
......@@ -6,18 +6,18 @@ configfile: "./config.json"
SAMPLES=config["SAMPLES"]
rule all:
input:
input:expand("DATA/{sample}.sra.fastq.gz", sample=SAMPLES),
"report/multiqc_report.html",
expand("work/dada/{sample}.rds", sample=SAMPLES),
"work/dada/seqtab.fasta",
"work/dada/seqtab.tsv",
"work/dada/metrics.tsv",
"work/FROGS/affiliation.biom",
"work/frogs/affiliation.biom",
"report/clusters_metrics.html",
"report/affiliations_metrics.html",
"report/abundance.biom",
"report/abundance.tsv",
# "report/tree.nwk"
"report/tree.nwk"
include: "prefetech.smk"
include: "quality.smk"
......
rule prefetch:
output:
"DATA/.prefetch/{srr}.sra"
"DATA/.prefetch/{sample}.sra"
params:
"{srr} --max-size 50GB -O DATA"
"{sample} --max-size 50GB -O DATA"
log:
"DATA/.prefetch/sra/{srr}.log"
"DATA/.prefetch/sra/{sample}.log"
shell:
"conda activate sra-tools-2.10.1 "
"&& "
"prefetch {params} > {log} 2>&1 && touch {output} "
"&& "
"conda deactivate "
"conda activate sra-tools-2.10.1 "
"&& "
"prefetch --type fastq {params} > {log} 2>&1 && touch {output} "
"&& "
"conda deactivate "
rule fastqdump:
input:
"DATA/.prefetch/{srr}.sra"
"DATA/.prefetch/{sample}.sra",
output:
touch("DATA/done__{srr}_dump")
fwd = "DATA/{sample}.sra_1.fastq.gz",
rev = "DATA/{sample}.sra_2.fastq.gz"
params:
args = "-S -O DATA/ -t DATA/",
id_srr = "{srr}"
id_srr = "{sample}.sra"
log:
"DATA/{srr}.log"
"DATA/{sample}.log"
shell:
"conda activate sra-tools-2.10.1 "
"&& "
"fasterq-dump {params.args} {params.id_srr} > {log} 2>&1 "
"&& "
"conda deactivate "
\ No newline at end of file
"conda activate sra-tools-2.10.1 "
"&& "
"fasterq-dump --split-3 {params.args} {params.id_srr} --dumpbase --skip-technical --gzip -Z > {log} 2>&1 && touch {output} "
"&& "
"conda deactivate "
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment