def surface(): return fetch_desikan_killiany(native=False, surface=True)
import pandas as pd from nilearn._utils import check_niimg from nilearn.image import new_img_like from abagen import allen from abagen.datasets import fetch_desikan_killiany ATLAS = fetch_desikan_killiany() def test_label_samples(testfiles): out = allen.label_samples(testfiles.annotation[0], ATLAS.image) assert isinstance(out, pd.DataFrame) assert out.index.name == 'sample_id' assert out.columns == ['label'] def test_vanilla_get_expression_data(testdir, testfiles): out = allen.get_expression_data(ATLAS.image, data_dir=testdir, donors=['12876', '15496']) assert isinstance(out, pd.DataFrame) assert out.index.name == 'label' assert out.columns.name == 'gene_symbol' def test_extra_get_expression_data(testdir, testfiles): for opts in [{'atlas_info': ATLAS.info}, {'exact': False}, {'reannotated': False}, {'atlas_info': ATLAS.info, 'exact': False}]: out = allen.get_expression_data(ATLAS.image, data_dir=testdir, donors=['12876', '15496'], **opts)
def atlas(): return fetch_desikan_killiany(native=False, surface=False)
def atlas(): return fetch_desikan_killiany()