-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[easy] - fixing all expression matrix saves (#1413)
* fixing all expression matrix saves * Delete barista_decode.py * fixing lint error * adding anndata and loompy to travis install * proper editing of reqs file * Update test_serialization.py * removing anndata and loom tests
- Loading branch information
Shannon Axelrod
authored
Jun 19, 2019
1 parent
9f0ae37
commit 89dc61e
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import random | ||
|
||
from starfish import IntensityTable | ||
from starfish.core.codebook.test.factories import codebook_array_factory | ||
from starfish.core.types import Features | ||
|
||
NUMBER_SPOTS = 10 | ||
|
||
|
||
def test_save_expression_matrix(): | ||
|
||
codebook = codebook_array_factory() | ||
|
||
intensities = IntensityTable.synthetic_intensities( | ||
codebook, | ||
num_z=3, | ||
height=100, | ||
width=100, | ||
n_spots=10 | ||
) | ||
# mock out come cell_ids | ||
cell_ids = random.sample(range(1, 20), NUMBER_SPOTS) | ||
intensities[Features.CELL_ID] = (Features.AXIS, cell_ids) | ||
|
||
expression_matrix = intensities.to_expression_matrix() | ||
|
||
# test all saving methods | ||
expression_matrix.save("expression") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters