├── .editorconfig ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.rst ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.md ├── docs ├── Makefile ├── authors.rst ├── conf.py ├── contributing.rst ├── history.rst ├── index.rst ├── installation.rst ├── make.bat ├── readme.rst └── usage.rst ├── example ├── TCGA-55-6543.annotated.vcf └── TCGA-55-6543.vcf ├── requirements_dev.txt ├── setup.cfg ├── setup.py ├── tests ├── __init__.py └── test_vcf-annotate-polyphen.py ├── tox.ini ├── travis_pypi_setup.py └── vap ├── __init__.py ├── annotator.py └── cli.py /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [*.bat] 14 | indent_style = tab 15 | end_of_line = crlf 16 | 17 | [LICENSE] 18 | insert_final_newline = false 19 | 20 | [Makefile] 21 | indent_style = tab 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | 55 | # Sphinx documentation 56 | docs/_build/ 57 | 58 | # PyBuilder 59 | target/ 60 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Config file for automatic testing at travis-ci.org 2 | # This file will be regenerated if you run travis_pypi_setup.py 3 | 4 | language: python 5 | python: 3.5 6 | 7 | env: 8 | - TOXENV=py35 9 | - TOXENV=py34 10 | - TOXENV=py33 11 | - TOXENV=py27 12 | - TOXENV=py26 13 | - TOXENV=pypy 14 | 15 | # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors 16 | install: pip install -U tox 17 | 18 | # command to run tests, e.g. python setup.py test 19 | script: tox 20 | 21 | # After you create the Github repo and add it to Travis, run the 22 | # travis_pypi_setup.py script to finish PyPI deployment setup 23 | deploy: 24 | provider: pypi 25 | distributions: sdist bdist_wheel 26 | user: armish 27 | password: 28 | secure: PLEASE_REPLACE_ME 29 | on: 30 | tags: true 31 | repo: armish/vcf-annotate-polyphen 32 | condition: $TOXENV == py27 33 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============ 4 | Contributing 5 | ============ 6 | 7 | Contributions are welcome, and they are greatly appreciated! Every 8 | little bit helps, and credit will always be given. 9 | 10 | You can contribute in many ways: 11 | 12 | Types of Contributions 13 | ---------------------- 14 | 15 | Report Bugs 16 | ~~~~~~~~~~~ 17 | 18 | Report bugs at https://github.com/hammerlab/vcf-annotate-polyphen/issues. 19 | 20 | If you are reporting a bug, please include: 21 | 22 | * Your operating system name and version. 23 | * Any details about your local setup that might be helpful in troubleshooting. 24 | * Detailed steps to reproduce the bug. 25 | 26 | Fix Bugs 27 | ~~~~~~~~ 28 | 29 | Look through the GitHub issues for bugs. Anything tagged with "bug" 30 | is open to whoever wants to implement it. 31 | 32 | Implement Features 33 | ~~~~~~~~~~~~~~~~~~ 34 | 35 | Look through the GitHub issues for features. Anything tagged with "feature" 36 | is open to whoever wants to implement it. 37 | 38 | Write Documentation 39 | ~~~~~~~~~~~~~~~~~~~ 40 | 41 | a tool to annotate human VCF files with PolyPhen2 effect measures could always use more documentation, whether as part of the 42 | official a tool to annotate human VCF files with PolyPhen2 effect measures docs, in docstrings, or even on the web in blog posts, 43 | articles, and such. 44 | 45 | Submit Feedback 46 | ~~~~~~~~~~~~~~~ 47 | 48 | The best way to send feedback is to file an issue at https://github.com/hammerlab/vcf-annotate-polyphen/issues. 49 | 50 | If you are proposing a feature: 51 | 52 | * Explain in detail how it would work. 53 | * Keep the scope as narrow as possible, to make it easier to implement. 54 | * Remember that this is a volunteer-driven project, and that contributions 55 | are welcome :) 56 | 57 | Get Started! 58 | ------------ 59 | 60 | Ready to contribute? Here's how to set up `vcf-annotate-polyphen` for local development. 61 | 62 | 1. Fork the `vcf-annotate-polyphen` repo on GitHub. 63 | 2. Clone your fork locally:: 64 | 65 | $ git clone git@github.com:your_name_here/vcf-annotate-polyphen.git 66 | 67 | 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: 68 | 69 | $ mkvirtualenv vcf-annotate-polyphen 70 | $ cd vcf-annotate-polyphen/ 71 | $ python setup.py develop 72 | 73 | 4. Create a branch for local development:: 74 | 75 | $ git checkout -b name-of-your-bugfix-or-feature 76 | 77 | Now you can make your changes locally. 78 | 79 | 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: 80 | 81 | $ flake8 vcf-annotate-polyphen tests 82 | $ python setup.py test 83 | $ tox 84 | 85 | To get flake8 and tox, just pip install them into your virtualenv. 86 | 87 | 6. Commit your changes and push your branch to GitHub:: 88 | 89 | $ git add . 90 | $ git commit -m "Your detailed description of your changes." 91 | $ git push origin name-of-your-bugfix-or-feature 92 | 93 | 7. Submit a pull request through the GitHub website. 94 | 95 | Pull Request Guidelines 96 | ----------------------- 97 | 98 | Before you submit a pull request, check that it meets these guidelines: 99 | 100 | 1. The pull request should include tests. 101 | 2. If the pull request adds functionality, the docs should be updated. Put 102 | your new functionality into a function with a docstring, and add the 103 | feature to the list in README.rst. 104 | 3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check 105 | https://travis-ci.org/hammerlab/vcf-annotate-polyphen/pull_requests 106 | and make sure that the tests pass for all supported Python versions. 107 | 108 | Tips 109 | ---- 110 | 111 | To run a subset of tests:: 112 | 113 | $ python -m unittest tests.test_vcf-annotate-polyphen 114 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include CONTRIBUTING.rst 2 | include LICENSE 3 | include README.md 4 | 5 | recursive-include tests * 6 | recursive-exclude * __pycache__ 7 | recursive-exclude * *.py[co] 8 | 9 | recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean-pyc clean-build docs clean 2 | define BROWSER_PYSCRIPT 3 | import os, webbrowser, sys 4 | try: 5 | from urllib import pathname2url 6 | except: 7 | from urllib.request import pathname2url 8 | 9 | webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) 10 | endef 11 | export BROWSER_PYSCRIPT 12 | BROWSER := python -c "$$BROWSER_PYSCRIPT" 13 | 14 | help: 15 | @echo "clean - remove all build, test, coverage and Python artifacts" 16 | @echo "clean-build - remove build artifacts" 17 | @echo "clean-pyc - remove Python file artifacts" 18 | @echo "clean-test - remove test and coverage artifacts" 19 | @echo "lint - check style with flake8" 20 | @echo "test - run tests quickly with the default Python" 21 | @echo "test-all - run tests on every Python version with tox" 22 | @echo "coverage - check code coverage quickly with the default Python" 23 | @echo "docs - generate Sphinx HTML documentation, including API docs" 24 | @echo "release - package and upload a release" 25 | @echo "dist - package" 26 | @echo "install - install the package to the active Python's site-packages" 27 | 28 | clean: clean-build clean-pyc clean-test 29 | 30 | clean-build: 31 | rm -fr build/ 32 | rm -fr dist/ 33 | rm -fr .eggs/ 34 | find . -name '*.egg-info' -exec rm -fr {} + 35 | find . -name '*.egg' -exec rm -f {} + 36 | 37 | clean-pyc: 38 | find . -name '*.pyc' -exec rm -f {} + 39 | find . -name '*.pyo' -exec rm -f {} + 40 | find . -name '*~' -exec rm -f {} + 41 | find . -name '__pycache__' -exec rm -fr {} + 42 | 43 | clean-test: 44 | rm -fr .tox/ 45 | rm -f .coverage 46 | rm -fr htmlcov/ 47 | 48 | lint: 49 | flake8 vcf-annotate-polyphen tests 50 | 51 | test: 52 | python setup.py test 53 | 54 | test-all: 55 | tox 56 | 57 | coverage: 58 | coverage run --source vcf-annotate-polyphen setup.py test 59 | coverage report -m 60 | coverage html 61 | $(BROWSER) htmlcov/index.html 62 | 63 | docs: 64 | rm -f docs/vcf-annotate-polyphen.rst 65 | rm -f docs/modules.rst 66 | sphinx-apidoc -o docs/ vcf-annotate-polyphen 67 | $(MAKE) -C docs clean 68 | $(MAKE) -C docs html 69 | $(BROWSER) docs/_build/html/index.html 70 | 71 | servedocs: docs 72 | watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . 73 | 74 | release: clean 75 | python setup.py sdist upload 76 | python setup.py bdist_wheel upload 77 | 78 | dist: clean 79 | python setup.py sdist 80 | python setup.py bdist_wheel 81 | ls -l dist 82 | 83 | install: clean 84 | python setup.py install 85 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vcf-annotate-polyphen 2 | A tool to annotate human VCF files with PolyPhen-2 effect measures. 3 | This tool only works on human variants, 4 | collects ClinVar scores, 5 | and assumes the VCF follows `hg19/GRCh37` conventions. 6 | 7 | ## Install 8 | ### via PyPi 9 | ``` 10 | $ pip install vcf-annotate-polyphen 11 | ``` 12 | 13 | ### via Source Code 14 | ``` 15 | $ git checkout https://github.com/hammerlab/vcf-annotate-polyphen.git 16 | $ cd vcf-annotate-polyphen/ 17 | $ python setup.py 18 | ``` 19 | 20 | ## Usage 21 | ### As a library 22 | ```python 23 | import vap # Vcf-Annotate-Polyphen (VAP) 24 | 25 | import sqlalchemy 26 | from sqlalchemy import create_engine 27 | engine = create_engine('sqlite:///polyphen-2.2.2-whess-2011_12.sqlite') 28 | conn = engine.connect() 29 | 30 | annotation = vap.annotate_variant(conn, 'chr14', 20344588, 'C', 'A') 31 | print ("Gene: {}; Protein: {}; Change: {}; " 32 | "HVar Prediction: {} (p: {}); HDiv Prediction: {} (p: {})") \ 33 | .format( 34 | annotation.gene, 35 | annotation.protein, 36 | annotation.aa_change, 37 | annotation.hvar_pred, 38 | annotation.hvar_prob, 39 | annotation.hdiv_pred, 40 | annotation.hdiv_prob) 41 | # Gene: OR4K2; Protein: Q8NGD2; Change: H54Q; 42 | # HVar Prediction: benign (p: 0.017); HDiv Prediction: benign (p: 0.008) 43 | ``` 44 | 45 | ### Command line interface 46 | After installing the package, you can invoke the command line utility as follows: 47 | 48 | ``` 49 | $ vcf-annotate-polyphen --help 50 | Usage: vcf-annotate-polyphen polyphen.whess.sqlite input.vcf output.vcf 51 | 52 | Options: 53 | -h, --help show this help message and exit 54 | ``` 55 | 56 | As listed above in the help text, this tool expects three arguments from the user: 57 | 58 | 1. [PolyPhen-2 WHESS](ftp://genetics.bwh.harvard.edu/pph2/whess) in SQLite format 59 | 2. Input VCF to be annotated 60 | 3. Output VCF to be written with annotations 61 | 62 | The output file should have an additional `INFO` field as described below: 63 | 64 | ``` 65 | ##INFO= 66 | ``` 67 | 68 | which manifests itself for each variant description: 69 | 70 | ``` 71 | ... 72 | 2 165351172 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:11,0:.:11:0.0:0 0/1:3,5:30.0:8:0.625:2 73 | 2 179247908 . C G . PASS SOMATIC;VT=SNP;PP2=OSBPL6,Q9BZF3,N593K,probably damaging,0.998,probably damaging,1.0 GT:AD:BQ:DP:FA:SS 0:27,2:.:29:0.069:0 0/1:27,4:28.0:31:0.129:2 74 | ... 75 | ``` 76 | 77 | Here is an annotated VCF: [example/TCGA-55-6543.annotated.vcf](example/TCGA-55-6543.annotated.vcf). 78 | 79 | ### Example usage 80 | ``` 81 | $ cd example/ 82 | # The following file is ~7 GB!!! 83 | $ wget "ftp://genetics.bwh.harvard.edu/pph2/whess/polyphen-2.2.2-whess-2011_12.sqlite.bz2" 84 | $ bunzip2 polyphen-2.2.2-whess-2011_12.sqlite.bz2 85 | $ vcf-annotate-polyphen ./polyphen-2.2.2-whess-2011_12.sqlite ./TCGA-55-6543.vcf ./TCGA-55-6543.annotated.vcf 86 | $ less ./TCGA-55-6543.annotated.vcf 87 | ``` 88 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | html: 53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 54 | @echo 55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 56 | 57 | dirhtml: 58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 59 | @echo 60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 61 | 62 | singlehtml: 63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 64 | @echo 65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 66 | 67 | pickle: 68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 69 | @echo 70 | @echo "Build finished; now you can process the pickle files." 71 | 72 | json: 73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 74 | @echo 75 | @echo "Build finished; now you can process the JSON files." 76 | 77 | htmlhelp: 78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 79 | @echo 80 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 81 | ".hhp project file in $(BUILDDIR)/htmlhelp." 82 | 83 | qthelp: 84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 85 | @echo 86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/vcf-annotate-polyphen.qhcp" 89 | @echo "To view the help file:" 90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/vcf-annotate-polyphen.qhc" 91 | 92 | devhelp: 93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 94 | @echo 95 | @echo "Build finished." 96 | @echo "To view the help file:" 97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/vcf-annotate-polyphen" 98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/vcf-annotate-polyphen" 99 | @echo "# devhelp" 100 | 101 | epub: 102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 103 | @echo 104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 105 | 106 | latex: 107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 108 | @echo 109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 111 | "(use \`make latexpdf' here to do that automatically)." 112 | 113 | latexpdf: 114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 115 | @echo "Running LaTeX files through pdflatex..." 116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 118 | 119 | latexpdfja: 120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 | @echo "Running LaTeX files through platex and dvipdfmx..." 122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 | 125 | text: 126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 127 | @echo 128 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 129 | 130 | man: 131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 132 | @echo 133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 134 | 135 | texinfo: 136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 137 | @echo 138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 139 | @echo "Run \`make' in that directory to run these through makeinfo" \ 140 | "(use \`make info' here to do that automatically)." 141 | 142 | info: 143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 144 | @echo "Running Texinfo files through makeinfo..." 145 | make -C $(BUILDDIR)/texinfo info 146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 147 | 148 | gettext: 149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 150 | @echo 151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 152 | 153 | changes: 154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 155 | @echo 156 | @echo "The overview file is in $(BUILDDIR)/changes." 157 | 158 | linkcheck: 159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 160 | @echo 161 | @echo "Link check complete; look for any errors in the above output " \ 162 | "or in $(BUILDDIR)/linkcheck/output.txt." 163 | 164 | doctest: 165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 166 | @echo "Testing of doctests in the sources finished, look at the " \ 167 | "results in $(BUILDDIR)/doctest/output.txt." 168 | 169 | xml: 170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 171 | @echo 172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 173 | 174 | pseudoxml: 175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 176 | @echo 177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 178 | -------------------------------------------------------------------------------- /docs/authors.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../AUTHORS.rst 2 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # vcf-annotate-polyphen documentation build configuration file, created by 5 | # sphinx-quickstart on Tue Jul 9 22:26:36 2013. 6 | # 7 | # This file is execfile()d with the current directory set to its 8 | # containing dir. 9 | # 10 | # Note that not all possible configuration values are present in this 11 | # autogenerated file. 12 | # 13 | # All configuration values have a default; values that are commented out 14 | # serve to show the default. 15 | 16 | import sys 17 | import os 18 | 19 | # If extensions (or modules to document with autodoc) are in another 20 | # directory, add these directories to sys.path here. If the directory is 21 | # relative to the documentation root, use os.path.abspath to make it 22 | # absolute, like shown here. 23 | #sys.path.insert(0, os.path.abspath('.')) 24 | 25 | # Get the project root dir, which is the parent dir of this 26 | cwd = os.getcwd() 27 | project_root = os.path.dirname(cwd) 28 | 29 | # Insert the project root dir as the first element in the PYTHONPATH. 30 | # This lets us ensure that the source package is imported, and that its 31 | # version is used. 32 | sys.path.insert(0, project_root) 33 | 34 | import vcf-annotate-polyphen 35 | 36 | # -- General configuration --------------------------------------------- 37 | 38 | # If your documentation needs a minimal Sphinx version, state it here. 39 | #needs_sphinx = '1.0' 40 | 41 | # Add any Sphinx extension module names here, as strings. They can be 42 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 43 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] 44 | 45 | # Add any paths that contain templates here, relative to this directory. 46 | templates_path = ['_templates'] 47 | 48 | # The suffix of source filenames. 49 | source_suffix = '.rst' 50 | 51 | # The encoding of source files. 52 | #source_encoding = 'utf-8-sig' 53 | 54 | # The master toctree document. 55 | master_doc = 'index' 56 | 57 | # General information about the project. 58 | project = u'a tool to annotate human VCF files with PolyPhen2 effect measures' 59 | copyright = u'2016, B. Arman Aksoy' 60 | 61 | # The version info for the project you're documenting, acts as replacement 62 | # for |version| and |release|, also used in various other places throughout 63 | # the built documents. 64 | # 65 | # The short X.Y version. 66 | version = vcf-annotate-polyphen.__version__ 67 | # The full version, including alpha/beta/rc tags. 68 | release = vcf-annotate-polyphen.__version__ 69 | 70 | # The language for content autogenerated by Sphinx. Refer to documentation 71 | # for a list of supported languages. 72 | #language = None 73 | 74 | # There are two options for replacing |today|: either, you set today to 75 | # some non-false value, then it is used: 76 | #today = '' 77 | # Else, today_fmt is used as the format for a strftime call. 78 | #today_fmt = '%B %d, %Y' 79 | 80 | # List of patterns, relative to source directory, that match files and 81 | # directories to ignore when looking for source files. 82 | exclude_patterns = ['_build'] 83 | 84 | # The reST default role (used for this markup: `text`) to use for all 85 | # documents. 86 | #default_role = None 87 | 88 | # If true, '()' will be appended to :func: etc. cross-reference text. 89 | #add_function_parentheses = True 90 | 91 | # If true, the current module name will be prepended to all description 92 | # unit titles (such as .. function::). 93 | #add_module_names = True 94 | 95 | # If true, sectionauthor and moduleauthor directives will be shown in the 96 | # output. They are ignored by default. 97 | #show_authors = False 98 | 99 | # The name of the Pygments (syntax highlighting) style to use. 100 | pygments_style = 'sphinx' 101 | 102 | # A list of ignored prefixes for module index sorting. 103 | #modindex_common_prefix = [] 104 | 105 | # If true, keep warnings as "system message" paragraphs in the built 106 | # documents. 107 | #keep_warnings = False 108 | 109 | 110 | # -- Options for HTML output ------------------------------------------- 111 | 112 | # The theme to use for HTML and HTML Help pages. See the documentation for 113 | # a list of builtin themes. 114 | html_theme = 'default' 115 | 116 | # Theme options are theme-specific and customize the look and feel of a 117 | # theme further. For a list of options available for each theme, see the 118 | # documentation. 119 | #html_theme_options = {} 120 | 121 | # Add any paths that contain custom themes here, relative to this directory. 122 | #html_theme_path = [] 123 | 124 | # The name for this set of Sphinx documents. If None, it defaults to 125 | # " v documentation". 126 | #html_title = None 127 | 128 | # A shorter title for the navigation bar. Default is the same as 129 | # html_title. 130 | #html_short_title = None 131 | 132 | # The name of an image file (relative to this directory) to place at the 133 | # top of the sidebar. 134 | #html_logo = None 135 | 136 | # The name of an image file (within the static path) to use as favicon 137 | # of the docs. This file should be a Windows icon file (.ico) being 138 | # 16x16 or 32x32 pixels large. 139 | #html_favicon = None 140 | 141 | # Add any paths that contain custom static files (such as style sheets) 142 | # here, relative to this directory. They are copied after the builtin 143 | # static files, so a file named "default.css" will overwrite the builtin 144 | # "default.css". 145 | html_static_path = ['_static'] 146 | 147 | # If not '', a 'Last updated on:' timestamp is inserted at every page 148 | # bottom, using the given strftime format. 149 | #html_last_updated_fmt = '%b %d, %Y' 150 | 151 | # If true, SmartyPants will be used to convert quotes and dashes to 152 | # typographically correct entities. 153 | #html_use_smartypants = True 154 | 155 | # Custom sidebar templates, maps document names to template names. 156 | #html_sidebars = {} 157 | 158 | # Additional templates that should be rendered to pages, maps page names 159 | # to template names. 160 | #html_additional_pages = {} 161 | 162 | # If false, no module index is generated. 163 | #html_domain_indices = True 164 | 165 | # If false, no index is generated. 166 | #html_use_index = True 167 | 168 | # If true, the index is split into individual pages for each letter. 169 | #html_split_index = False 170 | 171 | # If true, links to the reST sources are added to the pages. 172 | #html_show_sourcelink = True 173 | 174 | # If true, "Created using Sphinx" is shown in the HTML footer. 175 | # Default is True. 176 | #html_show_sphinx = True 177 | 178 | # If true, "(C) Copyright ..." is shown in the HTML footer. 179 | # Default is True. 180 | #html_show_copyright = True 181 | 182 | # If true, an OpenSearch description file will be output, and all pages 183 | # will contain a tag referring to it. The value of this option 184 | # must be the base URL from which the finished HTML is served. 185 | #html_use_opensearch = '' 186 | 187 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 188 | #html_file_suffix = None 189 | 190 | # Output file base name for HTML help builder. 191 | htmlhelp_basename = 'vcf-annotate-polyphendoc' 192 | 193 | 194 | # -- Options for LaTeX output ------------------------------------------ 195 | 196 | latex_elements = { 197 | # The paper size ('letterpaper' or 'a4paper'). 198 | #'papersize': 'letterpaper', 199 | 200 | # The font size ('10pt', '11pt' or '12pt'). 201 | #'pointsize': '10pt', 202 | 203 | # Additional stuff for the LaTeX preamble. 204 | #'preamble': '', 205 | } 206 | 207 | # Grouping the document tree into LaTeX files. List of tuples 208 | # (source start file, target name, title, author, documentclass 209 | # [howto/manual]). 210 | latex_documents = [ 211 | ('index', 'vcf-annotate-polyphen.tex', 212 | u'a tool to annotate human VCF files with PolyPhen2 effect measures Documentation', 213 | u'B. Arman Aksoy', 'manual'), 214 | ] 215 | 216 | # The name of an image file (relative to this directory) to place at 217 | # the top of the title page. 218 | #latex_logo = None 219 | 220 | # For "manual" documents, if this is true, then toplevel headings 221 | # are parts, not chapters. 222 | #latex_use_parts = False 223 | 224 | # If true, show page references after internal links. 225 | #latex_show_pagerefs = False 226 | 227 | # If true, show URL addresses after external links. 228 | #latex_show_urls = False 229 | 230 | # Documents to append as an appendix to all manuals. 231 | #latex_appendices = [] 232 | 233 | # If false, no module index is generated. 234 | #latex_domain_indices = True 235 | 236 | 237 | # -- Options for manual page output ------------------------------------ 238 | 239 | # One entry per manual page. List of tuples 240 | # (source start file, name, description, authors, manual section). 241 | man_pages = [ 242 | ('index', 'vcf-annotate-polyphen', 243 | u'a tool to annotate human VCF files with PolyPhen2 effect measures Documentation', 244 | [u'B. Arman Aksoy'], 1) 245 | ] 246 | 247 | # If true, show URL addresses after external links. 248 | #man_show_urls = False 249 | 250 | 251 | # -- Options for Texinfo output ---------------------------------------- 252 | 253 | # Grouping the document tree into Texinfo files. List of tuples 254 | # (source start file, target name, title, author, 255 | # dir menu entry, description, category) 256 | texinfo_documents = [ 257 | ('index', 'vcf-annotate-polyphen', 258 | u'a tool to annotate human VCF files with PolyPhen2 effect measures Documentation', 259 | u'B. Arman Aksoy', 260 | 'vcf-annotate-polyphen', 261 | 'One line description of project.', 262 | 'Miscellaneous'), 263 | ] 264 | 265 | # Documents to append as an appendix to all manuals. 266 | #texinfo_appendices = [] 267 | 268 | # If false, no module index is generated. 269 | #texinfo_domain_indices = True 270 | 271 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 272 | #texinfo_show_urls = 'footnote' 273 | 274 | # If true, do not generate a @detailmenu in the "Top" node's menu. 275 | #texinfo_no_detailmenu = False 276 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CONTRIBUTING.rst 2 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../HISTORY.rst 2 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. vcf-annotate-polyphen documentation master file, created by 2 | sphinx-quickstart on Tue Jul 9 22:26:36 2013. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to a tool to annotate human VCF files with PolyPhen2 effect measures's documentation! 7 | ====================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | readme 15 | installation 16 | usage 17 | contributing 18 | authors 19 | history 20 | 21 | Indices and tables 22 | ================== 23 | 24 | * :ref:`genindex` 25 | * :ref:`modindex` 26 | * :ref:`search` 27 | 28 | -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============ 4 | Installation 5 | ============ 6 | 7 | At the command line:: 8 | 9 | $ easy_install vcf-annotate-polyphen 10 | 11 | Or, if you have virtualenvwrapper installed:: 12 | 13 | $ mkvirtualenv vcf-annotate-polyphen 14 | $ pip install vcf-annotate-polyphen 15 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | goto end 41 | ) 42 | 43 | if "%1" == "clean" ( 44 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 45 | del /q /s %BUILDDIR%\* 46 | goto end 47 | ) 48 | 49 | 50 | %SPHINXBUILD% 2> nul 51 | if errorlevel 9009 ( 52 | echo. 53 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 54 | echo.installed, then set the SPHINXBUILD environment variable to point 55 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 56 | echo.may add the Sphinx directory to PATH. 57 | echo. 58 | echo.If you don't have Sphinx installed, grab it from 59 | echo.http://sphinx-doc.org/ 60 | exit /b 1 61 | ) 62 | 63 | if "%1" == "html" ( 64 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 65 | if errorlevel 1 exit /b 1 66 | echo. 67 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 68 | goto end 69 | ) 70 | 71 | if "%1" == "dirhtml" ( 72 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 73 | if errorlevel 1 exit /b 1 74 | echo. 75 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 76 | goto end 77 | ) 78 | 79 | if "%1" == "singlehtml" ( 80 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 81 | if errorlevel 1 exit /b 1 82 | echo. 83 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 84 | goto end 85 | ) 86 | 87 | if "%1" == "pickle" ( 88 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 89 | if errorlevel 1 exit /b 1 90 | echo. 91 | echo.Build finished; now you can process the pickle files. 92 | goto end 93 | ) 94 | 95 | if "%1" == "json" ( 96 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 97 | if errorlevel 1 exit /b 1 98 | echo. 99 | echo.Build finished; now you can process the JSON files. 100 | goto end 101 | ) 102 | 103 | if "%1" == "htmlhelp" ( 104 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 105 | if errorlevel 1 exit /b 1 106 | echo. 107 | echo.Build finished; now you can run HTML Help Workshop with the ^ 108 | .hhp project file in %BUILDDIR%/htmlhelp. 109 | goto end 110 | ) 111 | 112 | if "%1" == "qthelp" ( 113 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 117 | .qhcp project file in %BUILDDIR%/qthelp, like this: 118 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\vcf-annotate-polyphen.qhcp 119 | echo.To view the help file: 120 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\vcf-annotate-polyphen.ghc 121 | goto end 122 | ) 123 | 124 | if "%1" == "devhelp" ( 125 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished. 129 | goto end 130 | ) 131 | 132 | if "%1" == "epub" ( 133 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 134 | if errorlevel 1 exit /b 1 135 | echo. 136 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 137 | goto end 138 | ) 139 | 140 | if "%1" == "latex" ( 141 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 142 | if errorlevel 1 exit /b 1 143 | echo. 144 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 145 | goto end 146 | ) 147 | 148 | if "%1" == "latexpdf" ( 149 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 150 | cd %BUILDDIR%/latex 151 | make all-pdf 152 | cd %BUILDDIR%/.. 153 | echo. 154 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 155 | goto end 156 | ) 157 | 158 | if "%1" == "latexpdfja" ( 159 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 160 | cd %BUILDDIR%/latex 161 | make all-pdf-ja 162 | cd %BUILDDIR%/.. 163 | echo. 164 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 165 | goto end 166 | ) 167 | 168 | if "%1" == "text" ( 169 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 170 | if errorlevel 1 exit /b 1 171 | echo. 172 | echo.Build finished. The text files are in %BUILDDIR%/text. 173 | goto end 174 | ) 175 | 176 | if "%1" == "man" ( 177 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 178 | if errorlevel 1 exit /b 1 179 | echo. 180 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 181 | goto end 182 | ) 183 | 184 | if "%1" == "texinfo" ( 185 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 186 | if errorlevel 1 exit /b 1 187 | echo. 188 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 189 | goto end 190 | ) 191 | 192 | if "%1" == "gettext" ( 193 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 194 | if errorlevel 1 exit /b 1 195 | echo. 196 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 197 | goto end 198 | ) 199 | 200 | if "%1" == "changes" ( 201 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 202 | if errorlevel 1 exit /b 1 203 | echo. 204 | echo.The overview file is in %BUILDDIR%/changes. 205 | goto end 206 | ) 207 | 208 | if "%1" == "linkcheck" ( 209 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 210 | if errorlevel 1 exit /b 1 211 | echo. 212 | echo.Link check complete; look for any errors in the above output ^ 213 | or in %BUILDDIR%/linkcheck/output.txt. 214 | goto end 215 | ) 216 | 217 | if "%1" == "doctest" ( 218 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 219 | if errorlevel 1 exit /b 1 220 | echo. 221 | echo.Testing of doctests in the sources finished, look at the ^ 222 | results in %BUILDDIR%/doctest/output.txt. 223 | goto end 224 | ) 225 | 226 | if "%1" == "xml" ( 227 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 228 | if errorlevel 1 exit /b 1 229 | echo. 230 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 231 | goto end 232 | ) 233 | 234 | if "%1" == "pseudoxml" ( 235 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 236 | if errorlevel 1 exit /b 1 237 | echo. 238 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 239 | goto end 240 | ) 241 | 242 | :end 243 | -------------------------------------------------------------------------------- /docs/readme.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../README.rst 2 | -------------------------------------------------------------------------------- /docs/usage.rst: -------------------------------------------------------------------------------- 1 | ===== 2 | Usage 3 | ===== 4 | 5 | To use a tool to annotate human VCF files with PolyPhen2 effect measures in a project:: 6 | 7 | import vcf-annotate-polyphen 8 | -------------------------------------------------------------------------------- /example/TCGA-55-6543.annotated.vcf: -------------------------------------------------------------------------------- 1 | ##fileformat=VCFv4.1 2 | ##INFO= 3 | ##INFO= 4 | ##INFO= 5 | ##INFO= 6 | ##INFO= 7 | ##FORMAT= 8 | ##FORMAT= 9 | ##FORMAT= 10 | ##FORMAT= 11 | ##FORMAT= 12 | ##FORMAT= 13 | ##FORMAT= 14 | ##FORMAT= 15 | ##FILTER= 16 | ##contig= 17 | ##contig= 18 | ##contig= 19 | ##contig= 20 | ##contig= 21 | ##contig= 22 | ##contig= 23 | ##contig= 24 | ##contig= 25 | ##contig= 26 | ##contig= 27 | ##contig= 28 | ##contig= 29 | ##contig= 30 | ##contig= 31 | ##contig= 32 | ##contig= 33 | ##contig= 34 | ##contig= 35 | ##contig= 36 | ##contig= 37 | ##contig= 38 | ##contig= 39 | ##contig= 40 | ##contig= 41 | ##contig= 42 | ##contig= 43 | ##contig= 44 | ##contig= 45 | ##contig= 46 | ##contig= 47 | ##contig= 48 | ##contig= 49 | ##contig= 50 | ##contig= 51 | ##contig= 52 | ##contig= 53 | ##contig= 54 | ##contig= 55 | ##contig= 56 | ##contig= 57 | ##contig= 58 | ##contig= 59 | ##contig= 60 | ##contig= 61 | ##contig= 62 | ##contig= 63 | ##contig= 64 | ##contig= 65 | ##contig= 66 | ##contig= 67 | ##contig= 68 | ##contig= 69 | ##contig= 70 | ##contig= 71 | ##contig= 72 | ##contig= 73 | ##contig= 74 | ##contig= 75 | ##contig= 76 | ##contig= 77 | ##contig= 78 | ##contig= 79 | ##contig= 80 | ##contig= 81 | ##contig= 82 | ##contig= 83 | ##contig= 84 | ##contig= 85 | ##contig= 86 | ##contig= 87 | ##contig= 88 | ##contig= 89 | ##contig= 90 | ##contig= 91 | ##contig= 92 | ##contig= 93 | ##contig= 94 | ##contig= 95 | ##contig= 96 | ##contig= 97 | ##contig= 98 | ##contig= 99 | ##contig= 100 | ##contig= 101 | ##contig= 102 | #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT TCGA-55-6543-10A-01D-1753-08 TCGA-55-6543-01A-11D-1753-08 103 | 1 24397690 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:21,0:.:22:0.0:0 0/1:23,3:30.0:26:0.115:2 104 | 1 26134941 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:17,0:.:17:0.0:0 0/1:9,3:33.0:12:0.25:2 105 | 1 27537995 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:13,1:.:14:0.071:0 0/1:11,4:24.0:15:0.267:2 106 | 1 110280922 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:62,0:.:62:0.0:0 0/1:37,20:31.0:57:0.351:2 107 | 1 121484099 rs142367070 G T . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:55,1:.:39:0.018:0 0/1:128,6:33.0:134:0.045:2 108 | 1 145112313 rs2596302 T C . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.0:0 0/1:14,4:31.0:18:0.222:2 109 | 1 148853906 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:51,1:.:52:0.019:0 0/1:68,4:31.0:72:0.056:2 110 | 1 154233344 . T G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:22,3:.:25:0.12:0 0/1:35,7:17.0:43:0.167:2 111 | 1 157548366 . G T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:50,0:.:50:0.0:0 0/1:55,5:33.0:60:0.083:2 112 | 2 60998828 . T G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:22,0:.:22:0.0:0 0/1:19,9:37.0:28:0.321:2 113 | 2 98263950 . C A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:97,0:.:97:0.0:0 0/1:56,32:29.0:88:0.364:2 114 | 2 130987344 rs113863640 A G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:39,0:.:39:0.0:0 0/1:34,3:37.0:37:0.081:2 115 | 2 165351172 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:11,0:.:11:0.0:0 0/1:3,5:30.0:8:0.625:2 116 | 2 179247908 . C G . PASS SOMATIC;VT=SNP;PP2=OSBPL6,Q9BZF3,N593K,probably damaging,0.998,probably damaging,1.0 GT:AD:BQ:DP:FA:SS 0:27,2:.:29:0.069:0 0/1:27,4:28.0:31:0.129:2 117 | 2 179631362 rs3816782 A C . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:33,0:.:33:0.0:0 0/1:26,13:37.0:39:0.333:2 118 | 2 190788073 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:88,0:.:88:0.0:0 0/1:50,31:31.0:81:0.383:2 119 | 2 230312248 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:26,0:.:26:0.0:0 0/1:21,5:31.0:26:0.192:2 120 | 3 9775768 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:30,0:.:30:0.0:0 0/1:33,11:30.0:44:0.25:2 121 | 3 46593057 . C A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:123,0:.:123:0.0:0 0/1:59,28:34.0:87:0.322:2 122 | 5 21882649 . C A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:18,0:.:18:0.0:0 0/1:21,5:31.0:26:0.192:2 123 | 5 31526237 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:84,0:.:84:0.0:0 0/1:102,19:33.0:121:0.157:2 124 | 5 33630758 . T G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:11,0:.:11:0.0:0 0/1:30,4:38.0:34:0.118:2 125 | 5 85592319 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:10,0:.:8:0.0:0 0/1:17,3:37.0:20:0.15:2 126 | 5 108924741 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:9,0:.:9:0.0:0 0/1:16,5:30.0:21:0.238:2 127 | 5 145477637 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.0:0 0/1:28,8:37.0:36:0.222:2 128 | 5 145477898 . T G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:36,0:.:36:0.0:0 0/1:44,12:33.0:56:0.214:2 129 | 5 146030242 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:34,0:.:34:0.0:0 0/1:45,6:30.0:52:0.118:2 130 | 6 11233444 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:32,0:.:32:0.0:0 0/1:39,18:37.0:57:0.316:2 131 | 6 29384929 . A G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:17,0:.:17:0.0:0 0/1:9,2:39.0:11:0.182:2 132 | 7 20180463 rs71839686 G C . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:26,0:.:26:0.0:0 0/1:37,5:23.0:42:0.119:2 133 | 7 55832562 . A G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:57,1:.:58:0.017:0 0/1:79,5:37.0:84:0.06:2 134 | 7 87785187 . A G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:158,0:.:159:0.0:0 0/1:149,34:37.0:183:0.186:2 135 | 7 99796940 . G A . PASS SOMATIC;VT=SNP;PP2=STAG3,Q9UJ98,R508Q,benign,0.0,benign,0.0 GT:AD:BQ:DP:FA:SS 0:37,0:.:37:0.0:0 0/1:49,10:30.0:59:0.169:2 136 | 7 100478963 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:55,0:.:55:0.0:0 0/1:58,17:31.0:75:0.227:2 137 | 8 7826122 rs367569527 G A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:35,1:.:22:0.028:0 0/1:13,3:32.0:16:0.188:2 138 | 8 54141824 rs963549 C T . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:52,0:.:52:0.0:0 0/1:25,23:34.0:48:0.479:2 139 | 9 33395031 rs72707429 G A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:36,1:.:37:0.027:0 0/1:25,6:31.0:31:0.194:2 140 | 9 33395039 rs72707431 C T . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:36,1:.:38:0.027:0 0/1:26,4:30.0:30:0.133:2 141 | 9 35971954 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:121,1:.:122:0.008197:0 0/1:93,4:32.0:97:0.041:2 142 | 9 37692531 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.0:0 0/1:22,3:32.0:25:0.12:2 143 | 9 68433578 rs80303737 A G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:62,1:.:51:0.016:0 0/1:72,4:39.0:76:0.053:2 144 | 9 70871793 rs373464207 A G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:108,1:.:55:0.009174:0 0/1:79,5:39.0:84:0.06:2 145 | 9 95650487 rs180739891 C T . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:126,0:.:126:0.0:0 0/1:89,38:29.0:127:0.299:2 146 | 9 134070639 . A T . PASS SOMATIC;VT=SNP;PP2=NUP214,P35658,I1227L,benign,0.046,benign,0.112 GT:AD:BQ:DP:FA:SS 0:139,0:.:139:0.0:0 0/1:91,38:31.0:129:0.295:2 147 | 10 12219775 . G T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:28,0:.:28:0.0:0 0/1:26,3:36.0:29:0.103:2 148 | 10 26880266 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:38,1:.:39:0.026:0 0/1:26,4:31.0:30:0.133:2 149 | 10 42385282 rs4124037 C T . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:27,0:.:24:0.0:0 0/1:117,5:32.0:122:0.041:2 150 | 10 42385584 rs4462921 T A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:23,0:.:13:0.0:0 0/1:72,4:32.0:76:0.053:2 151 | 10 42599767 rs139875229 A C . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:33,0:.:27:0.0:0 0/1:103,6:35.0:110:0.055:2 152 | 10 102256138 . C G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:78,0:.:78:0.0:0 0/1:47,23:32.0:70:0.329:2 153 | 10 115457383 . A C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:27,1:.:28:0.036:0 0/1:36,6:19.0:42:0.143:2 154 | 10 122667993 . C A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.0:0 0/1:33,3:31.0:36:0.083:2 155 | 11 433471 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:37,0:.:37:0.0:0 0/1:49,15:34.0:64:0.234:2 156 | 11 3143534 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:15,0:.:15:0.0:0 0/1:15,4:30.0:19:0.211:2 157 | 11 51579639 . T G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:20,0:.:18:0.0:0 0/1:115,8:38.0:123:0.065:2 158 | 11 118771997 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:32,0:.:32:0.0:0 0/1:46,18:32.0:64:0.281:2 159 | 12 11230389 . G C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:51,0:.:51:0.0:0 0/1:67,4:36.0:71:0.056:2 160 | 12 44770574 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:17,1:.:18:0.056:0 0/1:26,8:14.0:34:0.235:2 161 | 12 94697492 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:15,2:.:17:0.118:0 0/1:3,6:13.0:9:0.667:2 162 | 13 19961981 rs199807479 G A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:42,1:.:39:0.023:0 0/1:41,6:33.0:47:0.128:2 163 | 13 28903740 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:28,0:.:28:0.0:0 0/1:25,7:33.0:32:0.219:2 164 | 13 49345969 . C A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:29,0:.:29:0.0:0 0/1:31,3:32.0:34:0.088:2 165 | 13 49761195 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:27,0:.:27:0.0:0 0/1:22,8:38.0:30:0.267:2 166 | 13 77625934 rs376292784 T A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:30,0:.:30:0.0:0 0/1:22,13:34.0:35:0.371:2 167 | 14 20147746 . C A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:99,0:.:78:0.0:0 0/1:70,7:31.0:77:0.091:2 168 | 14 20344588 . C A . PASS SOMATIC;VT=SNP;PP2=OR4K2,Q8NGD2,H54Q,benign,0.017,benign,0.008 GT:AD:BQ:DP:FA:SS 0:268,0:.:268:0.0:0 0/1:158,141:32.0:299:0.472:2 169 | 14 20926895 . A T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:19,0:.:19:0.0:0 0/1:16,9:34.0:25:0.36:2 170 | 14 22111343 . A G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:9,0:.:9:0.0:0 0/1:10,6:38.0:16:0.375:2 171 | 14 22180975 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:170,0:.:170:0.0:0 0/1:203,58:31.0:261:0.222:2 172 | 14 24607425 . G C . PASS SOMATIC;VT=SNP;PP2=PSME1,Q06323,M160I,benign,0.306,possibly damaging,0.683 GT:AD:BQ:DP:FA:SS 0:213,0:.:213:0.0:0 0/1:338,15:37.0:353:0.042:2 173 | 14 51372344 . A G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:57,0:.:57:0.0:0 0/1:60,15:37.0:75:0.2:2 174 | 14 76121073 . A T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:13,0:.:13:0.0:0 0/1:8,18:32.0:26:0.692:2 175 | 14 106234188 . A G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:11,0:.:8:0.0:0 0/1:12,3:39.0:15:0.2:2 176 | 14 106357543 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.0:0 0/1:33,10:28.0:43:0.233:2 177 | 15 25652270 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:31,0:.:31:0.0:0 0/1:34,9:38.0:43:0.209:2 178 | 15 34150088 rs200923286 C A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:35,0:.:35:0.0:0 0/1:38,3:32.0:41:0.073:2 179 | 15 40756669 . G T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:13,0:.:13:0.0:0 0/1:20,3:32.0:23:0.13:2 180 | 15 76077992 rs61053099 C G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:43,1:.:28:0.023:0 0/1:27,7:37.0:34:0.206:2 181 | 16 20168328 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:35,0:.:35:0.0:0 0/1:40,3:37.0:44:0.07:2 182 | 16 29332310 rs143769600 C T . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:62,0:.:62:0.0:0 0/1:43,9:31.0:52:0.173:2 183 | 16 29394822 rs376240593 A G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:35,1:.:25:0.028:0 0/1:27,5:35.0:32:0.156:2 184 | 16 33404765 rs7186361 A G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.0:0 0/1:25,3:31.0:28:0.107:2 185 | 16 33404778 . A G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:18,0:.:18:0.0:0 0/1:24,4:32.0:28:0.143:2 186 | 16 33784423 rs190376515 T C . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:19,0:.:19:0.0:0 0/1:22,3:30.0:25:0.12:2 187 | 17 4623596 . T G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:17,1:.:18:0.056:0 0/1:21,6:16.0:27:0.222:2 188 | 17 10436696 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:109,1:.:110:0.009091:0 0/1:71,24:31.0:95:0.253:2 189 | 17 20363816 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:26,0:.:21:0.0:0 0/1:33,4:35.0:37:0.108:2 190 | 17 33289128 . C A . PASS SOMATIC;VT=SNP;PP2=ZNF830,Q96NB3,S181R,benign,0.024,benign,0.112 GT:AD:BQ:DP:FA:SS 0:15,0:.:15:0.0:0 0/1:18,3:30.0:21:0.143:2 191 | 17 39382815 rs71371476 G A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:21,0:.:21:0.0:0 0/1:34,3:36.0:37:0.081:2 192 | 17 45105769 . C G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:81,0:.:81:0.0:0 0/1:87,4:36.0:91:0.044:2 193 | 17 45234725 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:61,1:.:53:0.016:0 0/1:79,5:31.0:84:0.06:2 194 | 17 79952826 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.0:0 0/1:13,3:39.0:16:0.188:2 195 | 18 11610570 rs200091851 C T . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:40,0:.:22:0.0:0 0/1:24,4:32.0:28:0.143:2 196 | 18 11610580 rs201205019 T G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:37,0:.:19:0.0:0 0/1:24,3:37.0:27:0.111:2 197 | 18 15198461 rs367836376 G A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:20,0:.:8:0.0:0 0/1:15,3:35.0:18:0.167:2 198 | 19 4911111 . A C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:8,0:.:8:0.0:0 0/1:7,5:17.0:12:0.417:2 199 | 19 11152224 . A G . PASS SOMATIC;VT=SNP;PP2=SMARCA4,P51532,K1471R,possibly damaging,0.472,possibly damaging,0.563 GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.0:0 0/1:17,10:35.0:27:0.37:2 200 | 19 12015959 . A T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:96,0:.:96:0.0:0 0/1:48,28:33.0:76:0.368:2 201 | 19 20243385 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:81,1:.:82:0.012:0 0/1:93,4:34.0:97:0.041:2 202 | 19 21116811 rs201690956 A G . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:53,1:.:54:0.019:0 0/1:64,6:25.0:70:0.086:2 203 | 19 27732093 rs74211273 G A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:44,1:.:36:0.022:0 0/1:147,8:27.0:155:0.052:2 204 | 19 49445800 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:33,0:.:33:0.0:0 0/1:29,17:29.0:46:0.37:2 205 | 19 55678043 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:27,0:.:27:0.0:0 0/1:32,13:31.0:45:0.289:2 206 | 19 56166481 . T A . PASS SOMATIC;VT=SNP;PP2=U2AF2,P26368-2,F4Y,benign,0.002,benign,0.0 GT:AD:BQ:DP:FA:SS 0:12,0:.:12:0.0:0 0/1:17,4:30.0:21:0.19:2 207 | 20 34528978 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:29,0:.:29:0.0:0 0/1:26,9:33.0:35:0.257:2 208 | 20 57035851 . G T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.0:0 0/1:28,3:32.0:31:0.097:2 209 | 21 10615108 . G A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:10,0:.:9:0.0:0 0/1:3,2:36.0:5:0.4:2 210 | 22 25023459 rs138813205 G C . PASS DB;SOMATIC;VT=SNP;PP2=GGT1,P19440,D361H,benign,0.038,benign,0.022 GT:AD:BQ:DP:FA:SS 0:38,1:.:36:0.026:0 0/1:26,3:34.0:29:0.103:2 211 | 22 36588021 . T C . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:42,0:.:42:0.0:0 0/1:31,11:37.0:42:0.262:2 212 | 22 42339544 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:12,0:.:12:0.0:0 0/1:9,7:30.0:16:0.438:2 213 | X 54497770 . C T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:76,0:.:76:0.0:0 0/1:57,10:32.0:67:0.149:2 214 | X 119664014 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:349,0:.:351:0.0:0 0/1:356,72:33.0:429:0.168:2 215 | X 138630558 . A G . PASS SOMATIC;VT=SNP;PP2=F9,P00740,Q143R,benign,0.373,possibly damaging,0.617 GT:AD:BQ:DP:FA:SS 0:95,0:.:95:0.0:0 0/1:113,32:34.0:145:0.221:2 216 | X 144337081 rs480466 C A . PASS DB;SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:22,0:.:22:0.0:0 0/1:33,3:34.0:36:0.083:2 217 | X 153173206 . C G . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.0:0 0/1:45,5:36.0:50:0.1:2 218 | X 155252868 . T A . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:8,0:.:5:0.0:0 0/1:8,5:30.0:13:0.385:2 219 | Y 13470717 . A T . PASS SOMATIC;VT=SNP;PP2=.,.,.,.,.,.,. GT:AD:BQ:DP:FA:SS 0:30,0:.:30:0.0:0 0/1:1,3:22.0:4:0.75:2 220 | -------------------------------------------------------------------------------- /example/TCGA-55-6543.vcf: -------------------------------------------------------------------------------- 1 | ##fileformat=VCFv4.1 2 | ##FILTER= 3 | ##FORMAT= 4 | ##FORMAT= 5 | ##FORMAT= 6 | ##FORMAT= 7 | ##FORMAT= 8 | ##FORMAT= 9 | ##FORMAT= 10 | ##FORMAT= 11 | ##INFO= 12 | ##INFO= 13 | ##INFO= 14 | ##INFO= 15 | ##contig= 16 | ##contig= 17 | ##contig= 18 | ##contig= 19 | ##contig= 20 | ##contig= 21 | ##contig= 22 | ##contig= 23 | ##contig= 24 | ##contig= 25 | ##contig= 26 | ##contig= 27 | ##contig= 28 | ##contig= 29 | ##contig= 30 | ##contig= 31 | ##contig= 32 | ##contig= 33 | ##contig= 34 | ##contig= 35 | ##contig= 36 | ##contig= 37 | ##contig= 38 | ##contig= 39 | ##contig= 40 | ##contig= 41 | ##contig= 42 | ##contig= 43 | ##contig= 44 | ##contig= 45 | ##contig= 46 | ##contig= 47 | ##contig= 48 | ##contig= 49 | ##contig= 50 | ##contig= 51 | ##contig= 52 | ##contig= 53 | ##contig= 54 | ##contig= 55 | ##contig= 56 | ##contig= 57 | ##contig= 58 | ##contig= 59 | ##contig= 60 | ##contig= 61 | ##contig= 62 | ##contig= 63 | ##contig= 64 | ##contig= 65 | ##contig= 66 | ##contig= 67 | ##contig= 68 | ##contig= 69 | ##contig= 70 | ##contig= 71 | ##contig= 72 | ##contig= 73 | ##contig= 74 | ##contig= 75 | ##contig= 76 | ##contig= 77 | ##contig= 78 | ##contig= 79 | ##contig= 80 | ##contig= 81 | ##contig= 82 | ##contig= 83 | ##contig= 84 | ##contig= 85 | ##contig= 86 | ##contig= 87 | ##contig= 88 | ##contig= 89 | ##contig= 90 | ##contig= 91 | ##contig= 92 | ##contig= 93 | ##contig= 94 | ##contig= 95 | ##contig= 96 | ##contig= 97 | ##contig= 98 | ##contig= 99 | ##contig= 100 | ##contig= 101 | #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT TCGA-55-6543-10A-01D-1753-08 TCGA-55-6543-01A-11D-1753-08 102 | 1 24397690 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:21,0:.:22:0.00:0 0/1:23,3:30:26:0.115:2 103 | 1 26134941 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:17,0:.:17:0.00:0 0/1:9,3:33:12:0.250:2 104 | 1 27537995 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:13,1:.:14:0.071:0 0/1:11,4:24:15:0.267:2 105 | 1 110280922 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:62,0:.:62:0.00:0 0/1:37,20:31:57:0.351:2 106 | 1 121484099 rs142367070 G T . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:55,1:.:39:0.018:0 0/1:128,6:33:134:0.045:2 107 | 1 145112313 rs2596302 T C . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.00:0 0/1:14,4:31:18:0.222:2 108 | 1 148853906 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:51,1:.:52:0.019:0 0/1:68,4:31:72:0.056:2 109 | 1 154233344 . T G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:22,3:.:25:0.120:0 0/1:35,7:17:43:0.167:2 110 | 1 157548366 . G T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:50,0:.:50:0.00:0 0/1:55,5:33:60:0.083:2 111 | 2 60998828 . T G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:22,0:.:22:0.00:0 0/1:19,9:37:28:0.321:2 112 | 2 98263950 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:97,0:.:97:0.00:0 0/1:56,32:29:88:0.364:2 113 | 2 130987344 rs113863640 A G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:39,0:.:39:0.00:0 0/1:34,3:37:37:0.081:2 114 | 2 165351172 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:11,0:.:11:0.00:0 0/1:3,5:30:8:0.625:2 115 | 2 179247908 . C G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:27,2:.:29:0.069:0 0/1:27,4:28:31:0.129:2 116 | 2 179631362 rs3816782 A C . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:33,0:.:33:0.00:0 0/1:26,13:37:39:0.333:2 117 | 2 190788073 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:88,0:.:88:0.00:0 0/1:50,31:31:81:0.383:2 118 | 2 230312248 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:26,0:.:26:0.00:0 0/1:21,5:31:26:0.192:2 119 | 3 9775768 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:30,0:.:30:0.00:0 0/1:33,11:30:44:0.250:2 120 | 3 46593057 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:123,0:.:123:0.00:0 0/1:59,28:34:87:0.322:2 121 | 5 21882649 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:18,0:.:18:0.00:0 0/1:21,5:31:26:0.192:2 122 | 5 31526237 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:84,0:.:84:0.00:0 0/1:102,19:33:121:0.157:2 123 | 5 33630758 . T G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:11,0:.:11:0.00:0 0/1:30,4:38:34:0.118:2 124 | 5 85592319 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:10,0:.:8:0.00:0 0/1:17,3:37:20:0.150:2 125 | 5 108924741 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:9,0:.:9:0.00:0 0/1:16,5:30:21:0.238:2 126 | 5 145477637 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.00:0 0/1:28,8:37:36:0.222:2 127 | 5 145477898 . T G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:36,0:.:36:0.00:0 0/1:44,12:33:56:0.214:2 128 | 5 146030242 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:34,0:.:34:0.00:0 0/1:45,6:30:52:0.118:2 129 | 6 11233444 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:32,0:.:32:0.00:0 0/1:39,18:37:57:0.316:2 130 | 6 29384929 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:17,0:.:17:0.00:0 0/1:9,2:39:11:0.182:2 131 | 7 20180463 rs71839686 G C . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:26,0:.:26:0.00:0 0/1:37,5:23:42:0.119:2 132 | 7 55832562 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:57,1:.:58:0.017:0 0/1:79,5:37:84:0.060:2 133 | 7 87785187 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:158,0:.:159:0.00:0 0/1:149,34:37:183:0.186:2 134 | 7 99796940 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:37,0:.:37:0.00:0 0/1:49,10:30:59:0.169:2 135 | 7 100478963 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:55,0:.:55:0.00:0 0/1:58,17:31:75:0.227:2 136 | 8 7826122 rs367569527 G A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:35,1:.:22:0.028:0 0/1:13,3:32:16:0.188:2 137 | 8 54141824 rs963549 C T . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:52,0:.:52:0.00:0 0/1:25,23:34:48:0.479:2 138 | 9 33395031 rs72707429 G A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:36,1:.:37:0.027:0 0/1:25,6:31:31:0.194:2 139 | 9 33395039 rs72707431 C T . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:36,1:.:38:0.027:0 0/1:26,4:30:30:0.133:2 140 | 9 35971954 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:121,1:.:122:8.197e-03:0 0/1:93,4:32:97:0.041:2 141 | 9 37692531 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.00:0 0/1:22,3:32:25:0.120:2 142 | 9 68433578 rs80303737 A G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:62,1:.:51:0.016:0 0/1:72,4:39:76:0.053:2 143 | 9 70871793 rs373464207 A G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:108,1:.:55:9.174e-03:0 0/1:79,5:39:84:0.060:2 144 | 9 95650487 rs180739891 C T . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:126,0:.:126:0.00:0 0/1:89,38:29:127:0.299:2 145 | 9 134070639 . A T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:139,0:.:139:0.00:0 0/1:91,38:31:129:0.295:2 146 | 10 12219775 . G T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:28,0:.:28:0.00:0 0/1:26,3:36:29:0.103:2 147 | 10 26880266 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:38,1:.:39:0.026:0 0/1:26,4:31:30:0.133:2 148 | 10 42385282 rs4124037 C T . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:27,0:.:24:0.00:0 0/1:117,5:32:122:0.041:2 149 | 10 42385584 rs4462921 T A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:23,0:.:13:0.00:0 0/1:72,4:32:76:0.053:2 150 | 10 42599767 rs139875229 A C . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:33,0:.:27:0.00:0 0/1:103,6:35:110:0.055:2 151 | 10 102256138 . C G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:78,0:.:78:0.00:0 0/1:47,23:32:70:0.329:2 152 | 10 115457383 . A C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:27,1:.:28:0.036:0 0/1:36,6:19:42:0.143:2 153 | 10 122667993 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.00:0 0/1:33,3:31:36:0.083:2 154 | 11 433471 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:37,0:.:37:0.00:0 0/1:49,15:34:64:0.234:2 155 | 11 3143534 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:15,0:.:15:0.00:0 0/1:15,4:30:19:0.211:2 156 | 11 51579639 . T G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:20,0:.:18:0.00:0 0/1:115,8:38:123:0.065:2 157 | 11 118771997 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:32,0:.:32:0.00:0 0/1:46,18:32:64:0.281:2 158 | 12 11230389 . G C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:51,0:.:51:0.00:0 0/1:67,4:36:71:0.056:2 159 | 12 44770574 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:17,1:.:18:0.056:0 0/1:26,8:14:34:0.235:2 160 | 12 94697492 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:15,2:.:17:0.118:0 0/1:3,6:13:9:0.667:2 161 | 13 19961981 rs199807479 G A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:42,1:.:39:0.023:0 0/1:41,6:33:47:0.128:2 162 | 13 28903740 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:28,0:.:28:0.00:0 0/1:25,7:33:32:0.219:2 163 | 13 49345969 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:29,0:.:29:0.00:0 0/1:31,3:32:34:0.088:2 164 | 13 49761195 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:27,0:.:27:0.00:0 0/1:22,8:38:30:0.267:2 165 | 13 77625934 rs376292784 T A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:30,0:.:30:0.00:0 0/1:22,13:34:35:0.371:2 166 | 14 20147746 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:99,0:.:78:0.00:0 0/1:70,7:31:77:0.091:2 167 | 14 20344588 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:268,0:.:268:0.00:0 0/1:158,141:32:299:0.472:2 168 | 14 20926895 . A T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:19,0:.:19:0.00:0 0/1:16,9:34:25:0.360:2 169 | 14 22111343 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:9,0:.:9:0.00:0 0/1:10,6:38:16:0.375:2 170 | 14 22180975 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:170,0:.:170:0.00:0 0/1:203,58:31:261:0.222:2 171 | 14 24607425 . G C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:213,0:.:213:0.00:0 0/1:338,15:37:353:0.042:2 172 | 14 51372344 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:57,0:.:57:0.00:0 0/1:60,15:37:75:0.200:2 173 | 14 76121073 . A T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:13,0:.:13:0.00:0 0/1:8,18:32:26:0.692:2 174 | 14 106234188 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:11,0:.:8:0.00:0 0/1:12,3:39:15:0.200:2 175 | 14 106357543 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.00:0 0/1:33,10:28:43:0.233:2 176 | 15 25652270 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:31,0:.:31:0.00:0 0/1:34,9:38:43:0.209:2 177 | 15 34150088 rs200923286 C A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:35,0:.:35:0.00:0 0/1:38,3:32:41:0.073:2 178 | 15 40756669 . G T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:13,0:.:13:0.00:0 0/1:20,3:32:23:0.130:2 179 | 15 76077992 rs61053099 C G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:43,1:.:28:0.023:0 0/1:27,7:37:34:0.206:2 180 | 16 20168328 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:35,0:.:35:0.00:0 0/1:40,3:37:44:0.070:2 181 | 16 29332310 rs143769600 C T . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:62,0:.:62:0.00:0 0/1:43,9:31:52:0.173:2 182 | 16 29394822 rs376240593 A G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:35,1:.:25:0.028:0 0/1:27,5:35:32:0.156:2 183 | 16 33404765 rs7186361 A G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.00:0 0/1:25,3:31:28:0.107:2 184 | 16 33404778 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:18,0:.:18:0.00:0 0/1:24,4:32:28:0.143:2 185 | 16 33784423 rs190376515 T C . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:19,0:.:19:0.00:0 0/1:22,3:30:25:0.120:2 186 | 17 4623596 . T G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:17,1:.:18:0.056:0 0/1:21,6:16:27:0.222:2 187 | 17 10436696 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:109,1:.:110:9.091e-03:0 0/1:71,24:31:95:0.253:2 188 | 17 20363816 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:26,0:.:21:0.00:0 0/1:33,4:35:37:0.108:2 189 | 17 33289128 . C A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:15,0:.:15:0.00:0 0/1:18,3:30:21:0.143:2 190 | 17 39382815 rs71371476 G A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:21,0:.:21:0.00:0 0/1:34,3:36:37:0.081:2 191 | 17 45105769 . C G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:81,0:.:81:0.00:0 0/1:87,4:36:91:0.044:2 192 | 17 45234725 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:61,1:.:53:0.016:0 0/1:79,5:31:84:0.060:2 193 | 17 79952826 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:20,0:.:20:0.00:0 0/1:13,3:39:16:0.188:2 194 | 18 11610570 rs200091851 C T . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:40,0:.:22:0.00:0 0/1:24,4:32:28:0.143:2 195 | 18 11610580 rs201205019 T G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:37,0:.:19:0.00:0 0/1:24,3:37:27:0.111:2 196 | 18 15198461 rs367836376 G A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:20,0:.:8:0.00:0 0/1:15,3:35:18:0.167:2 197 | 19 4911111 . A C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:8,0:.:8:0.00:0 0/1:7,5:17:12:0.417:2 198 | 19 11152224 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.00:0 0/1:17,10:35:27:0.370:2 199 | 19 12015959 . A T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:96,0:.:96:0.00:0 0/1:48,28:33:76:0.368:2 200 | 19 20243385 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:81,1:.:82:0.012:0 0/1:93,4:34:97:0.041:2 201 | 19 21116811 rs201690956 A G . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:53,1:.:54:0.019:0 0/1:64,6:25:70:0.086:2 202 | 19 27732093 rs74211273 G A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:44,1:.:36:0.022:0 0/1:147,8:27:155:0.052:2 203 | 19 49445800 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:33,0:.:33:0.00:0 0/1:29,17:29:46:0.370:2 204 | 19 55678043 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:27,0:.:27:0.00:0 0/1:32,13:31:45:0.289:2 205 | 19 56166481 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:12,0:.:12:0.00:0 0/1:17,4:30:21:0.190:2 206 | 20 34528978 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:29,0:.:29:0.00:0 0/1:26,9:33:35:0.257:2 207 | 20 57035851 . G T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.00:0 0/1:28,3:32:31:0.097:2 208 | 21 10615108 . G A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:10,0:.:9:0.00:0 0/1:3,2:36:5:0.400:2 209 | 22 25023459 rs138813205 G C . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:38,1:.:36:0.026:0 0/1:26,3:34:29:0.103:2 210 | 22 36588021 . T C . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:42,0:.:42:0.00:0 0/1:31,11:37:42:0.262:2 211 | 22 42339544 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:12,0:.:12:0.00:0 0/1:9,7:30:16:0.438:2 212 | X 54497770 . C T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:76,0:.:76:0.00:0 0/1:57,10:32:67:0.149:2 213 | X 119664014 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:349,0:.:351:0.00:0 0/1:356,72:33:429:0.168:2 214 | X 138630558 . A G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:95,0:.:95:0.00:0 0/1:113,32:34:145:0.221:2 215 | X 144337081 rs480466 C A . PASS DB;SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:22,0:.:22:0.00:0 0/1:33,3:34:36:0.083:2 216 | X 153173206 . C G . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:25,0:.:25:0.00:0 0/1:45,5:36:50:0.100:2 217 | X 155252868 . T A . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:8,0:.:5:0.00:0 0/1:8,5:30:13:0.385:2 218 | Y 13470717 . A T . PASS SOMATIC;VT=SNP GT:AD:BQ:DP:FA:SS 0:30,0:.:30:0.00:0 0/1:1,3:22:4:0.750:2 219 | -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | bumpversion==0.5.3 2 | wheel==0.23.0 3 | watchdog==0.8.3 4 | flake8==2.4.1 5 | tox==2.1.1 6 | coverage==4.0 7 | Sphinx==1.3.1 8 | cryptography==1.0.1 9 | PyYAML==5.1 10 | 11 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.1.0 3 | commit = True 4 | tag = True 5 | 6 | [bumpversion:file:setup.py] 7 | 8 | [bumpversion:file:vap/__init__.py] 9 | 10 | [wheel] 11 | universal = 1 12 | 13 | [flake8] 14 | exclude = docs 15 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | try: 5 | from setuptools import setup 6 | except ImportError: 7 | from distutils.core import setup 8 | 9 | with open('README.md') as readme_file: 10 | readme = readme_file.read() 11 | 12 | requirements = [ 13 | "pyvcf", 14 | "sqlalchemy" 15 | ] 16 | 17 | test_requirements = [] 18 | 19 | setup( 20 | name='vcf-annotate-polyphen', 21 | version='0.1.2', 22 | description="a tool to annotate human VCF files with PolyPhen2 effect measures", 23 | long_description=readme, 24 | long_description_content_type='text/markdown', 25 | author="B. Arman Aksoy", 26 | author_email='arman@aksoy.org', 27 | url='https://github.com/hammerlab/vcf-annotate-polyphen', 28 | packages=['vap'], 29 | package_dir={'vap': 'vap'}, 30 | include_package_data=True, 31 | install_requires=requirements, 32 | license="http://www.apache.org/licenses/LICENSE-2.0.html", 33 | zip_safe=False, 34 | keywords='vcf-annotate-polyphen', 35 | classifiers=[ 36 | 'Development Status :: 2 - Pre-Alpha', 37 | 'Intended Audience :: Developers', 38 | 'License :: OSI Approved :: ISC License (ISCL)', 39 | 'Natural Language :: English', 40 | "Programming Language :: Python :: 2", 41 | 'Programming Language :: Python :: 2.6', 42 | 'Programming Language :: Python :: 2.7', 43 | 'Programming Language :: Python :: 3', 44 | 'Programming Language :: Python :: 3.3', 45 | 'Programming Language :: Python :: 3.4', 46 | 'Programming Language :: Python :: 3.5', 47 | ], 48 | entry_points = {'console_scripts': ['vcf-annotate-polyphen=vap.cli:main']}, 49 | test_suite='tests', 50 | tests_require=test_requirements 51 | ) 52 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /tests/test_vcf-annotate-polyphen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | test_vcf-annotate-polyphen 6 | ---------------------------------- 7 | 8 | Tests for `vcf-annotate-polyphen` module. 9 | """ 10 | 11 | import unittest 12 | 13 | from vcf-annotate-polyphen import vcf-annotate-polyphen 14 | 15 | 16 | class TestVcf-annotate-polyphen(unittest.TestCase): 17 | 18 | def setUp(self): 19 | pass 20 | 21 | def tearDown(self): 22 | pass 23 | 24 | def test_000_something(self): 25 | pass 26 | 27 | 28 | if __name__ == '__main__': 29 | import sys 30 | sys.exit(unittest.main()) 31 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py26, py27, py33, py34, py35 3 | 4 | [testenv] 5 | setenv = 6 | PYTHONPATH = {toxinidir}:{toxinidir}/vcf-annotate-polyphen 7 | commands = python setup.py test 8 | 9 | ; If you want to make tox run the tests with the same versions, create a 10 | ; requirements.txt with the pinned versions and uncomment the following lines: 11 | ; deps = 12 | ; -r{toxinidir}/requirements.txt 13 | -------------------------------------------------------------------------------- /travis_pypi_setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """Update encrypted deploy password in Travis config file 4 | """ 5 | 6 | 7 | from __future__ import print_function 8 | import base64 9 | import json 10 | import os 11 | from getpass import getpass 12 | import yaml 13 | from cryptography.hazmat.primitives.serialization import load_pem_public_key 14 | from cryptography.hazmat.backends import default_backend 15 | from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15 16 | 17 | 18 | try: 19 | from urllib import urlopen 20 | except: 21 | from urllib.request import urlopen 22 | 23 | 24 | GITHUB_REPO = 'hammerlab/vcf-annotate-polyphen' 25 | TRAVIS_CONFIG_FILE = os.path.join( 26 | os.path.dirname(os.path.abspath(__file__)), '.travis.yml') 27 | 28 | 29 | def load_key(pubkey): 30 | """Load public RSA key, with work-around for keys using 31 | incorrect header/footer format. 32 | 33 | Read more about RSA encryption with cryptography: 34 | https://cryptography.io/latest/hazmat/primitives/asymmetric/rsa/ 35 | """ 36 | try: 37 | return load_pem_public_key(pubkey.encode(), default_backend()) 38 | except ValueError: 39 | # workaround for https://github.com/travis-ci/travis-api/issues/196 40 | pubkey = pubkey.replace('BEGIN RSA', 'BEGIN').replace('END RSA', 'END') 41 | return load_pem_public_key(pubkey.encode(), default_backend()) 42 | 43 | 44 | def encrypt(pubkey, password): 45 | """Encrypt password using given RSA public key and encode it with base64. 46 | 47 | The encrypted password can only be decrypted by someone with the 48 | private key (in this case, only Travis). 49 | """ 50 | key = load_key(pubkey) 51 | encrypted_password = key.encrypt(password, PKCS1v15()) 52 | return base64.b64encode(encrypted_password) 53 | 54 | 55 | def fetch_public_key(repo): 56 | """Download RSA public key Travis will use for this repo. 57 | 58 | Travis API docs: http://docs.travis-ci.com/api/#repository-keys 59 | """ 60 | keyurl = 'https://api.travis-ci.org/repos/{0}/key'.format(repo) 61 | data = json.loads(urlopen(keyurl).read().decode()) 62 | if 'key' not in data: 63 | errmsg = "Could not find public key for repo: {}.\n".format(repo) 64 | errmsg += "Have you already added your GitHub repo to Travis?" 65 | raise ValueError(errmsg) 66 | return data['key'] 67 | 68 | 69 | def prepend_line(filepath, line): 70 | """Rewrite a file adding a line to its beginning. 71 | """ 72 | with open(filepath) as f: 73 | lines = f.readlines() 74 | 75 | lines.insert(0, line) 76 | 77 | with open(filepath, 'w') as f: 78 | f.writelines(lines) 79 | 80 | 81 | def load_yaml_config(filepath): 82 | with open(filepath) as f: 83 | return yaml.load(f) 84 | 85 | 86 | def save_yaml_config(filepath, config): 87 | with open(filepath, 'w') as f: 88 | yaml.dump(config, f, default_flow_style=False) 89 | 90 | 91 | def update_travis_deploy_password(encrypted_password): 92 | """Update the deploy section of the .travis.yml file 93 | to use the given encrypted password. 94 | """ 95 | config = load_yaml_config(TRAVIS_CONFIG_FILE) 96 | 97 | config['deploy']['password'] = dict(secure=encrypted_password) 98 | 99 | save_yaml_config(TRAVIS_CONFIG_FILE, config) 100 | 101 | line = ('# This file was autogenerated and will overwrite' 102 | ' each time you run travis_pypi_setup.py\n') 103 | prepend_line(TRAVIS_CONFIG_FILE, line) 104 | 105 | 106 | def main(args): 107 | public_key = fetch_public_key(args.repo) 108 | password = args.password or getpass('PyPI password: ') 109 | update_travis_deploy_password(encrypt(public_key, password.encode())) 110 | print("Wrote encrypted password to .travis.yml -- you're ready to deploy") 111 | 112 | 113 | if '__main__' == __name__: 114 | import argparse 115 | parser = argparse.ArgumentParser(description=__doc__) 116 | parser.add_argument('--repo', default=GITHUB_REPO, 117 | help='GitHub repo (default: %s)' % GITHUB_REPO) 118 | parser.add_argument('--password', 119 | help='PyPI password (will prompt if not provided)') 120 | 121 | args = parser.parse_args() 122 | main(args) 123 | -------------------------------------------------------------------------------- /vap/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from .annotator import Annotation, annotate_variant 4 | 5 | __author__ = 'B. Arman Aksoy' 6 | __email__ = 'arman@aksoy.org' 7 | __version__ = '0.1.2' 8 | 9 | __all__ = ["Annotation", "annotate_variant"] 10 | -------------------------------------------------------------------------------- /vap/annotator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import sqlalchemy 3 | from sqlalchemy import create_engine 4 | from sqlalchemy.sql import select 5 | 6 | class Annotation(object): 7 | def __init__( 8 | self, 9 | chrom, 10 | pos, 11 | ref, 12 | alt, 13 | gene, 14 | protein, 15 | aa_change, 16 | hvar_pred, 17 | hvar_prob, 18 | hdiv_pred, 19 | hdiv_prob): 20 | self.chrom = chrom 21 | self.pos = pos 22 | self.ref = ref 23 | self.alt = alt 24 | self.gene = gene 25 | self.protein = protein 26 | self.aa_change = aa_change 27 | self.hvar_pred = hvar_pred 28 | self.hvar_prob = hvar_prob 29 | self.hdiv_pred = hdiv_pred 30 | self.hdiv_prob = hdiv_prob 31 | 32 | def annotate_variant(conn, chrom, pos, ref, alt): 33 | query_template = ("SELECT chrom, chrpos, nt1, nt2," 34 | " gene, acc, pos, aa1, aa2, " 35 | " hvar_prediction, hvar_prob, " 36 | " hdiv_prediction, hdiv_prob " 37 | "FROM features JOIN scores USING(id) " 38 | "WHERE chrom = '{}' AND chrpos = {}" 39 | " AND nt1 = '{}' AND nt2 = '{}'") 40 | query = query_template.format(chrom, pos, ref, alt) 41 | res = conn.execute(query).fetchone() 42 | if res is None: 43 | return None 44 | else: 45 | return Annotation( 46 | res[0], res[1], res[2], res[3], 47 | res[4], res[5], 48 | "{}{}{}".format(res[7], res[6], res[8]), 49 | res[9], res[10], res[11], res[12]) 50 | -------------------------------------------------------------------------------- /vap/cli.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import sqlalchemy 3 | from sqlalchemy import create_engine 4 | from sqlalchemy.sql import select 5 | 6 | import sys 7 | 8 | import vcf 9 | from vcf.parser import _Info as VcfInfo, field_counts as vcf_field_counts 10 | 11 | from optparse import OptionParser 12 | 13 | from .annotator import annotate_variant 14 | 15 | def _get_args(): 16 | parser = OptionParser(usage="usage: %prog polyphen.whess.sqlite input.vcf output.vcf") 17 | return parser, parser.parse_args() 18 | 19 | def main(): 20 | parser, (options, args) = _get_args() 21 | if len(args) != 3: 22 | parser.error("Missing arguments!") 23 | 24 | pp2file = args[0] 25 | input_vcf = args[1] 26 | output_vcf = args[2] 27 | 28 | engine = create_engine('sqlite:///{}'.format(pp2file)) 29 | conn = engine.connect() 30 | 31 | annotation_identifier = "PP2" 32 | 33 | reader = vcf.Reader(open(input_vcf, 'r')) 34 | reader.infos[annotation_identifier] = VcfInfo( 35 | annotation_identifier, 36 | 1, 37 | 'String', 38 | ("PolyPhen2 annotations in the following order:" 39 | "Gene name; " 40 | "UniProt id; " 41 | "Amino acid change; " 42 | "HVar effect category; " 43 | "Strength of var effect (probability); ", 44 | "HDiv effect category; " 45 | "Strength of div effect (probability)"), 46 | 'PolyPhen2', 47 | 'PGV001') 48 | writer = vcf.Writer(open(output_vcf, 'w'), reader, lineterminator='\n') 49 | for v in reader: 50 | res = annotate_variant( 51 | conn, 52 | v.CHROM if v.CHROM.startswith('chr') else 'chr{}'.format(v.CHROM), 53 | v.POS, 54 | v.REF, 55 | v.ALT[0]) 56 | if res is None: 57 | annotation = ['.', '.', '.', '.', '.', '.', '.'] 58 | else: 59 | annotation = [ 60 | res.gene, 61 | res.protein, 62 | res.aa_change, 63 | res.hvar_pred, 64 | res.hvar_prob, 65 | res.hdiv_pred, 66 | res.hdiv_prob] 67 | 68 | v.add_info(annotation_identifier, annotation) 69 | writer.write_record(v) 70 | 71 | if __name__ == '__main__': 72 | main() 73 | --------------------------------------------------------------------------------