hakyim / TO-DELETE-PrediXcan

Code for the in-dev PrediXcan Project
MIT License
28 stars 82 forks source link

PrediXcan fails with MemoryError when a huge amount of individuals is provided #26

Open miltondp opened 7 years ago

miltondp commented 7 years ago

If the number of individuals is around 150,000, PrediXcan fails with a MemoryError exception. I've used the DGN model.

./PrediXcan.py --predict --assoc --linear \
      --weights ./models/DGN-HapMap-2015/DGN-WB_0.5.db \
      --dosages /dir --samples myfile.fam \
      --pheno pheno.txt --pheno_name myphenotype \
      --output_prefix test

    2017-04-06 11:24:08.266724 Preloading weights...
    2017-04-06 11:24:10.281721 Processing chr1.txt.gz
    Traceback (most recent call last):
      File "./PrediXcan.py", line 230, in <module>
        main()
      File "./PrediXcan.py", line 211, in main
        transcription_matrix.update(gene, weight, ref_allele, allele, dosage_row)
      File "./PrediXcan.py", line 101, in update
        self.D = np.zeros((len(self.gene_list), len(dosage_row))) # Genes x Cases
    MemoryError