5b824f9124e8690ce35118cb2ab8ecfe61fad8cc,src/pyscenic/regulome.py,,derive_regulomes,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,223

Before Change


        //TODO: Based on current understanding (I/O-bound performance that can be mitigated by in-memory databases),
        //TODO: best approach towards parallelization is to create dedicated workers for a specific database. These
        //TODO: workers process all gene signatures using a in-memory version of the database.
        p = Pool(num_workers if num_workers else cpu_count())
        module2regulome4pair = partial(module2regulome, motif_annotations=motif_annotations,
                                   rank_threshold=rank_threshold, auc_threshold=auc_threshold,
                                   nes_threshold=nes_threshold, avgrcc_sample_frac=avgrcc_sample_frac,
                                   weighted_recovery=weighted_recovery)

After Change


        // of the algorithm.
        assert len(rnkdbs) <= num_workers if num_workers else cpu_count(), "The number of databases is larger than the number of cores."
        print("Using {} workers.".format(len(rnkdbs)))
        receivers = []
        for db in rnkdbs:
            sender, receiver = Pipe()
            receivers.append(receiver)
            Worker(db, modules, motif_annotations_fname, sender).start()
        return reduce(concat, (recv.recv() for recv in receivers))
    else:
        // Create dask graph.
        from cytoolz.curried import filter as filtercur
        dask_graph = delayed(compose(list, filtercur(is_not_none)))(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: aertslab/pySCENIC
Commit Name: 5b824f9124e8690ce35118cb2ab8ecfe61fad8cc
Time: 2018-02-06
Author: vandesande.bram@gmail.com
File Name: src/pyscenic/regulome.py
Class Name:
Method Name: derive_regulomes


Project Name: Pinafore/qb
Commit Name: 166cb2c804d081401f0efb52745d214fa633fae1
Time: 2017-04-13
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/elasticsearch.py
Class Name: ElasticSearchGuesser
Method Name: guess


Project Name: stanford-mast/nn_dataflow
Commit Name: d19d3fcccc2c30dc3dbc6153a5875ba81cfbff37
Time: 2017-05-10
Author: mgao12@stanford.edu
File Name: nn_dataflow/Scheduling.py
Class Name: Scheduling
Method Name: schedule_search_per_node