Skip to content

Commit cf1799b

Browse files
author
Jon Palmer
committed
fix tab in library
1 parent 041bba6 commit cf1799b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/library.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,10 @@ def dicts2tbl(genesDict, scaff2genes, scaffLen, SeqCenter, SeqRefNum, skipList,
18651865
log.debug('Incompatible annotation found: {:}\n{:}'.format(genes, geneInfo))
18661866
duplicates += 1
18671867
continue
1868-
if len(geneInfo['ids']) == 0:
1868+
if geneInfo['type'] == 'mRNA' and len(geneInfo['CDS']) == 0:
1869+
nocds += 1
1870+
continue
1871+
if geneInfo['type'] == None:
18691872
continue
18701873
#check for partial models
18711874
if True in geneInfo['partialStart']:
@@ -3053,6 +3056,10 @@ def _sortDict(d):
30533056
continue
30543057
if v['type'] == 'mRNA' and not len(v['ids']) == len(v['mRNA']) == len(v['CDS']):
30553058
continue
3059+
if v['type'] == 'mRNA' and len(v['CDS']) == 0:
3060+
continue
3061+
if v['type'] == None:
3062+
continue
30563063
if v['name']:
30573064
gffout.write("{:}\t{:}\tgene\t{:}\t{:}\t.\t{:}\t.\tID={:};Name={:};\n".format(v['contig'], v['source'], v['location'][0], v['location'][1], v['strand'], k, v['name']))
30583065
else:

0 commit comments

Comments
 (0)