haplotype network analysis with Pegas package in R
1
0
Entering edit mode
4.0 years ago
Ana ▴ 200

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

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

# list of indivduals
table(rownames(naso))
nasoHaps1 <- haplotype(naso)
nasoHaps1

ind.hap<-with(
  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 • 3.1k views
ADD COMMENT
0
Entering edit mode
2.7 years ago
pmc.sa ▴ 40

Hey Ana,

I'm having the same concern with my data. Did you find information regarding this warning?

Thanks,

Pedro

ADD COMMENT

Login before adding your answer.

Traffic: 2076 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