Commit c16471f6 authored by Midoux Cedric's avatar Midoux Cedric
Browse files

no biom, tsv export

parent 5ade9a3c
......@@ -12,9 +12,9 @@ rule makeSequenceTable:
input:
expand("work/dada/{sample}.rds", sample=SAMPLES)
output:
table = "work/dada/seqtab.rds",
rds = "work/dada/seqtab.rds",
fasta = "work/dada/seqtab.fasta",
biom = "work/dada/dada2.biom"
tsv = "work/dada/seqtab.tsv"
threads:
config["THREADS"]
script:
......
......@@ -7,8 +7,8 @@ rule all:
input:
"report/multiqc_report.html",
expand("work/dada/{sample}.rds", sample=SAMPLES),
"work/dada/seqtab.rds",
"work/dada/seqtab.fasta"
"work/dada/seqtab.fasta",
"work/dada/seqtab.tsv"
include: "quality.smk"
include: "preprocess.smk"
......
library(dada2)
library(biomformat)
dada_list <- lapply(snakemake@input, readRDS)
names(dada_list) <- lapply(snakemake@input, function(x){basename(tools::file_path_sans_ext(x))})
......@@ -7,9 +6,8 @@ names(dada_list) <- lapply(snakemake@input, function(x){basename(tools::file_pat
seqtab <- makeSequenceTable(dada_list, orderBy = "abundance")
seqtab.nochim <- removeBimeraDenovo(seqtab, method="consensus", multithread = snakemake@threads, verbose = TRUE)
saveRDS(seqtab.nochim, snakemake@output$table)
saveRDS(seqtab.nochim, snakemake@output$rds)
uniquesToFasta(seqtab.nochim, snakemake@output$fasta)
biom <- make_biom(t(seqtab.nochim))
write_biom(biom, snakemake@output$biom)
write.table(t(seqtab.nochim), snakemake@output$tsv, sep = "\t", quote = FALSE)
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