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

TypeError: 'offset' is an invalid keyword argument for fromfile() #48

Open samarth8392 opened 3 years ago

samarth8392 commented 3 years ago

Hi, I am trying to run PCAngsd v.1.01 to get the inbreeding coefficients and create a neighbor joining tree. My code is:

python pcangsd.py -threads 200 \
-maf_tole 1e-9 -tole 1e-9 -inbreedSamples -inbreedSites -iter 5000 -maf_iter 5000 -inbreed_iter 5000 -inbreed_tole 1e-9 \
-e 10 -tree -tree_samples all.115.5x.samplelist \
-plink all.115.5x.final.SNPs.500kb.noZ.rename \
-o all.115.5x \
&> all.115.5x.log

And I am getting an error:

Traceback (most recent call last):
  File "pcangsd.py", line 177, in <module>
    G = np.fromfile(bed, dtype=np.uint8, offset=3)
TypeError: 'offset' is an invalid keyword argument for fromfile()

One thing that's different from normal is my PLINK file was generated from a VCF file (following GATK SNP calling) instead of a genotype likelihood file generated from ANGSD. I have 115 samples and 11,910,929 SNPs in my dataset.

Can you help me understand why am I getting this error and how to solve it?

Thanks, Samarth

Rosemeis commented 3 years ago

Hey Samarth,

It looks like a NumPy version issue. The 'offset' parameter was added in NumPy >= 1.17.

Best, Jonas