Skip to content

Commit

Permalink
add readme and alpha no error test
Browse files Browse the repository at this point in the history
  • Loading branch information
Clockwork-Rat committed Apr 17, 2024
1 parent 4501c57 commit fcb31c1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# q2-boots

This is a QIIME 2 plugin. For details on QIIME 2, see https://qiime2.org.

## Installation

Ensure QIIME2 is installed by running

```
qiime --version
```

If there is an error, visit the qiime2 information link above for instructions on installation.
If there is no error thrown here, ensure qiime diversity is installed with:

```
qiime diversity --version
```
In the case of an error, q2-diversity can be installed from https://github.com/qiime2/q2-diversity.

If no error is thrown, proceed to installing q2-boots with the following commands:

```
git clone https://github.com/qiime2/q2-boots.git
cd q2-boots
make install
```
19 changes: 18 additions & 1 deletion q2_boots/tests/test_alpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,24 @@ def test_phylo_metric_no_phylo(self):
n=10)

def test_non_phylo_metric_with_phylo(self):
pass
with StringIO('(O1:0.3, O2:0.2, O3:0.1, O4:0.2)root;') as f:
phylogeny = skbio.read(f, format='newick', into=skbio.TreeNode)

phylogeny = Artifact.import_data(
'Phylogeny[Rooted]',
phylogeny
)
t = Table(np.array([[0, 1, 3], [1, 1, 2], [1, 3, 2]]),
['01', '02', '03'],
['S1', 'S2', 'S3'])
t = Artifact.import_data('FeatureTable[Frequency]', t)
# assert no error is thrown, and that phylogeny is just thrown out
self.alpha(table=t, sampling_depth=1,
metric='shannon',
random_seed=12,
n=10,
phylogeny=phylogeny)
self.assertTrue(True)


class TestAlphaBootstrapRepresentative(TestPluginBase):
Expand Down

0 comments on commit fcb31c1

Please sign in to comment.