bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

bcftools consensus: Making a chain file to convert coordinates BACK to input reference

Open dvera opened this issue 8 years ago • 4 comments

Currently, bcftools consensus creates a chain file to convert coordinates from the reference to the newly-created consensus. It would be great if the directionality of the chain was documented, as I was under the impression it created a chain to lift coordinates back to the reference. Is there a way to create a chain file to convert back to the reference coordinates from the consensus coordinates, or can this be implemented in the consensus tool?

dvera avatar Dec 11 '17 13:12 dvera

You may have figured this out already, but if I'm not mistaken this should be possible with the -c option of consensus. I was actually looking for the answer to the same question just now and found a post that seems to answer this: https://bioinformatics.stackexchange.com/questions/285/remapping-genomic-coordinates-to-account-for-indels

OldManTae avatar Feb 09 '18 21:02 OldManTae

-c will create a chain file, but in the opposite direction I'm interested in. I'd like to go from new->old, not old->new.

dvera avatar Mar 01 '18 12:03 dvera

I am happy to accept pull requests, but extremely unlikely to work on this myself.

pd3 avatar Jun 30 '18 10:06 pd3

oh well, since I stumbled on this issue ... UCSC has a utility for this called chainswap, which one can find by googling for the "Kent source tree", by following this link hgdownload.soe.ucsc.edu/admin/exe/ or by using (bio-) conda: ucsc-chainswap

ptrebert avatar Oct 30 '24 13:10 ptrebert