This is a workflow to generate reference phylogenies for all AMR sequences in CARD canonical and prevalence.
Note the LICENSE file only refers to the workflow in this repository for licensing related to using CARD please visit the website.
Additionally if you make use of this please cite:
Alcock et al. 2020. CARD 2020: Antibiotic Resistome Surveillance with the Comprehensive Antibiotic Resistance Database. Nucleic Acids Research, 48, D517-D525.
- Finlay Maguire (@fmaguire)
If you simply want to use this workflow, download and extract the latest release. If you intend to modify and further extend this workflow or want to work under version control, fork this repository as outlined in Advanced. The latter way is recommended.
To run this you must have a newish snakemake (>5.11) and conda available in your path.
This workflow has only been tested on linux systems, it should work on OSX and hopefully windows but no guarantees.
Configure the workflow according to your needs via editing the file config/config.yaml
.
Main options are changing the version of CARD canonical/CARD prevalence and changing the cluster threshold proportion ID%.
Test your configuration by performing a dry-run via
snakemake --use-conda -cores $N -n
Execute the workflow locally via
snakemake --use-conda --cores $N
using $N
cores or run it in a cluster environment via
snakemake --use-conda --cluster qsub --jobs 100
or
snakemake --use-conda --drmaa --jobs 100
card-phylo_canonical_3.0.9_prevalence_3.0.7/
├── card
│ ├── canonical
│ │ └── 3.0.9
│ │ ├── card.json
│ │ ├── protein_fasta_protein_homolog_model.fasta
│ │ ├── protein_fasta_protein_knockout_model.fasta
│ │ ├── protein_fasta_protein_overexpression_model.fasta
│ │ └── protein_fasta_protein_variant_model.fasta
│ └── prevalence
│ └── 3.0.7
│ ├── protein_fasta_protein_homolog_model_variants.fasta
│ ├── protein_fasta_protein_overexpression_model_variants.fasta
│ └── protein_fasta_protein_variant_model_variants.fasta
├── card_protein.fasta
├── curated_amr_gene_families
│ ├── seqs
│ │ ├── non_singleton_clusters
│ │ │ └── TEM_beta-lactamase.faa
│ │ └── singletons
│ │ └── Zoliflodacin_resistant_gyrB.faa
│ ├── align
│ │ └── TEM_beta-lactamase.afa
│ ├── trim
│ │ └── TEM_beta-lactamase.afa
│ └── phylo
│ └── TEM_beta-lactamase.treefile
├── mmseqs_0 # final digit indicates clustering %id
│ ├── seqs
│ │ └── non_singleton_clusters
| | ├── phylo_singletons.txt
│ │ └── 1.faa
│ ├── align
│ │ └── 1.afa
│ ├── trim
│ │ └── 1.afa
│ └── phylo
│ └── 1.treefile
├── mmseqs_70
├── mmseqs_80
├── mmseqs_90
├── mmseqs_95
└── logs
The following recipe provides established best practices for running and extending this workflow in a reproducible way.
- Fork the repo to a personal or lab account.
- Clone the fork to the desired working directory for the concrete project/run on your machine.
- Create a new branch (the project-branch) within the clone and switch to it. The branch will contain any project-specific modifications (e.g. to configuration, but also to code).
- Modify the config, and any necessary sheets (and probably the workflow) as needed.
- Commit any changes and push the project-branch to your fork on github.
- Run the analysis.
- Optional: Merge back any valuable and generalizable changes to the upstream repo via a pull request. This would be greatly appreciated.
- Optional: Push results (plots/tables) to the remote branch on your fork.
- Optional: Create a self-contained workflow archive for publication along with the paper (snakemake --archive).
- Optional: Delete the local clone/workdir to free space.
If you wish to run this in a container (i.e. --use-singularity) please also install singularity
If you not only want to fix the software stack but also the underlying OS, use
snakemake --use-conda --use-singularity
in combination with any of the modes above. See the Snakemake documentation for further details.
After successful execution, you can create a self-contained interactive HTML report with all results via:
snakemake --report report.html
This report can, e.g., be forwarded to your collaborators.