Rosemeis / pcangsd

Framework for analyzing low depth NGS data in heterogeneous populations using PCA.
GNU General Public License v3.0
46 stars 11 forks source link

Different result among versions, same dataset #68

Open Ittybittyweeny opened 1 year ago

Ittybittyweeny commented 1 year ago

Hi!

I was running first version 0.97, and my PCA looked like this: all_maf0 05_pctind0 80_maxdepth12_sinexcess_het cov pca

Now I updated to version 1.11 and ran the exact same code and dataset, but my PCA changed a lot: image

I can not find information about how PCAngsd changed so to explain how I am getting different results. What do you think is the issue here? Thank you!

Rosemeis commented 1 year ago

Hi,

Can you also share the commands you used for both runs. :-) Did the number of SNPs differ between the runs?

Best, Jonas

Ittybittyweeny commented 1 year ago

Hi, Thank you for your help. It was super simple since I was just interested in the covariance matrices at the moment. I ran: v0.97 python2 pcangsd097_path/pcangsd.py -threads 2 -beagle "my_beagle.gz" -o out

v1.11 (installed so no need for path) module load python/3.7 pcangsd/1.10 pcangsd -t 2 -b "my_beagle.gz"-o out

In my humble opinion,it looks like the new version is more conservative or stringent. The number of SNPs and samples is exactly the same, these are both runs using the same beagle file as input. Thank you again!

Best!

Rosemeis commented 1 year ago

Okay that is good to know. What about the number of eigenvectors inferred to use in the iterative process? Is there a difference? You can try to add the following parameter in both cases, "-e 2", and see if that is the case.

Best, Jonas

Ittybittyweeny commented 1 year ago

Hi Jonas!

When specifying -e 2 in version 1.11 I get a similar structure than when not specifying it in the older one. Explained variance in both PCs is still less than the calculated with the version 0.97 but I think that is much more similar now and will be using such parameter. Thank you for your help!!! all_maf0 05_pctind0 80_maxdepth12_selecangsd1 11 cov pca