Skip to content

Commit

Permalink
keyerror with unmatched chromosomes
Browse files Browse the repository at this point in the history
  • Loading branch information
Adetunji committed Apr 21, 2021
1 parent 975a372 commit 1cbded3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/BAM2GFF_gtftogenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@ def main():
newline[0], newline[1].strip('";')))
else:
sys.exit("ERROR :\tFailed to process %s" %(gtf_name))
PSEUDOGFF.write(results+"\n")
parse_genelocations(chrom_sizes, results, flank)

#create annotation files
try:
if chrom_sizes[lines[0]]:
PSEUDOGFF.write(results+"\n")
parse_genelocations(chrom_sizes, results, flank)
except KeyError:
continue
#print("%s not found in genome fasta, skipped!" %(lines[0]))

if __name__ == "__main__":
main()

0 comments on commit 1cbded3

Please sign in to comment.