Skip to content

Qustion about the hemisphere filter method in drop_mismatch_samples function (samples_.py L223) #218

@YCHuang0610

Description

@YCHuang0610

https://github.com/rmarkello/abagen/blob/6f5542522247b9a7fb00ded198c34f4dc25957f3/abagen/samples_.py#L220C1-L224C46

Line 220-224 in samples_.py

annot = annotation.assign(hemisphere=hemisphere, structure=structure) \
                  .query('(hemisphere == "L" & mni_x < 0) '
                         '| (hemisphere == "R" & mni_x > 0) '
                         '| (hemisphere == "B" & mni_x == 0)',
                         engine='python')

Some of the samples in AHBA were not annotated hemisphere, such as 4700, Ve-I-II; 4701, Ve-III in donor 9861.
In samples_.py#L223, the samples that are not annotated hemispheres and have a non-zero mni_x will be removed. This probably causes that all the samples without annotated hemispheres will be filtered out at this step, because no sample has a mni_x of 0.
I am wondering is this resonable?

image

image

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