Browse Source

bug fix organelle classification

master
Christiane Hassenrueck 4 months ago
parent
commit
c4a24efac8
  1. 5
      Amplicon_dada2_MiSeq/Snakefile_classification
  2. 4
      Amplicon_dada2_MiSeq/scripts/classification.R

5
Amplicon_dada2_MiSeq/Snakefile_classification

@ -42,6 +42,7 @@ rule dada2_classification:
adir = config["adir"],
analysis = config["analysis"],
train_set = config["ref_rdp"],
taxmap = config["silva_taxrank"],
lineage = config["lineage"],
plastid = config["organelle_rdp"]
conda:
@ -54,9 +55,9 @@ rule dada2_classification:
"""
if [[ "{params.plastid}" != "" ]]
then
{params.script} -n {params.project} -a {input.asvtab} -f {input.fasta} -b {params.min_boot} -t {params.train_set} -l "{params.lineage}" -o {params.plastid} -d {params.adir} -v {params.analysis} -c {threads} &>> {log}
{params.script} -n {params.project} -a {input.asvtab} -f {input.fasta} -b {params.min_boot} -t {params.train_set} -m {params.taxmap} -l "{params.lineage}" -o {params.plastid} -d {params.adir} -v {params.analysis} -c {threads} &>> {log}
else
{params.script} -n {params.project} -a {input.asvtab} -f {input.fasta} -b {params.min_boot} -t {params.train_set} -l "{params.lineage}" -d {params.adir} -v {params.analysis} -c {threads} &>> {log}
{params.script} -n {params.project} -a {input.asvtab} -f {input.fasta} -b {params.min_boot} -t {params.train_set} -m {params.taxmap} -l "{params.lineage}" -d {params.adir} -v {params.analysis} -c {threads} &>> {log}
fi
"""

4
Amplicon_dada2_MiSeq/scripts/classification.R

@ -452,8 +452,8 @@ if(!is.null(opt$plastid)) {
# change column names to lowercase for compatibility with blast output
colnames(organelle.filt.clean) <- tolower(colnames(organelle.filt.clean))
tax.plas <- organelle.filt.clean[organelle.filt.clean$Kingdom == "Eukaryota:plas", , drop = F]
tax.mito <- organelle.filt.clean[organelle.filt.clean$Kingdom == "Eukaryota:mito", , drop = F]
tax.plas <- organelle.filt.clean[organelle.filt.clean$kingdom == "Eukaryota:plas", , drop = F]
tax.mito <- organelle.filt.clean[organelle.filt.clean$kingdom == "Eukaryota:mito", , drop = F]
# remove plas and mito from taxon names
if(nrow(tax.plas) > 0) {

Loading…
Cancel
Save