Skip to content

Commit

Permalink
analysis updated to handle dot values in for phase in CDS feature
Browse files Browse the repository at this point in the history
  • Loading branch information
reneshbedre committed Dec 22, 2020
1 parent e32f47a commit 8591554
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bioinfokit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "bioinfokit"
__version__ = "1.0.4"
__version__ = "1.0.5"
__author__ = "Renesh Bedre"


10 changes: 8 additions & 2 deletions bioinfokit/analys.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,8 +1471,14 @@ def gff_to_gtf(file='gff_file', trn_feature_name=None, parent_attr='Parent'):
cds_ct += 1
cds_dict_st[transcript_id_cds].append(line[3])
cds_dict_end[transcript_id_cds].append(line[4])
cds_dict_st_phase[(transcript_id_cds, line[3])] = line[7]
cds_dict_end_phase[(transcript_id_cds, line[4])] = line[7]
# if CDS phase contains dot values
if line[7] == '.':
print('Warning: No valid phase values for CDS feature. making phase value to zero')
cds_dict_st_phase[(transcript_id_cds, line[3])] = 0
cds_dict_end_phase[(transcript_id_cds, line[4])] = 0
else:
cds_dict_st_phase[(transcript_id_cds, line[3])] = line[7]
cds_dict_end_phase[(transcript_id_cds, line[4])] = line[7]

read_gff_file_cds.close()

Expand Down

0 comments on commit 8591554

Please sign in to comment.