Core, dispensable, and private genome #200
Unanswered
beantkapoor786
asked this question in
Q&A
Replies: 1 comment 1 reply
-
If you are talking about unique and shared haplotypes across the genome, one option would be to use rPHG2 and generate a haplotype ID matrix to summarize unique IDs across each column (reference ranges): library(rPHG2)
phgLib <- "path/to/your/phgv2/lib/dir"
initPhg(phgLib)
hvcfFiles <- hvcfDir |> list.files(pattern = ".h.vcf")
graph <- hvcfFiles |>
PhgLocalCon() |>
buildHaplotypeGraph()
hapIds <- graph |> readHapIds()
hapProfile <- data.frame(
ref_range = hapIds |> colnames(),
n_uniq_ids = hapIds |> apply(2, \(it) it |> unique() |> length())
) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Once I have gone through the PHG build and load module, how can I calculate the core, dispensable, and private genome percentage?
Beta Was this translation helpful? Give feedback.
All reactions