Follow these steps to reproduce the analysis and data generated in this study.
Clone this repository to your local machine by:
git clone git@github.com:robertosanchezn/AS_hqMAGs.git
cd AS_hqMAGs
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.
git clone git@github.com:NBChub/bgcflow.git
cd bgcflow
git checkout v0.3.3-alpha
- TO DO: attach a zipped archive of the v0.3.3-alpha
conda install -n base -c conda-forge mamba
# snakemake environment
mamba create -c conda-forge -c bioconda -n snakemake snakemake=7.6.1
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
data/raw/fasta
.
# run notebook to download genomes from other studies to bgcflow/data/external, will take a while to finish
conda activate bgc_analytics
(cd ../jupyter_notebook/notebook2/ && jupyter nbconvert --to html --execute 01_other_MAG_dataset_table.ipynb)
conda deactivate
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
-n
to do a real runThis 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
-n
to do a real runThis 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
-n
to do a real run