Skip to content

Commit

Permalink
MRG: add explicit install tutorial (#2826)
Browse files Browse the repository at this point in the history
Fixes #2813

See new index and sidebar at [the docs build for this
PR](https://sourmash--2826.org.readthedocs.build/en/2826/index.html)
  • Loading branch information
ctb authored Oct 31, 2023
1 parent 5d0c0de commit 7e8198b
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 46 deletions.
4 changes: 2 additions & 2 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ supported by further funding from the NIH and NSF. Please see
These tutorials are command line tutorials that should work on Mac OS
X and Linux. They require about 5 GB of disk space and 5 GB of RAM.

* [Installing sourmash with conda](tutorial-install.md)

* [The first sourmash tutorial - making signatures, comparing, and searching](tutorial-basic.md)

* [Using sourmash LCA to do taxonomic classification](tutorials-lca.md)
Expand All @@ -82,8 +84,6 @@ X and Linux. They require about 5 GB of disk space and 5 GB of RAM.

### How-To Guides

* Installing sourmash

* [Classifying genome sketches](classifying-signatures.md)

* [Working with private collections of genome sketches](sourmash-collections.ipynb)
Expand Down
4 changes: 2 additions & 2 deletions doc/sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
These tutorials are command line tutorials that should work on Mac OS
X and Linux. They require about 5 GB of disk space and 5 GB of RAM.

* [Installing sourmash with conda](tutorial-install.md)

* [The first sourmash tutorial - making signatures, comparing, and searching](tutorial-basic.md)

* [Using sourmash LCA to do taxonomic classification](tutorials-lca.md)
Expand All @@ -13,8 +15,6 @@ X and Linux. They require about 5 GB of disk space and 5 GB of RAM.

## How-To Guides

* Installing sourmash

* [Classifying genome sketches](classifying-signatures.md)

* [Working with private collections of genome sketches](sourmash-collections.ipynb)
Expand Down
1 change: 1 addition & 0 deletions doc/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ sourmash-internals.md
sourmash-sketch.md
storage.md
support.md
tutorial-install.md
tutorial-basic.md
tutorial-lemonade.md
tutorial-lin-taxonomy.md
Expand Down
43 changes: 1 addition & 42 deletions doc/tutorial-basic.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,14 @@
# The first sourmash tutorial - making signatures, comparing, and searching

This tutorial should run without modification on Linux or Mac OS X,
under [Miniconda](https://docs.conda.io/en/latest/miniconda.html).

You'll need about 5 GB of free disk space, and about 5 GB of RAM to
search GenBank. The tutorial should take about 20 minutes total to
run. In fact, we have successfully tested it on
[binder.pangeo.io](https://binder.pangeo.io/v2/gh/binder-examples/r-conda/master?urlpath=urlpath%3Drstudio)
if you want to give it a try!

## Install miniconda

If you don't have the `conda` command installed, you'll need to install
miniconda for Python 3.x.

On Linux, this should work:
```
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
echo export PATH="$HOME/miniconda3/bin:$PATH" >> ~/.bash_profile
source ~/.bash_profile
```
otherwise, follow
[the miniconda install](https://docs.conda.io/en/latest/miniconda.html).

## Enable [bioconda](https://bioconda.github.io/)

```
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
```

## Install sourmash

To install sourmash, create a new environment named `smash` and install sourmash:

```
conda create -y -n smash sourmash
```

and then activate:
```
conda activate smash
```

You should now be able to use the `sourmash` command:

```
sourmash info
```
You'll need to [install sourmash](tutorial-install.md) first!

## Generate a signature for Illumina reads

Expand Down
55 changes: 55 additions & 0 deletions doc/tutorial-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Installing sourmash

This tutorial should run without modification on Linux or Mac OS X,
under [Miniforge](https://github.com/conda-forge/miniforge).

You'll need about 5 GB of free disk space.

## Install miniforge

If you don't have the `mamba` command installed, you'll need to install
[miniforge](https://github.com/conda-forge/miniforge#install).

On Linux, this should work:
```
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh -b
~/miniforge3/bin/mamba init
echo 'source ~/.bashrc' > ~/.bash_profile
source ~/.bash_profile
```
otherwise, follow the instructions [here](https://github.com/conda-forge/miniforge#install).

## Add bioconda

sourmash is installed from the [bioconda software channel](https://bioconda.github.io/), so you'll need to add that to your config:

```
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strict
```

## Install sourmash

To install sourmash, create a new environment named `smash` and install sourmash:

```
mamba create -y -n smash sourmash
```

and then activate:
```
conda activate smash
```

You should now be able to use the `sourmash` command:

```
sourmash info
```

Voila!

0 comments on commit 7e8198b

Please sign in to comment.