Skip to content

Commit

Permalink
fix table extraction ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcantor22 committed Aug 14, 2024
1 parent fcacec6 commit a51ff5a
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion mmeds/snakemake/rules/file_manipulation.smk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ rule extract_feature_table_tsv:
"tables/{table}.qza"
output:
"tables/{table}.tsv"
wildcard_constraints:
table = "[^/]+"
conda:
"qiime2-2020.8.0"
shell:
Expand Down Expand Up @@ -32,7 +34,7 @@ rule extract_feature_table_tsv_class:
rm -f tables/{wildcards.table}.biom
"""

rule format_metadata_qiime_to_lefse:
rule format_metadata_qiime_to_lefse_class:
input:
feature_table = "tables/{class}/{table}.tsv",
mapping_file = "tables/qiime_mapping_file.tsv"
Expand All @@ -50,3 +52,22 @@ rule format_metadata_qiime_to_lefse:
"-s {params.subclass} "
"-u HostSubjectId "
"-o {output}"

rule format_metadata_qiime_to_lefse:
input:
feature_table = "tables/{table}.tsv",
mapping_file = "tables/qiime_mapping_file.tsv"
output:
"tables/{class}/lefse_format.{table}.{class}.{subclass}.tsv"
params:
subclass = lefse_get_subclass
conda:
"mmeds_test"
shell:
"format_lefse.py "
"-i {input.feature_table} "
"-m {input.mapping_file} "
"-c {wildcards.class} "
"-s {params.subclass} "
"-u HostSubjectId "
"-o {output}"

0 comments on commit a51ff5a

Please sign in to comment.