bafaa5003229ac5232cc9a19da05ddb16c18d374,scanpy/tests/test_score_genes.py,,test_add_score,#,6
Before Change
// 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(map(chr, np.random.randint(65, 90, 6))) for _ in range(2000) ]
)
adata.var_names = gene_names[:1000]
sc.pp.normalize_per_cell(adata, counts_per_cell_after=1e4)
After Change
// create some non-estinsting names with 7 letters:
non_existing_genes = _create_random_gene_names(n_genes=3, name_length=7)
some_genes = np.r_[
np.unique(np.random.choice(adata.var_names, 10) ), np.unique(non_existing_genes)
]
sc.tl.score_genes(adata, some_genes, score_name="Test")
assert adata.obs["Test"].dtype == "float32"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: theislab/scanpy
Commit Name: bafaa5003229ac5232cc9a19da05ddb16c18d374
Time: 2020-05-13
Author: mstrasse@systemsbiology.org
File Name: scanpy/tests/test_score_genes.py
Class Name:
Method Name: test_add_score
Project Name: mne-tools/mne-python
Commit Name: 676ed97f4500511b1dca88ecb1f1ee25dc705d19
Time: 2020-04-30
Author: larson.eric.d@gmail.com
File Name: mne/forward/tests/test_make_forward.py
Class Name:
Method Name: test_forward_mixed_source_space
Project Name: mne-tools/mne-python
Commit Name: 676ed97f4500511b1dca88ecb1f1ee25dc705d19
Time: 2020-04-30
Author: larson.eric.d@gmail.com
File Name: mne/tests/test_source_space.py
Class Name:
Method Name: test_combine_source_spaces