HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> basic population genetic statistics
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1351200601

Message started by rbjmax on Oct 25th, 2012 at 2:30pm

Title: basic population genetic statistics
Post by rbjmax on Oct 25th, 2012 at 2:30pm
hi all-
I would like to calculate 'pi' for my virus populations- mean number of pairwise nucleotide differences weighted by numbers of individuals per haplotype. is this available in HyPhy?

thanks!
Rachel

Title: Re: basic population genetic statistics
Post by Sergei on Oct 26th, 2012 at 11:18am
Hi Rachel,

How do you want to supply the # of individuals per haplotype? You could encode that in the sequence name, e.g.

>seq1_100
act...
>seq2_500
agt...

or by providing a separate file, such as

seq_name, haplotype_count
seq1,100
seq2,500

Sergei

Title: Re: basic population genetic statistics
Post by rbjmax on Nov 7th, 2012 at 11:18am
Sergei-
I have both file types prepared. the first option is the most cohesive with my overall data management strategy.

Rachel

Title: Re: basic population genetic statistics
Post by Sergei on Nov 13th, 2012 at 4:34pm
Hi Rachel,

Use the attached. It expects an alignment where each sequence id is like "tag_count", e.g. seq1_500

Sergei



http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?action=downloadfile;file=PiPopulation.bf (1 KB | 5 )

Title: Re: basic population genetic statistics
Post by rbjmax on Jan 4th, 2013 at 2:48pm
thank you, Sergei!

that .bf ran beautifully, thank you. does it utilize the Nei 1987 method like Arlequin used to? also, the values were about 100 times higher than I expected- are they percentage values?

Rachel

Title: Re: basic population genetic statistics
Post by Sergei on Jan 4th, 2013 at 3:41pm
Hi Rachel,

The method is as simple as it gets: just compute the NUMBER of pairwise differences between sequences. It doesn't for example take sequence length into account, which is why you may be seeing numbers 100* larger that expected. The attached code implements the Nei and Li (1979) method (Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login), which uses proportions.

Sergei
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?action=downloadfile;file=PiPopulation_001.bf (1 KB | 1 )

Title: Re: basic population genetic statistics
Post by rbjmax on Jan 7th, 2013 at 10:46am
perfect, thanks Sergei

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.