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

-sites_save option outputs zero value for all markers #81

Closed yksakana closed 9 months ago

yksakana commented 9 months ago

Hi, I'm currently doing PCA using pcangsd and I would like to get the information about sites of markers that contribute to each PC in the analysis. I learned that the -sites_save option outputs a file of 1's and 0's for keeping a site or not in the MAF filtering, respectively, and I'm using this option. However, the output file only outputs 0 for all markers. Is there any way to solve this problem?

My code for pcangsd is follows: pcangsd -b $READDIR/genolike.beagle.gz --iter 2000 -o ./pcangsd_out -e 10 --sites_save --admix --snp_weights --selection

, which outputs the following file named "pcangsd_out.sites":

0
0
0
0
0
...
0

I think that the program is running without any problems, as I get the following messages:

Parsing Beagle file.
Loaded 6122 sites and 112 individuals.
Estimating minor allele frequencies.
EM (MAF) converged at iteration: 25
Number of sites after MAF filtering (0.05): 4985

and

Creating boolean vector of sites surviving filters.
Saved boolean vector of sites kept after filtering as ./pcangsd_out.sites

From these messages, I think I should get 4985 sites with 1 in the output file..., but no 1 appeared in the file.

Thanks!

Rosemeis commented 9 months ago

I have pushed an update that should fix the issue (v1.21)! Thanks for the heads up.

Best, Jonas

yksakana commented 9 months ago

Thank you very much! I really appreciate your prompt action!

Best, Yusuke