diff --git a/starfish/test/full_pipelines/api/test_dartfish.py b/starfish/test/full_pipelines/api/test_dartfish.py index aa4cf0a0..6234d0fc 100644 --- a/starfish/test/full_pipelines/api/test_dartfish.py +++ b/starfish/test/full_pipelines/api/test_dartfish.py @@ -179,7 +179,8 @@ def test_dartfish_pipeline_cropped_data(tmpdir): cnts_starfish.rename(columns={'target': 'gene', 'area': 'cnt_starfish'}, inplace=True) # get top 5 genes and verify they are correct - high_expression_genes = cnts_starfish.sort_values('cnt_starfish', ascending=False).head(5) + high_expression_genes = cnts_starfish.sort_values('cnt_starfish', ascending=False, + kind='stable').head(5) assert np.array_equal( high_expression_genes['cnt_starfish'].values, @@ -187,7 +188,7 @@ def test_dartfish_pipeline_cropped_data(tmpdir): ) assert np.array_equal( high_expression_genes['gene'].values, - ['MBP', 'MOBP', 'ADCY8', 'TRIM66', 'SYT6'] + ['MBP', 'MOBP', 'ADCY8', 'SYT6', 'TRIM66'] ) # verify correlation is accurate for this subset of the image diff --git a/starfish/test/full_pipelines/api/test_merfish.py b/starfish/test/full_pipelines/api/test_merfish.py index f6d2362e..df344a6c 100644 --- a/starfish/test/full_pipelines/api/test_merfish.py +++ b/starfish/test/full_pipelines/api/test_merfish.py @@ -236,12 +236,12 @@ def test_merfish_pipeline_cropped_data(): spot_intensities[Features.PASSES_THRESHOLDS], drop=True ) genes, counts = np.unique(spot_intensities_passing_filters[Features.TARGET], return_counts=True) - result_counts = pd.Series(counts, index=genes).sort_values(ascending=False)[:5] + result_counts = pd.Series(counts, index=genes).sort_values(ascending=False, kind='stable')[:5] # assert that number of high-expression detected genes are correct expected_counts = pd.Series( [107, 59, 46, 32, 32], - index=('MALAT1', 'SRRM2', 'FASN', 'IGF2R', 'TLN1') + index=('MALAT1', 'SRRM2', 'FASN', 'TLN1', 'IGF2R') ) assert np.array_equal( expected_counts.values,