ffb068553a2044f33ad9395d6e45f2f2a7375587,scanpy/tests/test_score_genes.py,,test_add_score,#,5

Before Change


def test_add_score():
    // TODO: write a test that costs less resources and is more meaningful
    adata = AnnData(np.random.randint(0, 1000, 100000).reshape((100, 1000)))
    gene_names = np.array(["".join([chr(x) for x in np.random.randint(65, 90, 6)]) for n in range(2000)])
    adata.var_names = gene_names[:1000]
    sc.pp.normalize_per_cell(adata, counts_per_cell_after=1e4)
    sc.pp.log1p(adata)

After Change


    adata.var_names = gene_names[:1000]
    sc.pp.normalize_per_cell(adata, counts_per_cell_after=1e4)
    sc.pp.log1p(adata)
    some_genes = np.r_[
        np.unique(gene_names[np.random.randint(0, 1000, 10)]),
        np.unique(gene_names[np.random.randint(1000, 2000, 3)]),
    ]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: theislab/scanpy
Commit Name: ffb068553a2044f33ad9395d6e45f2f2a7375587
Time: 2019-10-18
Author: flying-sheep@web.de
File Name: scanpy/tests/test_score_genes.py
Class Name:
Method Name: test_add_score


Project Name: merenlab/anvio
Commit Name: 150aab42ea5a3e4dad2b7c85e0d9f12f6b542433
Time: 2020-05-26
Author: kiefl.evan@gmail.com
File Name: anvio/bamops.py
Class Name: Read
Method Name: __repr__


Project Name: etal/cnvkit
Commit Name: 969c31e8e32bedbaa65f82222cff07e068553bc3
Time: 2015-07-06
Author: eric.talevich@gmail.com
File Name: cnvlib/core.py
Class Name:
Method Name: sorter_chrom