Question: Identifying mutations between haplotypes using haploNet (pegas) in R
1
gravatar for GabrielMontenegro
2.6 years ago by
United Kingdom
GabrielMontenegro560 wrote:

I think this might be an easy question, but I could not solve it after reading the pegas documentation. I want to plot an haplotype network using a FASTA file and identify which mutations are separatting the distinct haplotypes.

Example:

fa <- read.FASTA("example.fa")
haps <- haplotype(fa)
haps50 <- subset(haps, minfreq = 50)
(network <- haploNet(haps50))

plot(network, size = attr(network, "freq"),show.mutation=1,labels=T)

enter image description here

How can I identify the position of the mutation in my FASTA file that is separating for example haplotype XX from V?

Extra question: Would it be also possible to know for example, what is the haplotype sequence of one of the haplotypes? For example haplotype V, which is quite frequent?

phylogenetics pegas R haplotypes • 1.5k views
ADD COMMENTlink modified 2.3 years ago by Jie Ping30 • written 2.6 years ago by GabrielMontenegro560
1
gravatar for Jie Ping
2.3 years ago by
Jie Ping30
China
Jie Ping30 wrote:

Yes! We can get the sequence of each haplotype by using function diffHaplo in R package pegas.

For example,

1. generate test data

data(woodmouse)
x <- woodmouse[sample(15, size = 110, replace = TRUE),]
h <- haplotype(x)
(net <- haploNet(h))

Haplotype network with:
15 haplotypes
14 links
54 alternative links
link lengths between 2 and 14 steps
Now, we have 15 haplotypes.

2. get the sequence

as.data.frame(diffHaplo(h,1:15))

The sequences are as follows:
pos I II III IV V VI VII VIII IX X XI XII XIII XIV II.1
1 30 T T T T T T T T C T T T T T T
2 33 C C C C C C C C C T C C C C C
3 35 A A A A A A A G A A A A A A A
4 36 T T T T T T C T T T T T T C T
5 42 C C C T C C C C C C C C C C C
6 51 C T C T C C C C T C T C C C T
7 54 A G A A A A A A A A A A A A G
8 60 T T T T C T T T T T T T T T T
......

ADD COMMENTlink written 2.3 years ago by Jie Ping30
Please log in to add an answer.

Help
Access

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