-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flip gff3 annotations to match flipped sequences #248
Comments
Sounds like a good task for AGAT. I would keep the selection of sequences to flip outside AGAT. You provide a fasta file and a gff nothing else. All annotations from sequences provided by the fasta file will be flipped. (The fasta is needed to know the length of the sequence) |
Could you give a try to |
@Juke34 Thank you so much for developing this tool. I have been looking for a tool that can do this, and I really appreciate that it can reverse some of the annotations and not all. I wonder, though, if this tool is just reversing the annotations or reverse complementing the annotations. As I tried it on my .gff file, I see the start and end positions are reversed, but if the sequence in the fasta file was reverse complemented, wouldn't the strand of the annotation change from + to - or from - to + (or maybe I haven't thought it through properly)? The strand remained the same in my output gff. Maybe there needs to be an option to just reverse the annotation (like it seems it is doing now) or reverse complement the annotation and change the strand? |
Hi, you ae right strand of the annotation should change, I probably forgot that. |
Thanks for the update. However, the strand did not change when I tried the new version. I can see you added lines 104-111 to the script to capture the strand value and invert it, but maybe the new inverted value was not set like it was for the start and end position in lines 101-102? Also, I got the error |
Should be fine now |
Thanks for the quick response. The |
My bad, did that to quickly... I will fix that |
When aligned one genome to another, we found some scaffolds were in reverse orientations. We can easily reverse complement the sequences of these scaffolds, but we found "flipping" the annotations quite challenging (ie, 1-bp off issue). I searched
genometools
andAGAT
, and neither has tools for this purpose.I would like to reverse the start and end of annotations of a given set of sequences. For example, if the gff3 file has chr1, chr2, ..., chrN, and I would like to reverse annotations of chr1 and chr2. The script takes into a file (or a comma-separated string) designating the sequences that I would like to reverse, then reverse the annotations within these sequences
Liftoff tools may do the job, but making the task too complicated. If the chainfile is not correctly created, the resulting rematch will contain unnecessary noise.
Thank you!
Shujun
The text was updated successfully, but these errors were encountered: