Skip to content

BUG Report: Something wrong with the sample assignment when using Brainnetome atlas(abagen.get_samples_in_mask) #212

@molicaca

Description

@molicaca

Hi, recently I was trying to use abagen to analyze the AHBA data with Brainnetome atlas but found the returned variable expression, coords of abagen.get_samples_in_mask dropped the true samples lying on the atlas.

  1. The sample( well_id=99) lies on the labelled region(id=27) is dropped:
    sample's corrected coords(mni_x, mni_y, mni_z)=(-32.37, 57.75, -6.91)->label 27
    This sample doesn't appear in the returned variable expression, coords. This is one example of the wrongly dropped samples.
  2. Some returned coords doesn't lie on the parcellated area.
    The sample(well_id=962) was kept after running get_samples_in_mask with tolerance=0.
    sample's corrected coords(mni_x, mni_y, mni_z)=(10.92, -8.22, 48.82) which lie outside of the atlas.
    This is one example of the wrongly kept samples.

The code I used is listed as below:
`import abagen
from nilearn.image import binarize_img

mask = 'my_path_to_file/BN_Atlas_246_1mm.nii.gz'

mask = binarize_img(mask)
expression, coords = abagen.get_samples_in_mask(mask, data_dir = 'my_data_abagen_path/', tolerance=0, verbose = 10, n_proc= 6)`

The atlas file used here:
BN_Atlas_246_1mm.nii.gz
I also did this with only cortex area:
mask.nii.gz but founds the wrong assignment always exist.
Code expression = abagen.get_expression_data(atlas['image'], atlas['info'], data_dir = 'path_to_file/data_abagen/', region_agg = None, verbose = 10, n_proc= 6) also exhibits this problem.
I guess there would be something wrong with the sample assignment. Hope to hear the community's reply ASAP to make sure whether this is a bug or I misunderstood something in my coding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions