SQ fields differ in the header
coopergrace opened this issue · 1 comments
Dear Gabriel,
I'm receiving the following error when attempting to use replaceanc:
$ glactools replaceanc chr1.pops.acf.gz chr1.ancroot.acf.gz > ancrooted.chr1.acf.gz
GlacReplaceAncestor: The SQ fields differ in the header, are they from the same reference?
Is there a way to override or force glactools to accept that the references are the same, or to use one over the other? The reference genomes I used were the same sequences, but with differing sequence names - I had to shorten the names whilst generating the ancestral and root vcfs and that may be causing this issue downstream.
Failing that, is there a way to manually edit the headers of acf files?
Cheers
Cooper
Dear Cooper,
If you 100% that the references are the same except that the chr names have different names, just use: "glactools reheader".
You can actually use file descriptors as such:
glactools replaceanc chr1.pops.acf.gz <(glactools reheader -u chr1.ancroot.acf.gz newheader.txt) > ancrooted.chr1.acf.gz
The -u is to produce uncompressed, there is no point in compressing then decompressing :-)