Skip to content

Commit

Permalink
Merge pull request #12 from stjude/modupe-patch
Browse files Browse the repository at this point in the history
keyerror with unmatched chromosomes
  • Loading branch information
madetunj authored Apr 21, 2021
2 parents 975a372 + 1cbded3 commit 2820f5c
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 2820f5c

Please sign in to comment.