Skip to content

Commit cb631ab

Browse files
committed
Patch: if vcf is empty do not check annotation & return an empty vcf
1 parent 894d6f3 commit cb631ab

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

mobidic_mpa/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
]
1414
__copyright__ = 'Copyright (C) 2017-2022'
1515
__license__ = 'Academic License Agreement'
16-
__version__ = '1.2.5'
16+
__version__ = '1.2.6'
1717
__email__ = 'c-vangoethem@chu-montpellier.fr'
1818
__status__ = 'prod'
1919

@@ -414,8 +414,12 @@ def main(args, logger):
414414
vcf_reader.infos.update({'MPA_impact': info_MPA_impact})
415415
vcf_reader.infos.update({'MPA_ranking': info_MPA_ranking})
416416
vcf_writer = vcf.Writer(open(args.output, 'w'), vcf_reader)
417-
log.info("Check vcf annotations")
418417

418+
if count == 0:
419+
log.warn("No variant in VCF. Exit.")
420+
sys.exit(0)
421+
422+
log.info("Check vcf annotations")
419423
try:
420424
check_annotation(vcf_reader.infos, args.no_refseq_version)
421425
except SystemExit as e:

scripts/mpa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ __authors__ = [
1313
]
1414
__copyright__ = 'Copyright (C) 2017-2022'
1515
__license__ = 'Academic License Agreement'
16-
__version__ = '1.2.5'
16+
__version__ = '1.2.6'
1717
__email__ = 'c-vangoethem@chu-montpellier.fr'
1818
__status__ = 'prod'
1919

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
]
1414
__copyright__ = 'Copyright (C) 2017-2022'
1515
__license__ = 'Academic License Agreement'
16-
__version__ = '1.2.5'
16+
__version__ = '1.2.6'
1717
__email__ = 'c-vangoethem@chu-montpellier.fr'
1818
__status__ = 'prod'
1919

@@ -30,7 +30,7 @@
3030
description="MPA: MoBiDiC Prioritization Algorithm",
3131
long_description=long_description,
3232
long_description_content_type="text/markdown",
33-
url="https://neuro-2.iurc.montp.inserm.fr/mpaweb/",
33+
url="https://mobidic.github.io/MPA/",
3434
packages=setuptools.find_packages(),
3535
classifiers=[
3636
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)