Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions q2_diversity/_alpha/_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def _compute_rarefaction_data(feature_table, min_depth, max_depth, steps,
cols = pd.MultiIndex.from_product(
[list(depth_range), list(iter_range)],
names=['_alpha_rarefaction_depth_column_', 'iter'])
data = {k: pd.DataFrame(np.NaN, index=rows, columns=cols)
data = {k: pd.DataFrame(np.nan, index=rows, columns=cols)
for k in metrics}

ctx = qiime2.sdk.Context()
Expand Down Expand Up @@ -377,7 +377,7 @@ def alpha_rarefaction(output_dir: str, table: biom.Table, max_depth: int,
raise ValueError("All metadata filtered after dropping columns "
"that contained non-categorical data.")
metadata_df.columns = pd.MultiIndex.from_tuples(
[(c, '') for c in metadata_df.columns],
[(c, '_') for c in metadata_df.columns],
names=('_alpha_rarefaction_depth_column_', 'iter'))
columns = metadata_df.columns.get_level_values(0)
data = _compute_rarefaction_data(table, min_depth, max_depth,
Expand Down
2 changes: 1 addition & 1 deletion q2_diversity/_beta/_beta_rarefaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _upgma(dm):
def _nj(dm):
# Negative branch lengths are strange, BUT we are clustering, not modeling
# evolution, so it's not necessarily a problem
nj = skbio.tree.nj(dm, disallow_negative_branch_length=False)
nj = skbio.tree.nj(dm, neg_as_zero=False)
return nj.root_at_midpoint()


Expand Down
2 changes: 1 addition & 1 deletion q2_diversity/_ordination.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def tsne(distance_matrix: skbio.DistanceMatrix,

tsne = TSNE(number_of_dimensions, perplexity=perplexity,
learning_rate=learning_rate,
n_iter=n_iter,
max_iter=n_iter,
early_exaggeration=early_exaggeration,
random_state=random_state).fit_transform(data)

Expand Down
2 changes: 1 addition & 1 deletion q2_diversity/tests/test_adonis.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_execute_and_validate_output(self):
exp = pd.DataFrame(
[[1.0, 0.322916667, 0.322916667, 0.0, 0.534482759, 1.0],
[1.0, 0.281250000, 0.281250000, 0.0, 0.465517241, 1.0],
[0.0, -1.403048e-18, -np.Infinity, np.nan, -2.322286e-18, np.nan],
[0.0, -1.403048e-18, -np.inf, np.nan, -2.322286e-18, np.nan],
[2.0, 0.604166667, np.nan, np.nan, 1.0, np.nan]],
columns=['Df', 'SumsOfSqs', 'MeanSqs', 'F.Model', 'R2', 'Pr(>F)'],
index=['letter', 'number', 'Residuals', 'Total'])
Expand Down
Loading