Skip to content

Commit

Permalink
readthedocs link in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kantale committed Sep 14, 2016
1 parent b014ac2 commit 5501882
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 61 deletions.
2 changes: 1 addition & 1 deletion MutationInfo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@


__docformat__ = 'reStructuredText'
__version__ = '1.0.1'
__version__ = '1.1.0'

"""
TODO:
Expand Down
61 changes: 2 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,65 +18,8 @@ mi.get_info('NM_006446.4:c.1198T>G')
'offset': 21355487, 'alt': 'G', 'ref': 'T'}
```

## How it works

MutationInfo tries to infer the position, reference and alternative of a variant through the following pipeline:

* If the variant is in rs format, then
* Try the [Variant Effect Predictor](http://asia.ensembl.org/Tools/VEP) through the [pyVEP](https://github.com/kantale/pyVEP) package.
* If this fails, try the [MyVariant.info][http://myvariant.info/] service.
* If this fails, access the [UCSC tables](https://genome.ucsc.edu/cgi-bin/hgTables) through the [cruzdb](https://pypi.python.org/pypi/cruzdb) package.
* If the variant is in HGVS then:
* Try to parse the variant with the [biocommon/hgvs](https://bitbucket.org/biocommons/hgvs) parser.
* If the parse fails then look if the variant contains some common mistakes in HGVS formatting. Correct if possible and then try again. For example remove parenthesis in the following variant: `NM_001042351.1:-1923(A>C)`
* If parse still fails then make a request to the [mutalyzer.nl](https://mutalyzer.nl/). For example `NT_005120.15:c.IVS1-72T>G` is parsed only from mutalyzer but not from biocommons/hgvs
* If biocommons/hgvs parses the variant then use the [variantmapper](http://hgvs.readthedocs.org/en/latest/examples/manuscript-example.html#project-genomic-variant-to-a-new-transcript) method to locate the location of the variant in the reference assembly.
* If this method fails (for example `M61857.1:c.121A>G` crashes mutalyzer!) then use the [pyhgvs](https://github.com/counsyl/hgvs) package and the `hgvs_to_vcf` method to convert the variant in a [VCF](https://en.wikipedia.org/wiki/Variant_Call_Format) entry.
* If this method fails then look at the [LOVD](http://www.lovd.nl/3.0/home) database.

If all the aforementioned methods fail then:

* Download the FASTA sequence of the trascript of the variant from [NCBI database](http://www.ncbi.nlm.nih.gov/nuccore).
* If the position of the variant is in coding (c.) coordinates then convert to genomic (g.) coordinates. To do that, we use the [Coordinate mapper](https://github.com/lennax/biopython/tree/f_loc5/Bio/SeqUtils/Mapper) addition of biopython.
* Perform a [blat search](https://genome.ucsc.edu/cgi-bin/hgBlat?command=start) from UCSC. This methods performs an alignment search of the fasta sequence in the reference assembly. In case this succeeds then report the location of the variant in the reference genome.

This workflow is depicted in the following figure:
![alt tag](http://i.imgur.com/BAak2rE.png)


## Installation

Important! Requires 13 GB of disk space.

To install MutationInfo, download the package and run:
```bash
python setup.py install
```

Then the first time you instantiate the MutationInfo class, it installs all required datasets:
```python
from MutationInfo import MutationInfo
mi = MutationInfo()
```
### Installation in Ubuntu
Before installing in Ubuntu Linux, make sure that the following packages / tools are installed:

```bash
sudo apt-get update
sudo apt-get install git
sudo apt-get install gcc python-dev libpq-dev python-pip python-mysqldb-dbg

wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python
```

### Test
To verify that everything works fine run: ```python test.py``` in [test/](test/) directory. The output after the long log messages should be:
```
----------------------------------------------------------------------
Ran 6 tests in 21.923s
OK
```
# Documentation
The documentation is here: http://mutationinfo.readthedocs.io/en/latest/

## License
MIT License (MIT)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


setup(name='MutationInfo',
version='1.0.1',
version='1.1.0',
description='Tool to retrieve meta-information of genetic variants',
url='https://github.com/kantale/MutationInfo',
author='Alexandros Kanterakis',
Expand Down

0 comments on commit 5501882

Please sign in to comment.