Skip to content
Open
Changes from 19 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
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,49 @@ metagraph query -i graph.primary.small.dbg \
```

Then, it will save the resulting file in the S3. When all chunks are processed, a dedicated script will merge the results in a single file and send you a notification.

## Instructions for local usage

MetaGraph can be [installed](https://github.com/ratschlab/metagraph#Install) locally for offline use on a Linux or a Mac host using the commands below. Search indexes can be downloaded from [`s3://metagraph-data-public`](s3://metagraph-data-public). For example, chunk `0400` can be downloaded to a working directory as follows:
```sh
aws s3 sync s3://metagraph-data-public/all_sra/data/metagenome/0400 .
```
Currently, chunks numbered `0001` through to `0400` are available for download. The example query file is located in this repository under [`examples/100_studies_short.fq`](https://github.com/ratschlab/metagraph-open-data/blob/main/examples/100_studies_short.fq).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akahles should we put "through to 4000 here?


#### Conda
```sh
conda install -c bioconda -c conda-forge metagraph
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last time I checked, bioconda image was quite behind the git trunk. In particular, the query above wouldn't work due to incompatible CLI arguments. Should we do something about it before merging?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'm creating the new release now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the conda instructions for now since there's still some work being done on upgrading the package.

conda activate metagraph
```

Followed by a query on chunk `0400` using the command
```sh
metagraph query -i 0400/graph.primary.small.dbg \
-a 0400/annotation.clean.row_diff_brwt.annodbg \
--query-mode matches \
--num-top-labels 10 \
--min-kmers-fraction-label 0 \
--min-kmers-fraction-graph 0 \
examples/100_studies_short.fq
```

#### Docker
```sh
docker pull ghcr.io/ratschlab/metagraph:master
```

Followed by a query on chunk `0400` using the command
```sh
docker run -v ${MNTDIR}:/mnt ghcr.io/ratschlab/metagraph:master query -i 0400/graph.primary.small.dbg \
-a 0400/annotation.clean.row_diff_brwt.annodbg \
--query-mode matches \
--num-top-labels 10 \
--min-kmers-fraction-label 0 \
--min-kmers-fraction-graph 0 \
examples/100_studies_short.fq
```
replacing `${MNTDIR}` with the local mount path.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably provide some specific examples on what should be used as ${MNTDIR}.


## Additional instructions

For further documentation and usage instructions (including setup instructions using Docker and via source code compilation), please refer to our [Quick start](https://metagraph.ethz.ch/static/docs/quick_start.html) guide in the [MetaGraph documentation](https://metagraph.ethz.ch/static/docs/index.html). The source code is maintained on our [GitHub repository](https://github.com/ratschlab/metagraph).