Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# MAGICIAN
MAGICIAN is a tool for easily generating simulated metagenome-assembled genomes from a user-determined "community".
## Requirements
# Workflow overview
## Top-level overview
![figs/workflow_overview.png](figs/workflow_overview.png)
## Detailed overview with tools
![figs/workflow_details.png](figs/workflow_details.png)
# Requirements
MAGICIAN is a Snakemake pipeline that uses conda or mamba to manage dependencies.
Thus, it primarily requires Snakemake and conda or mamba to be used (mamba is recommended). \
Requirements for the base environment are given in `requirements.yml` and can be installed as follows:
Expand All @@ -20,19 +25,19 @@ in order to use custom error profiles. This can be done by running
```commandline
git clone https://github.com/KatSteinke/CAMISIM
```
## Getting started
# Getting started
In order to get started with MAGICIAN, simply clone the repository:
```commandline
git clone https://github.com/KatSteinke/magician
```

You will also have to adapt the config file given under [config/default_config.yml](config/default_config.yml).
### CAMISIM database settings
## CAMISIM database settings
Change the path given under `camisim_path` in `default_config.yml`to the path to your forked copy of CAMISIM.
### Package management system (conda/mamba)
## Package management system (conda/mamba)
If you use mamba (recommended due to speed), change the setting for `conda_frontend` to `mamba`.
## Running MAGICIAN
### Preparing the input
# Running MAGICIAN
## Preparing the input
MAGICIAN requires the following files to run:
* genome sequences of the organisms the simulated community should consist of, in genbank or fasta format
* a tab-separated file of sample distributions.
Expand All @@ -46,7 +51,7 @@ sequences in these communities:
| /path/to/genome2 | chromosome | 1 | 0 | |
| /path/to/plasmid | plasmid | 1 | 1 | |
```
### Starting MAGICIAN
## Starting MAGICIAN
MAGICIAN is started using `run_magician.py`:
```
run_magician.py [-h] [--target TARGET]
Expand All @@ -60,12 +65,12 @@ run_magician.py [-h] [--target TARGET]
[--snake_flags "SNAKE_FLAGS..."]

```
#### Required arguments
### Required arguments

* `community_file`: the tab-separated file with sample distributions for the community/communities you wish to simulate.
* `--snake_flags`: the flags to be passed on to Snakemake, enclosed in double quotes. For a dry run, use `"-n "`.
For all else, refer to Snakemake's documentation.
#### Optional arguments
### Optional arguments
* `--target`: the desired output file or rule. By default, MAGICIAN runs the entire workflow for all communities in the
input file given. To run the workflow for a single
community, give `summaries/bin_summary_[COMMUNITY].xlsx` here, replacing `[COMMUNITY]` with the name of the community
Expand All @@ -84,7 +89,7 @@ error profile.
* `--config_file`: the path to the configuration file to use, if not using the default file
`default_config.yml`

#### Starting a test run
### Starting a test run
To start a test run with the sample genomes found in test/data/test_genomes, run `python3 run_magician.py` without any arguments. The script will show usage and ask whether to start a test run:
```
usage: run_magician.py [-h] [--target TARGET] [--profile_type {mbarc,hi,mi,hi150,own}]
Expand All @@ -99,7 +104,7 @@ Start local example run with sample genomes and output to /home/kma/magician? [y
Remember to edit config/default_config.yml to specify your CAMISIM installation.
```
Confirm with `y` to start the test run. \
Example summary files for such a run can be found under [test/data/sample_summaries](test/data/sample_summaries); the full output is available at Zenodo under TODO ZENODO LINK.
Example summary files for such a run can be found under [test/data/sample_summaries](test/data/sample_summaries); the full output is available at [Zenodo](https://doi.org/10.5281/zenodo.10081882).
# License
Copyright 2023 Kat Steinke

Expand Down
Binary file added figs/workflow_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/workflow_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ dependencies:
- biopython
- openpyxl
- pandas
- python=3.10
- pyyaml
- snakemake