ade919cc86680ae0728a7475c81d23546c56016b,src/pyscenic/rnkdb.py,FeatherRankingDatabase,load_full,#FeatherRankingDatabase#,255

Before Change


        return tuple(reader.get_column_name(idx) for idx in range(self.total_genes) if reader.get_column_name(idx) != INDEX_NAME)

    def load_full(self) -> pd.DataFrame:
        return FeatherReader(self._fname).read_pandas().set_index(INDEX_NAME)

    def load(self, gs: Type[GeneSignature]) -> pd.DataFrame:
        return FeatherReader(self._fname).read_pandas(columns=(INDEX_NAME,) + gs.genes).set_index(INDEX_NAME)

After Change


        return tuple(reader.get_column_name(idx) for idx in range(self.total_genes) if reader.get_column_name(idx) != INDEX_NAME)

    def load_full(self) -> pd.DataFrame:
        df = FeatherReader(self._fname).read_pandas()
        // Avoid copying the whole dataframe by replacing the index in place.
        // This makes loading a database twice as fast in case the database file is already in the filesystem cache.
        df.set_index(INDEX_NAME, inplace=True)
        return df

    def load(self, gs: Type[GeneSignature]) -> pd.DataFrame:
        df = FeatherReader(self._fname).read_pandas(columns=(INDEX_NAME,) + gs.genes)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: aertslab/pySCENIC
Commit Name: ade919cc86680ae0728a7475c81d23546c56016b
Time: 2020-08-10
Author: gert.hulselmans@kuleuven.vib.be
File Name: src/pyscenic/rnkdb.py
Class Name: FeatherRankingDatabase
Method Name: load_full


Project Name: aertslab/pySCENIC
Commit Name: ade919cc86680ae0728a7475c81d23546c56016b
Time: 2020-08-10
Author: gert.hulselmans@kuleuven.vib.be
File Name: src/pyscenic/rnkdb.py
Class Name: InvertedRankingDatabase
Method Name: __init__


Project Name: aertslab/pySCENIC
Commit Name: ade919cc86680ae0728a7475c81d23546c56016b
Time: 2020-08-10
Author: gert.hulselmans@kuleuven.vib.be
File Name: src/pyscenic/rnkdb.py
Class Name: FeatherRankingDatabase
Method Name: load