diff --git a/bioinfokit/__init__.py b/bioinfokit/__init__.py index 95d072b..31a3aaf 100644 --- a/bioinfokit/__init__.py +++ b/bioinfokit/__init__.py @@ -1,5 +1,5 @@ name = "bioinfokit" -__version__ = "1.0.4" +__version__ = "1.0.5" __author__ = "Renesh Bedre" diff --git a/bioinfokit/analys.py b/bioinfokit/analys.py index cb60e9c..a68c0bc 100644 --- a/bioinfokit/analys.py +++ b/bioinfokit/analys.py @@ -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()