Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human brain plots won't work #14

Closed
jonrot1906 opened this issue May 13, 2023 · 2 comments · Fixed by #40
Closed

Human brain plots won't work #14

jonrot1906 opened this issue May 13, 2023 · 2 comments · Fixed by #40
Assignees
Labels
bug Something isn't working

Comments

@jonrot1906
Copy link

jonrot1906 commented May 13, 2023

Describe the bug
While creating plots for zebrafish and mice brains works perfectly for me, using bg-heatmaps with the "allen_human_500um" is an actual challenge. I only get a thin bar as results, but no plotted brain slice. Can you provide some info on how to use bg-heatmaps with the human bran atlas? Are there any differences?

To Reproduce



values = dict(  # scalar values for each region
    Mo=1,
    PrCG=0.2,
    OccL=0.4,
    FroL=-3,
    ITG=2.6,
    HiF=-4,
)

f = bgh.heatmap(
    values,
    position=10,
    orientation="horizontal",  # 'frontal' or 'sagittal', or 'horizontal' or a tuple (x,y,z)
    thickness=500,
    atlas_name="allen_human_500um",
    format="2D",
    title="human brain heatmap",
).show(xlabel="AP (μm)", ylabel="DV (μm)")

Screenshots

Bildschirmfoto 2023-05-13 um 15 54 48

@jonrot1906 jonrot1906 added the bug Something isn't working label May 13, 2023
@jonrot1906 jonrot1906 changed the title [BUG] Human brain plots won't work Human brain plots won't work May 13, 2023
@adamltyson
Copy link
Member

Hi @jonrot1906 sorry for the delay responding to this. I can reproduce, and we'll look into the problem.

@adamltyson adamltyson self-assigned this Dec 12, 2023
@adamltyson
Copy link
Member

Hi @jonrot1906, sorry this took so long for me to look into!

The problem seems to just be that the scale of the human atlas is so different to the other animal model atlases that the scale of the position needs to be much larger (it's in microns).

I've added an example script now in #40, but for ease, it's here:

import brainglobe_heatmap as bgh

values = dict(  # scalar values for each region
    SFG=1,
    PrCG=2,
    Ca=4,
    Pu=10,
)

scene = bgh.heatmap(
    values,
    position=(100000, 100000, 100000),
    thickness=1000,
    atlas_name="allen_human_500um",
    format="2D",
).show()

This produces:
human_brain

N.B. The newest version of this atlas in BrainGlobe contains both hemispheres, so if you want to only plot one hemisphere, you'll have to use the hemisphere parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants