Skip to content

Commit 2685ee0

Browse files
authored
Merge pull request #67 from jlanga/devel
Devel
2 parents 615c0e6 + deae088 commit 2685ee0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

exfi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
filters.
44
"""
55

6-
__version__ = '1.5.4'
6+
__version__ = '1.5.5'

exfi/arguments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ def add_gff3_type(parser):
328328
parser.add_argument(
329329
'--type-gff3', '-m',
330330
type=str,
331-
help='Source of the GFF3 type (ensembl or gmap)',
332-
choices=['ensembl', 'gmap'],
331+
help='Source of the GFF3 type (ensembl, gmap, ncbi)',
332+
choices=['ensembl', 'gmap', 'ncbi'],
333333
default='ensembl',
334334
metavar='STR',
335335
dest='gff3_type'

exfi/io/gff3_to_bed.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ def gff3_to_bed3(gff3_in, mode="ensembl"):
4949
exons['transcript_id'] = exons['attributes']\
5050
.str.split(";").str[1]\
5151
.str.extract(r'Name=([\w\d.-_]+)')
52+
elif mode == "ncbi":
53+
logging.info("gff3 comes from NCBI Genomes")
54+
exons = raw[raw['type'] == 'exon'].drop(columns='type')
55+
exons['transcript_id'] = exons.attributes\
56+
.str.extract(r"transcript_id=([A-Za-z0-9_.]+)")
57+
exons = exons.dropna()
5258
else:
5359
logging.info('gff3 comes from ensembl')
5460
exons = raw[raw['type'] == 'exon'].drop(columns='type')

0 commit comments

Comments
 (0)