You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but scikit allele does not accept this format, and return the error:
a, b, c = allel.weir_cockerham_fst(test2, subpops)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Untitled-2 in
----> 39 a, b, c = allel.weir_cockerham_fst(test2, subpops)
~/anaconda3/envs/hail/lib/python3.7/site-packages/allel/stats/fst.py in weir_cockerham_fst(g, subpops, max_allele, blen)
107 g = GenotypeArray(g, copy=False)
108 if g.ndim != 3:
--> 109 raise ValueError('g must have three dimensions')
110 if g.shape[2] != 2:
111 raise NotImplementedError('only diploid genotypes are supported')
ValueError: g must have three dimensions
Please advice me on how to process the right format for this function. At this moment I extract the genotype from VCF files, then I split the genotype by '|' and converting it to int, I wonder if there are native methods to read vcf to genotype array exists
The text was updated successfully, but these errors were encountered:
Hi, I'm currently calculating Fst using scikit-allel module.
I tried to use a pandas dataframe with format (n_variants, n_samples), each cell is a list of genotype, like this:
but scikit allele does not accept this format, and return the error:
Please advice me on how to process the right format for this function. At this moment I extract the genotype from VCF files, then I split the genotype by '|' and converting it to
int
, I wonder if there are native methods to read vcf to genotype array existsThe text was updated successfully, but these errors were encountered: