inversionfix.py now works with inversions, but not nested inversions.
inversionfix.py interprets dnadiff output more accurately, and undoes inversions using reverse complementation. When the integrated biodiff ran on an test querry and reference with 2 known inversions, inversionfix.py correctly identified the inversions, and created a temp file with the inversion fixed it then passed to the rest of biodiff, resulting in a cleaner output vcf from biodiff. There were a few bases along the edges of the inversions that were left unaltered, resulting in a couple entries from biodiff, but only a few. When run on isolate 1-0007 inversionfix.py finds and reverses some inversions. However for isolate 4-0010, which has a large inversion with several smaller inversions overlapping it, inversionfix.py fails to correct them properly. It interprets the start of a sub inversion as the end of the current inversion, resulting in the large inversion being intrpretted as a series of consecutive inversions. Thus the syntenny of the components is still flipped, even if their contents are now the right way around. I do not yet know if dnadiff records any information reguarding the nested structure of these inversions, or if I will need to find another method to find and reverse nested inversions. Perhaps someone has already written a paper...
Showing with 28 additions and 15 deletions