bcm-uga / pcadapt

Performing highly efficient genome scans for local adaptation with R package pcadapt v4
https://bcm-uga.github.io/pcadapt
37 stars 10 forks source link

Feature request: Polyploid data #50

Closed ahmaduaf closed 4 years ago

ahmaduaf commented 4 years ago

Hello,

I was wondering if there is a possibility to use tetraploid data with Pca adapt?, I have genotype data where data is coded from 0 to 5 ( 0= 0 copy of reference alleles. vs 5 = 4 copies of reference alleles). Thank you!

privefl commented 4 years ago

Unfortunately, I don't have time to work on this.

Maybe it would possible to hack or modify the matrix format.

Possible hack: currently, missing values are represented by 3 internally. If you code your 3s as 2.999999, maybe it could work. Possible implem: change the way we code NAs internally (e.g. as a parameter) and make sure the code is general enough to accept tetraploid data.

ahmaduaf commented 4 years ago

Hello, Thanks, I think, it would be possible to input data (as a matrix) as diploid by modifying the tetraploid genotype matrix (I have not tried it yet), but i am not sure if it would be the right way to treat the data.

privefl commented 4 years ago

I mean, in the matrix, you should be able to store other values than 0, 1, 2 and NA