Commit 79ec309d authored by Midoux Cedric's avatar Midoux Cedric
Browse files

biom export

parent 4b986440
...@@ -13,7 +13,8 @@ rule makeSequenceTable: ...@@ -13,7 +13,8 @@ rule makeSequenceTable:
expand("work/dada/{sample}.rds", sample=SAMPLES) expand("work/dada/{sample}.rds", sample=SAMPLES)
output: output:
table = "work/dada/seqtab.rds", table = "work/dada/seqtab.rds",
fasta = "work/dada/seqtab.fasta" fasta = "work/dada/seqtab.fasta",
biom = "work/dada/dada2.biom"
threads: threads:
config["THREADS"] config["THREADS"]
script: script:
......
library(dada2) library(dada2)
library(biomformat)
seqtab <- makeSequenceTable(lapply(snakemake@input, readRDS), orderBy = "abundance") dada_list <- lapply(snakemake@input, readRDS)
names(dada_list) <- lapply(snakemake@input, function(x){basename(tools::file_path_sans_ext(x))})
seqtab <- makeSequenceTable(dada_list, orderBy = "abundance")
seqtab.nochim <- removeBimeraDenovo(seqtab, method="consensus", multithread = snakemake@threads, verbose = TRUE) seqtab.nochim <- removeBimeraDenovo(seqtab, method="consensus", multithread = snakemake@threads, verbose = TRUE)
saveRDS(seqtab.nochim, snakemake@output$table) saveRDS(seqtab.nochim, snakemake@output$table)
uniquesToFasta(seqtab.nochim, snakemake@output$fasta) uniquesToFasta(seqtab.nochim, snakemake@output$fasta)
biom <- make_biom(seqtab.nochim)
write_biom(biom, snakemake@output$biom)
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