Skip to content

Commit

Permalink
Version 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaganathan committed Oct 12, 2019
1 parent 18fde6f commit d11e5e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down Expand Up @@ -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:

Expand Down
8 changes: 5 additions & 3 deletions spliceai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spliceai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit d11e5e5

Please sign in to comment.