Please help me guys!
I have 20 DNA sequences from 4 sampling location, 5 individual each location. I would like to make haplotype network using R studio.
Here is my scripts
library("ape")
library("pegas")
read.dna("fiksya.fasta", format="fasta") -> Naso
Naso
NasoHaps <- haplotype(Naso)
NasoHaps
NasoNet <- haploNet(NasoHaps)
plot(NasoNet, size=attr(NasoNet,"freq")*.2, labels=F, fast=F,
show.mutation=T)
ind.hap<-with(
stack(setNames(attr(NasoHaps, "index"), rownames(NasoHaps))),
table(hap=ind, pop=rownames(Naso)[values]))
ind.hap
plot(NasoNet, size=attr(NasoNet, "freq"), pie=ind.hap)
the output is like this
I would like to change the position of haplotype network, set the size of picture (I hope it would become bigger than now), add the legend based on the name of sampling locations, change the color based on my own preference.
Does anyone know how to do so?
Please help me.
Thank you.