austintwang / plasma

A statistical fine-mapping method for functional data using QTL and allelic-imbalance signal
4 stars 1 forks source link

AttributeError: 'Finemap' object has no attribute '_calc_counts' #3

Open Dazcam opened 4 years ago

Dazcam commented 4 years ago

After manual edits to the scripts mentioned in issue number 2, and using the same files as mentioned there, running the following command throws the following error:

./run_plasma.py hap1.txt exp1.txt hap2.txt exp2.txt plasma_out/ --total_exp_path exp_total.txt -o tagwise_dsprsn.txt

 RuntimeWarning: divide by zero encountered in true_divide * (1 + self.overdispersion * (counts - 1))
 Traceback (most recent call last):
   File "./run_plasma.py", line 78, in <module>
run_plasma(args)
   File "./run_plasma.py", line 40, in run_plasma
model.initialize()
   File "/c8000xd3/big-c1477909/fine_mapping/plasma/ase_finemap/finemap.py", line 395, in initialize
self._calc_imbalance_stats()
   File "/c8000xd3/big-c1477909/fine_mapping/plasma/ase_finemap/finemap.py", line 198, in _calc_imbalance_stats
self._calc_imbalance_errors()
   File "/c8000xd3/big-c1477909/fine_mapping/plasma/ase_finemap/finemap.py", line 159, in _calc_imbalance_errors
self._calc_counts()
 AttributeError: 'Finemap' object has no attribute '_calc_counts'

As I am really interested in using this package, it would be great to have some feedback on how to get around these errors, and whether this package is being actively maintained.

Any advice you could offer would be greatly appreciated

liangyy commented 4 years ago

Hi developers,

Thanks for developing this tool for fine-mapping! We encountered the same error. We wonder if there is way to overcome it.

Thanks!

Yanyu

raehoonj commented 3 years ago

I don't know if you have been able to fix the problem, but I removed the function _calc_counts() in _calc_imbalance_errors() function because it doesn't actually need it. The dev version actually doesn't have that line.

Raehoon.