Closed iqbal-lab closed 4 years ago
or some other thing
I agree, I'll move current README to a documentation service and simplify the README.
Ah I've realised this is still live and covers my other issue. I quite like the way gramtools readme is now v simple and redirects to clear wiki pages https://github.com/iqbal-lab-org/gramtools
This is still an issue. Maybe the front page should be just 5 lines saying this is the replacement for mykrobe predictor, and also will allow communicayion with Mykrobe atlas
I like the idea of moving a lot of the CLI help menu stuff to a wiki and just have some basic usage examples in the README and link to the wiki full usage from the README
100% agree, this is too busy. i think almost just one basic commandline on front page, link to 3 different pages. one for makign your own panel, 1 for further CLI options, and one for mykrobe genotype. ok with you @Phelimb ?
👍 Yes, I agree. Will action soon.
The readme is much better than predictors, but I think if you come at it blind, it's a bit intimidating and also has a lot of info you don't need. How would you feel about this?
Master:
Dev:
Tested on python 2.7, 3.4, 3.5, and 3.6.
Requirements
Installation
This will install two executables: mykrobe and mccortex31 (a fork of mccortex).
Usage
AMR prediction (Mykrobe predictor)
Example
Note that the
tb -1
orstaph -1
is fixed; thetb_sample_id
andstaph_sample_id
should be replaced by your own identifier for this sample (if you want). Thetb_sequence.bam/fq
means this can be a bam file or fastq file.e.g.
Output
Output is in JSON format. To convert to a less verbose tabular format use json_to_tsv.
Citations
If you use one of the following panels please cite the relevant publications:
Genotyping a pre-built probe set (representing a catalog of mutations/indels/genes)
See [whatever other linked page] for the full list of possible arguments. For the basic usage, which is probably what you want, see below:
Examples
Make a custom probe set (to use your own list of SNPs/genes/indels with
mykrobe genotype
)Add variants to the database (for background/context)
This is optional but will make any probe sets built more robust to variation in within k-1 bases of the key variants. This will require mongoDB > 3.0 running in the background.
To add a VCF to the database db_name run
Use the --method argument to specify the variant caller or pipeline used (if you'll have multiple Call Sets per sample)
Make probes and dump-probes
Full usage is [here] - examples below
Examples
1 Simple case - building a probe without using backgrounds
2. 'Dumping' the Variant database
To build a ProbeSet of all non-singleton variants in the database run:
mykrobe variants dump-probes
This will generate a probe set for each variant in the database. The resulting fasta file will look like the following:
Where you have a series of variants represented as a set of alleles. The reference allele followed by multiple alternate alleles. You will end up with multiple alternate alleles if there are other variants that fall within k of the target variant.
Each variant is referenced by a
var_hash
with is the hash of ":ref:pos:alt" which is indexed in the database and can be used to query for Variant object.See
mykrobe genotype
to use these probes to genotype a new sample.3. Building a custom probe set
mykrobe variants make-probes
allows you to build a probe set using Variants that are not already in the database but using the population variation to produce multiple alleles per variant.Build a variant probe set defined based on reference co-ordinates (1-based)
First, define your variants for which you want to build probes. Columns are
ref/gene pos ref alt alphabet
Build a variant probe set defined based on gene co-ordinates (1-based)
You can also define your variants in terms of gene coordinates in amino acid or DNA space.
To do this you must provide a genbank file defining the position of the variants in the reference (-g (GENBANK) )
Citation
Please cite us if you use Mykrobe predictor in a publication
Tests
To run tests:
To run tests for a particular python version run, e.g. python 3.6: