Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix long NCBI identifiers for GenBank after merging GFF features; tha…

…nks to Björn Grüning
  • Loading branch information...
commit ab64b65609e8adedcaa850a00ea9b1736d5cddec 1 parent 540b030
@chapmanb authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 gff/Scripts/gff/gff_to_genbank.py
View
5 gff/Scripts/gff/gff_to_genbank.py
@@ -15,10 +15,9 @@
def main(gff_file, fasta_file):
out_file = "%s.gb" % os.path.splitext(gff_file)[0]
- fasta_input = SeqIO.to_dict(_fix_ncbi_id(
- SeqIO.parse(fasta_file, "fasta", generic_dna)))
+ fasta_input = SeqIO.to_dict(SeqIO.parse(fasta_file, "fasta", generic_dna))
gff_iter = GFF.parse(gff_file, fasta_input)
- SeqIO.write(_check_gff(gff_iter), out_file, "genbank")
+ SeqIO.write(_check_gff(_fix_ncbi_id(gff_iter)), out_file, "genbank")
def _fix_ncbi_id(fasta_iter):
"""GenBank identifiers can only be 16 characters; try to shorten NCBI.
Please sign in to comment.
Something went wrong with that request. Please try again.