e4145e615afe2540b3bd3787e013e0f6e57f68e9,scanpy/preprocessing/simple.py,,pca,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,310

Before Change


        adata = data.copy() if copy else data
        from .. import settings as sett  // why is this necessary?
        if ("X_pca" in adata.smp
            and adata.smp["X_pca"].shape[1] >= n_comps
            and not recompute
            and (sett.recompute == "none" or sett.recompute == "pp")):
            logg.m("    not recomputing PCA, using "X_pca" contained "
                   "in `adata.smp` (set `recompute=True` to avoid this)", v=4)
            return adata
        else:
            logg.m("compute PCA with n_comps =", n_comps, r=True, v=4)
            result = pca(adata.X, n_comps=n_comps, zero_center=zero_center,
                         svd_solver=svd_solver, random_state=random_state,
                         recompute=recompute, mute=mute, return_info=True)
            X_pca, components, pca_variance_ratio = result
            adata.smp["X_pca"] = X_pca  // this is multicolumn-sample annotation
            for icomp, comp in enumerate(components):
                adata.var["PC" + str(icomp+1)] = comp
            adata.add["pca_variance_ratio"] = pca_variance_ratio

After Change


        adata = data.copy() if copy else data
        from .. import settings as sett  // why is this necessary?
        if ("X_pca" in adata.smp
            and adata.get_multicol_field_smp("X_pca").shape[1] >= n_comps
            and not recompute
            and (sett.recompute == "none" or sett.recompute == "pp")):
            logg.m("    not recomputing PCA, using "X_pca" contained "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: theislab/scanpy
Commit Name: e4145e615afe2540b3bd3787e013e0f6e57f68e9
Time: 2017-11-10
Author: f.alex.wolf@gmx.de
File Name: scanpy/preprocessing/simple.py
Class Name:
Method Name: pca


Project Name: theislab/scanpy
Commit Name: e4145e615afe2540b3bd3787e013e0f6e57f68e9
Time: 2017-11-10
Author: f.alex.wolf@gmx.de
File Name: scanpy/data_structs/data_graph.py
Class Name: DataGraph
Method Name: __init__


Project Name: theislab/scanpy
Commit Name: e4145e615afe2540b3bd3787e013e0f6e57f68e9
Time: 2017-11-10
Author: f.alex.wolf@gmx.de
File Name: scanpy/preprocessing/simple.py
Class Name:
Method Name: pca


Project Name: theislab/scanpy
Commit Name: e4145e615afe2540b3bd3787e013e0f6e57f68e9
Time: 2017-11-10
Author: f.alex.wolf@gmx.de
File Name: scanpy/tools/tsne.py
Class Name:
Method Name: tsne