robertosanchezn / AS_hqMAGs

2 stars 1 forks source link

Binder

bgcflow_AS_hqMAGs

Preview notebooks

Usage

Follow these steps to reproduce the analysis and data generated in this study.

Clone this repository

Clone this repository to your local machine by:

git clone git@github.com:robertosanchezn/AS_hqMAGs.git
cd AS_hqMAGs

Run the analysis

To generate the figures in the manuscript, run the analysis inside the r_markdown folder or jupyter_notebook folder. Each folder has its own README.md with instructions to run the analysis.

Reproduce the data

1. Install Conda Environments & BGCFlow

environment to run notebooks

mamba env create -n workflow/envs/bgc_analytics.yaml

### 2. Snakemake configuration set up
- Set up the configuration files by copying the content in `/bgcflow_configuration` folder (replacing the original `config.yaml` in BGCflow)
```shell
cp ../bgcflow_config/* config/. -r

3. Download and prepare data from other studies

generate symlink

ext_dir="data/external" for directory in Bickhart_et_al Chen_et_al_sanitized Liu_et_al Sharrar_et_al_sanitized; do for fna in $ext_dir/$directory/*.fna do (cd data/raw/fasta && ln -s ../../external/$directory/$(basename $fna) $(basename $fna) --verbose) done done

### 4. Run the workflow for each individual study
This will generate antiSMASH results and other downstream processes.
```bash
conda activate snakemake
snakemake --use-conda --cores 8 --keep-going -n
conda deactivate

5. Run the workflow for all study comparison

This will generate antiSMASH results and other downstream processes.

conda activate snakemake
snakemake --configfile config/config_all_studies.yaml --use-conda --cores 8 --keep-going -n
conda deactivate

6. Run the workflow for in depth study in Phylum Nitrospirota and Myxococcota

This will generate antiSMASH results and other downstream processes.

conda activate snakemake
snakemake --configfile config/config_in_depth.yaml --use-conda --cores 8 --keep-going -n
conda deactivate