Code Monkey home page Code Monkey logo

card-phylo's Introduction

CARD-phylo

Snakemake Build Status

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.

Authors

  • Finlay Maguire (@fmaguire)

Usage

Simple

Step 1: Install workflow

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.

Step 2: Install dependencies

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.

Step 2: Configure workflow

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%.

Step 4: Execute workflow

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

Output

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

Advanced

The following recipe provides established best practices for running and extending this workflow in a reproducible way.

  1. Fork the repo to a personal or lab account.
  2. Clone the fork to the desired working directory for the concrete project/run on your machine.
  3. 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).
  4. Modify the config, and any necessary sheets (and probably the workflow) as needed.
  5. Commit any changes and push the project-branch to your fork on github.
  6. Run the analysis.
  7. Optional: Merge back any valuable and generalizable changes to the upstream repo via a pull request. This would be greatly appreciated.
  8. Optional: Push results (plots/tables) to the remote branch on your fork.
  9. Optional: Create a self-contained workflow archive for publication along with the paper (snakemake --archive).
  10. Optional: Delete the local clone/workdir to free space.

Future development

Containerisation

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.

Report Generation

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.

card-phylo's People

Contributors

fmaguire avatar

Watchers

 avatar  avatar

Forkers

jtl-lab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.