Skip to content

Commit

Permalink
BUG:exposes parameter in core metrics from emperor
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenjp committed Jan 4, 2024
1 parent 2125108 commit 8da8db1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions q2_diversity/_core_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def core_metrics(ctx, table, sampling_depth, metadata, with_replacement=False,
n_jobs=1):
n_jobs=1, ignore_missing_samples=False):
rarefy = ctx.get_action('feature_table', 'rarefy')
observed_features = ctx.get_action('diversity_lib', 'observed_features')
pielou_e = ctx.get_action('diversity_lib', 'pielou_evenness')
Expand Down Expand Up @@ -39,13 +39,15 @@ def core_metrics(ctx, table, sampling_depth, metadata, with_replacement=False,
pcoas += pcoa_results

for pcoa in pcoas:
results += emperor_plot(pcoa=pcoa, metadata=metadata)
results += emperor_plot(pcoa=pcoa, metadata=metadata,
ignore_missing_samples=ignore_missing_samples)

return tuple(results)


def core_metrics_phylogenetic(ctx, table, phylogeny, sampling_depth, metadata,
with_replacement=False, n_jobs_or_threads=1):
with_replacement=False, n_jobs_or_threads=1,
ignore_missing_samples=False):
faith_pd = ctx.get_action('diversity_lib', 'faith_pd')
unweighted_unifrac = ctx.get_action('diversity_lib', 'unweighted_unifrac')
weighted_unifrac = ctx.get_action(
Expand Down Expand Up @@ -75,7 +77,8 @@ def core_metrics_phylogenetic(ctx, table, phylogeny, sampling_depth, metadata,

plots = []
for pcoa in pcoas:
plots += emperor_plot(pcoa=pcoa, metadata=metadata)
plots += emperor_plot(pcoa=pcoa, metadata=metadata,
ignore_missing_samples=ignore_missing_samples)

return (
cr.rarefied_table, faith_pd_vector, cr.observed_features_vector,
Expand Down

0 comments on commit 8da8db1

Please sign in to comment.