this works fine, thanks a lot.
There is a genome in unoriented and unorder scaffolds. I am interested in a specific area of the genome. Therefore I managed to align the scaffolds to a closely related species and I got an idea about the orientation of the scaffolds.
Do you know any way to change the orientation inside the genbank file of those scaffolds? In order to upload it later to a genome viewer such as Artemis?
Any help please. Thanks a lot.
eg. is there any way to merge the scaffolds and add one CDS next to the other, in the correct way? In biopython?
2 answers
In Biopython, something like this should work
from Bio import SeqIO
my_record = SeqIO.read("input.gbk", "genbank")
reversed_record = my_record.reverse_complement(id="new_id", ...)
SeqIO.write(reversed_record, "output.gbk", "genbank")
The tricky part is deciding which of the annotations like name etc should be kept or replaced.
Thank you for the answer. I will try it out. Do you know if there is any tool that reverses the order of the feature coordinates in a gbk file? Is that doable in biopython?
My guess is it is doable in biopython, how easy it will be to do is another matter. I've never delved into the features/annotations API that much, so I really don't know
Log in to answer this question.
You can try Mauve contig mover option http://gel.ahabs.wisc.edu/mauve/
yes i tried mauve, this is the one which I used to align the scaffolds. But then I need the .gbk file to upload it the genome browser. The mauve does not seem to output a gbk file or simiar. Any idea for that?
There is a very similar thread on SEQanswers http://seqanswers.com/forums/showthread.php?t=32828