diff --git a/README.md b/README.md index 6c4100b..c2bdc34 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## SpliceAI: A deep learning-based tool to identify splice variants [![Downloads](https://pepy.tech/badge/spliceai)](https://pepy.tech/project/spliceai) -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-red.svg)](https://www.gnu.org/licenses/gpl-3.0) This package annotates genetic variants with their predicted effect on splicing, as described in [Jaganathan *et al*, Cell 2019 in press](https://doi.org/10.1016/j.cell.2018.12.015). @@ -39,7 +39,7 @@ Required parameters: Optional parameters: - ```-D```: Maximum distance between the variant and gained/lost splice site (default: 50). - - ```-M```: Mask scores representing annotated acceptor/donor gain and unannotated acceptor/donor loss (default: False). + - ```-M```: Mask scores representing annotated acceptor/donor gain and unannotated acceptor/donor loss (default: 0). Details of SpliceAI INFO field: diff --git a/spliceai/__main__.py b/spliceai/__main__.py index 5f50ed9..91f54e5 100644 --- a/spliceai/__main__.py +++ b/spliceai/__main__.py @@ -25,12 +25,14 @@ def get_options(): help='"grch37" (GENCODE V24lift37 canonical annotation file in ' 'package), "grch38" (GENCODE V24 canonical annotation file in ' 'package), or path to a similar custom gene annotation file') - parser.add_argument('-D', metavar='distance', nargs='?', default=50, type=int, + parser.add_argument('-D', metavar='distance', nargs='?', default=50, + type=int, choices=range(0, 5000), help='maximum distance between the variant and gained/lost splice ' 'site, defaults to 50') - parser.add_argument('-M', metavar='mask', nargs='?', default=False, type=bool, + parser.add_argument('-M', metavar='mask', nargs='?', default=0, + type=int, choices=[0, 1], help='mask scores representing annotated acceptor/donor gain and ' - 'unannotated acceptor/donor loss, defaults to False') + 'unannotated acceptor/donor loss, defaults to 0') args = parser.parse_args() return args diff --git a/spliceai/utils.py b/spliceai/utils.py index c0615ad..6dcb30b 100644 --- a/spliceai/utils.py +++ b/spliceai/utils.py @@ -28,7 +28,7 @@ def __init__(self, ref_fasta, annotations): self.exon_ends = [np.asarray(list(map(int, re.split(',', c)[:-1]))) for c in df['EXON_END'].get_values()] except IOError as e: - logging.error('Error reading gene annotation file {}: {}'.format(annotations, e)) + logging.error('{}'.format(e)) exit() except (KeyError, pd.errors.ParserError) as e: logging.error('Gene annotation file {} not formatted properly: {}'.format(annotations, e)) @@ -37,7 +37,7 @@ def __init__(self, ref_fasta, annotations): try: self.ref_fasta = Fasta(ref_fasta, rebuild=False) except IOError as e: - logging.error('Error reading reference genome fasta file {}: {}'.format(ref_fasta, e)) + logging.error('{}'.format(e)) exit() paths = ('models/spliceai{}.h5'.format(x) for x in range(1, 6))