Package: hmtnote
HmtNoteHuman mitochondrial variants annotation using HmtVar.Free software: MIT licenseDocumentation:https://hmtnote.readthedocs.ioGitHub repo:https://github.com/robertopreste/HmtNotePublication:https://doi.org/10.1101/600619FeaturesHmtNote is a bioinformatics Python module and command line interface that can be used to annotate human mitochondrial variants from a VCF file, using data available onHmtVar.Annotations are grouped into basic, cross-reference, variability and predictions, depending on the type of information they provide. It is possible to either use all of them to fully annotate a VCF file, or choose specific annotations of interest.HmtNote works by pulling the required data fromHmtVaron the fly, but if you’re planning to annotate VCF files offline, it is possible to download the annotation database so that HmtNote can use it when no internet connection is available.For more information, please refer to theUsagesection of the documentation.InstallationPLEASE NOTE: HmtNote only supports Python >= 3.6!The preferred installation method for HmtNote is usingpip:$pipinstallhmtnoteFor more information, please refer to theInstallationsection of the documentation.UsageCommand Line InterfaceHmtNote can be used as a command line tool, using theannotatecommand and providing the input VCF file name and the file name or path where the annotated VCF will be saved:hmtnote annotate input.vcf annotated.vcfBy default, HmtNote will annotate the VCF file using all four groups of annotations (basic, cross-reference, variability and predictions). If desired, you can select which specific annotation you want, using respectively--basic,--crossref,--variaband--predict(or-b,-c,-v,-p), or any combination of these options:hmtnote annotate input.vcf annotated_basic.vcf --basic
hmtnote annotate input.vcf annotated_crossreferences.vcf --crossref
hmtnote annotate input.vcf annotated_variability.vcf --variab
hmtnote annotate input.vcf annotated_predictions.vcf --predict
hmtnote annotate input.vcf annotate_basic_variability.vcf --basic --variabIt is also possible to convert the resulting annotated VCF file to CSV format, for a simpler visual inspection of the data, by simply specifying the--csvoption(please note that an output VCF file name must be provided):hmtnote annotate input.vcf annotated.vcf --csvAn additionalannotated.csvfile will be created in the same directory ofannotated.vcf.By default, HmtNote works by pulling the required data fromHmtVaron the fly, but if you’re planning to annotate VCF files offline, first download the annotation database using thedumpcommand:hmtnote dumpAfter that, HmtNote is capable of working even when no internet connection is available; this can be achieved using the--offlineoption after the usual annotation command:hmtnote annotate input.vcf annotated.vcf --offline
hmtnote annotate input.vcf annotated_variability.vcf --variab --offlineFor more information, please refer to theUsagesection of the documentation.Python ModuleHmtNote can also be imported in a Python script and its functionannotate_vcf()can be used to annotate a given VCF:from hmtnote import annotate
annotate("input.vcf", "annotated.vcf")By default,annotate_vcf()will annotate the VCF using all four groups of annotations (basic, cross-reference, variability and predictions). If desired, you can specify which kind of annotation you want, using respectively thebasic=True,crossref=True,variab=True,predict=Truearguments, or any combination of them:annotate("input.vcf", "annotated_basic.vcf", basic=True)
annotate("input.vcf", "annotated_crossreferences.vcf", crossref=True)
annotate("input.vcf", "annotated_variability.vcf", variab=True)
annotate("input.vcf", "annotated_predictions.vcf", predict=True)An additional annotated CSV can be produced from the output VCF using thecsv=Trueargument:annotate("input.vcf", "annotated.vcf", csv=True)It is also possible to download the annotation database using thedump()function, and perform offline annotation of VCF files by simply adding theoffline=Trueargument toannotate_vcf():from hmtnote import dump
dump()
annotate("input.vcf", "annotated.vcf", offline=True)For more information, please refer to theUsagesection of the documentation.Citing HmtNoteIf you find HmtNote useful for your research, please cite this work:Preste R.et al- Human mitochondrial variant annotation with HmtNote (doi:https://doi.org/10.1101/600619)CreditsThis package was created withCookiecutterand thecc-pypackageproject template.History0.1.0 (2019-03-03)First release on PyPI.0.1.1 (2019-03-04)Clean installation requirements for conda;Update documentation.0.1.2 (2019-03-15)Classes and methods are protected where needed;Code style is clean.0.1.3 (2019-03-17)Fix issue with--predictannotation, which didn’t retrieve the correct field from HmtVar.0.1.4 (2019-03-19)Fix issue that prevented importingannotate_vcf()into Python scripts.0.1.5 (2019-03-20)Add HmtVar ID of the variant in basic and full annotation;ChangeDisease Scoreannotation toDiseaseScore.0.2.0 (2019-03-25)Add warnings tohmtnotecommand to be compliant with future versions;Check internet connection before trying to annotate variants.0.3.0 (2019-03-27)Add options to download the annotation database locally;Use local database to annotate variants (instead of calling HmtVar’s API);Fallback to using local database when no internet connection is available;Check if local database actually exists before performing offline annotation;Databases are downloaded asynchronously.0.3.1 (2019-03-29)Update installation requirements and documentation.0.4.0 (2019-04-03)Add support for insertion and deletion annotations;Add test suite and files for indels.0.5.0 (2019-04-28)Replace VCF parsing using VCFpy instead of cyvcf2;Renamehmtnote.annotate_vcf()tohmtnote.annotate()for compliance with CLI.0.5.1 (2019-04-29)Fix issue with the new VCFpy implementation where new info where badly reported;Update test files restricting the number of entries to 80 for faster testing.0.5.2 (2019-04-30)Fix requirements in setup.py file.0.5.3 (2019-05-06)Update requirements in setup.py.0.5.4 (2019-05-06)Fix installation issue.0.5.5 (2019-05-06)Fix VCF record parsing issue.0.6.0 (2019-06-25)Use vcfpy2 for VCF files parsing;Dump annotation files directly from HmtVar instead of the original API call;Add annotation progress bar;Check internet connection using httpstat.us;Update tests and add more test cases;Update documentation with detailed API usage.0.7.0 (2019-07-26)Add--csvcommand line option to convert output to CSV format;Add homoplasmy annotations;Update all tests accordingly;Update documentation.0.7.1 (2019-07-30)Fix issue with echoed string (#78);Fix issue with CSV format columns (#79);Update testfiles.0.7.2 (2019-08-16)Remove pysam from requirements and fix dependencies;Change docstrings to Google style;Update documentation;Update testfiles.