Question: haplotype network analysis with Pegas package in R
gravatar for Ana
10 months ago by
Ana180 wrote:

Hi all, I am very new in haplotype analysis and have faced with some problems that I do not know how to solve. I want to generate haplotype networks for sodium channel (DKr gene) in anopheles species. I have converted my vcf into fast file, produced multiple alignment with ClustalW and I am using "Pegas" package in R in order to generate the networks. This is simply the R-code that I am using

naso<-read.dna("test.2.fasta", format="fasta") 

# list of indivduals
nasoHaps1 <- haplotype(naso)

  stack(setNames(attr(nasoHaps1, "index"), rownames(nasoHaps1))), 
  table(hap=ind, pop=rownames(naso)[values])
ind.hap[1:10, 1:9]  #print just a chunk

net <- haploNet(nasoHaps1)
plot(net, size = attr(net, "freq"))

plot(nasoNet, size=attr(net, "freq"), scale.ratio = 2, cex = 0.8, pie=ind.hap)
legend(50,50, colnames(ind.hap), col=rainbow(ncol(ind.hap)), pch=20)

I keep getting these error message:

> Warning messages: 1: In haplotype.DNAbin(naso) :   some sequences of
> different lengths were assigned to the same haplotype 2: In
> haplotype.DNAbin(naso) :   some sequences were not assigned to the
> same haplotype because of ambiguities

Could someone please guide me how I can resolve these two! how can I find ambiguous positions? I appreciate any help.

haplotype pegas R • 667 views
ADD COMMENTlink modified 10 months ago • written 10 months ago by Ana180
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1888 users visited in the last hour