Skip to content
Snippets Groups Projects
Commit 24e6d5d5 authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

get_contigs returned in the wrong way

parent 5b1c37b0
No related branches found
No related tags found
No related merge requests found
......@@ -1133,8 +1133,10 @@ def get_genome_contigs_and_rename(gembase_name, gpath, outfile):
# - write header ("<contig name> <size>") to replicon file
if prev_cont:
cont = "\t".join([prev_cont, str(cont_size)]) + "\n"
sizes[prev_cont] = cont_size
contigs[prev_cont] = prev_orig_name
prevcont_nohead = "".join(prev_cont.split(">")[1:])
prev_orig_name_nohead = "".join(prev_orig_name.split(">")[1:])
sizes[prevcont_nohead] = cont_size
contigs[prev_orig_name_nohead] = prevcont_nohead
grf.write(cont)
grf.write(seq)
prev_cont = ">" + gembase_name + "." + str(contig_num).zfill(4)
......@@ -1148,8 +1150,10 @@ def get_genome_contigs_and_rename(gembase_name, gpath, outfile):
cont_size += len(line.strip())
# Write last contig
cont = "\t".join([prev_cont, str(cont_size)]) + "\n"
sizes[prev_cont] = cont_size
contigs[prev_cont] = prev_orig_name
prevcont_nohead = "".join(prev_cont.split(">")[1:])
prev_orig_name_nohead = "".join(prev_orig_name.split(">")[1:])
contigs[prev_orig_name_nohead] = prevcont_nohead
sizes[prevcont_nohead] = cont_size
grf.write(cont)
grf.write(seq)
return contigs, sizes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment