Formatting Haplotype Network in R
0
0
Entering edit mode
6.0 years ago

I am trying to make a haplotype network out of the COI marker for a dataset of 291 Microtus sp. sequences. I am concerned because there seems to be a 1:1 haplotype to sequence ratio. Additionally, I am having trouble formatting my haplotype network. I would like it to show pie charts and possibly be linked with geography.

This is the code that I have so far:

#Align the Sequeces
stringset <- DNAStringSet(MicrotusMarker$nucleotides)
MicrotusAlignment <- DNAStringSet(muscle::muscle(stringset, gapopen = -10000))

#Determine the Haplotypes
MicrotusBin <- as.DNAbin(MicrotusAlignment)
MicrotusHaplotypes <- haplotype(MicrotusBin)
attr(MicrotusHaplotypes, "index")[[1]]
plot(sort(MicrotusHaplotypes))

#Haplotype Network
HaploNet <- haploNet(MicrotusHaplotypes, d = NULL, getProb = TRUE)
plot(HaploNet, size = attr(HaploNet,"freq"), scale.ratio = 10, cex = 2, pie = NULL)
R Pegas HaplotypeNetwork • 2.4k views
ADD COMMENT
0
Entering edit mode

Have you solved this ? I have the similar program with pegas

ADD REPLY

Login before adding your answer.

Traffic: 2523 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6