AttributeError in fb_pca
Opened this issue · 0 comments
kvshams commented
Was trying [Ufb,Sfb,Vfb]=mimosca.fb_pca(DGEwtZ,k=20)
in the DC_celltypes-wt-github.ipynb
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-45-a1934ebf4e01> in <module>
1 #Facebook's Fast PCA (useful if using more than 10,000 cells) for calculating SVD, top 50 components
2 #[Ufb,Sfb,Vfb]=mimosca.fb_pca(DGEwtZ,k=50)
----> 3 [Ufb,Sfb,Vfb]=mimosca.fb_pca(DGEwtZ,k=50)
~/Tools/MIMOSCA/mimosca.py in fb_pca(DGE, k)
1269 def fb_pca(DGE,k=50):
1270 if 'fbpca' in sys.modules:
-> 1271 [Ufb,Sfb,Vfb]=fbpca.pca(DGE,k)
1272 else:
1273 pca=sklearn.decomposition.PCA(n_components=k)
~/miniconda3/lib/python3.7/site-packages/fbpca.py in pca(A, k, raw, n_iter, l)
1636 #
1637 c = A.sum(axis=0) / m
-> 1638 c = c.reshape((1, n))
1639
1640 #
~/miniconda3/lib/python3.7/site-packages/pandas/core/generic.py in __getattr__(self, name)
5177 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5178 return self[name]
-> 5179 return object.__getattribute__(self, name)
5180
5181 def __setattr__(self, name, value):
AttributeError: 'Series' object has no attribute 'reshape'