LinkageIO / Camoco

Camoco is a fully-fledged software package for building co-expression networks and analyzing the overlap interactions among genes.
MIT License
41 stars 32 forks source link

Two-tail GO, linkage fix, locality fix #56

Closed MeeshCompBio closed 7 years ago

MeeshCompBio commented 7 years ago

I added the modifications for two-tailed go (storing action and reducing the number of times density is computed).

The linkage function was failing during pytest because can only work on finite values to I converted NaN's to 0's.

I was also getting an error when running the health cli command with GO terms.

ValueError: Pandas data cast to numpy dtype of object. Check input data with np.asarray(data).                                               │
> /project/chadm/Meesh/CamocoHelixInstall/conda/envs/camoco/lib/python3.6/site-packages/statsmodels/base/data.py(471)_convert_endog_exog()   │
    469         exog = exog if exog is None else np.asarray(exog)                                                                            │
    470         if endog.dtype == object or exog is not None and exog.dtype == object:                                                       │
--> 471             raise ValueError("Pandas data cast to numpy dtype of object. "                                                           │
    472                              "Check input data with np.asarray(data).")                                                              │
    473         return super(PandasData, self)._convert_endog_exog(endog, exog)   

Googling that error pointed me to the sm.OLS function and just casting values to floats fixed the problem.