Skip to content

Commit

Permalink
EcoPhylo modify anvi_profile --min-percent-identity
Browse files Browse the repository at this point in the history
  • Loading branch information
mschecht committed Sep 13, 2023
1 parent a28088d commit e264bf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion anvio/workflows/ecophylo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, args=None, run=terminal.Run(), progress=terminal.Progress()):
rule_acceptable_params_dict['remove_sequences_with_X_percent_gaps'] = ['--max-percentage-gaps']
rule_acceptable_params_dict['fasttree'] = ['run']
rule_acceptable_params_dict['iqtree'] = ['run', '-m', 'additional_params']
rule_acceptable_params_dict['run_metagenomics_workflow'] = ['clusterize', 'clusterize_submission_params', 'HPC_string', 'snakemake_additional_params', 'bowtie2_additional_params']
rule_acceptable_params_dict['run_metagenomics_workflow'] = ['clusterize', 'clusterize_submission_params', 'HPC_string', 'snakemake_additional_params', 'bowtie2_additional_params', 'anvi_profile_min_percent_identity']

self.rule_acceptable_params_dict.update(rule_acceptable_params_dict)

Expand Down Expand Up @@ -293,6 +293,7 @@ def init(self):
self.metagenomics_workflow_snakemake_additional_params = self.get_param_value_from_config(['run_metagenomics_workflow', 'snakemake_additional_params'])

self.bowtie2_additional_params = self.get_param_value_from_config(['run_metagenomics_workflow','bowtie2_additional_params'])
self.anvi_profile_min_percent_identity = self.get_param_value_from_config(['run_metagenomics_workflow','anvi_profile_min_percent_identity'])

metagenomics_workflow_snakemake_additional_params_list = self.metagenomics_workflow_snakemake_additional_params.split(' ')

Expand Down
3 changes: 3 additions & 0 deletions anvio/workflows/ecophylo/rules/profile_mode.smk
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ rule make_metagenomics_config_file:
if M.bowtie2_additional_params:
config_dict['bowtie']['additional_params'] = " ".join(["--no-unal", M.bowtie2_additional_params])

if M.anvi_profile_min_percent_identity:
config_dict['anvi_profile']['--min-percent-identity'] = M.anvi_profile_min_percent_identity

with open(output.config, "w") as outfile:
json.dump(config_dict, outfile, indent=4)

Expand Down

0 comments on commit e264bf6

Please sign in to comment.