Skip to content

Commit

Permalink
add MANC dataset:
Browse files Browse the repository at this point in the history
- template (incl. mesh) for MANC and MANCraw
- JRC2018M <-> MANC transform download
  • Loading branch information
schlegelp committed Aug 8, 2023
1 parent f24fed8 commit db1d04a
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 6 deletions.
38 changes: 37 additions & 1 deletion flybrains/data/template_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@
"nanometers"
],
"_navis_units": "1 nanometer",
"description": "The Female Adult Nerve Cord electron microscopy dataset (nicknamed FANC, pronounced “fancy”) was generated by Jasper Phelps with help from other members of Wei-Chung Lee’s lab. See Phelps et al., Cell (2021) for details.",
"description": "The Female Adult Nerve Cord electron microscopy dataset (nicknamed FANC, pronounced “fancy”) was generated by Jasper Phelps with help from other members of the Wei-Chung Lee lab. See Phelps et al., Cell (2021) for details.",
"doi": "10.1016/j.cell.2020.12.013",
"boundingbox": [
0,
Expand Down Expand Up @@ -1053,5 +1053,41 @@
6050,
248100
]
},
{
"name": "Male Adult Nerve Cord",
"type": null,
"sex": "male",
"voxdims": [
8,
8,
8
],
"origin": [
0.0,
0.0,
0.0
],
"boundingbox": [
6148,
42844,
5123,
50859,
2026,
64819
],
"units": [
"voxels",
"voxels",
"voxels"
],
"description": "Janelia Male Adult Nerve Cord (MANC) EM dataset.",
"label": "MANC",
"dims": [
36696,
45736,
62793
],
"doi": "10.1101/2023.06.05.543757"
}
]
5 changes: 4 additions & 1 deletion flybrains/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def download_jrc_vnc_transforms(data_home=None, skip_existing=True):
Includes:
- JRCVNC2018U <-> JRCVNC2018F (110Mb)
- JRCVNC2018U <-> JRCVNC2018M (150Mb)
- JRCVNC2018M <-> MANC (1Gb)
Parameters
----------
Expand All @@ -319,13 +320,15 @@ def download_jrc_vnc_transforms(data_home=None, skip_existing=True):
data_home = get_data_home(data_home, create=True)
urls = (
"28909212?private_link=c4589cef9180e1dd4ee1",
"28908795?private_link=42ad71eb14e7dd51e81a")
"28908795?private_link=42ad71eb14e7dd51e81a",
"38827794")
urls = [f"https://ndownloader.figshare.com/files/{f}" for f in urls]

# Note that we are renaming the files upon download!
filenames = (
'JRCVNC2018U_JRCVNC2018F.h5', # originally: JRC2018VncU_JRC2018VncF.h5
'JRCVNC2018M_JRCVNC2018U.h5', # originally: JRC2018VncM_JRC2018VncU.h5
'JRCVNC2018M_MANC.h5', # originally: JRC2018VncM_MANC.h5
)

print(f'Downloading JRC (Saalfeld lab) VNC transforms into {data_home}')
Expand Down
Binary file added flybrains/meshes/MANCraw.ply
Binary file not shown.
74 changes: 70 additions & 4 deletions flybrains/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
'VNCIS1',
'FAFB14', 'FAFB',
'FLYWIRE',
'FANC', 'DmelL1CNS_Seymour',
'FANC',
"MANC", "MANCraw",
'DmelL1CNS_Seymour',
'COURT2017VNS', 'COURT2018VNS',
'register_templates']

Expand Down Expand Up @@ -1005,11 +1007,13 @@ class _FANC(FlyTemplateBrain):
"""Female Adult Nerve Cord
Using a serial-section electron microscopy (EM) to acquire a synapse-resolution
dataset containing the ventral nerve cord (VNC) of an adult female Drosophila melanogaster.
dataset containing the ventral nerve cord (VNC) of an adult female Drosophila
melanogaster.
References
----------
Reconstruction of motor control circuits in adult Drosophila using automated transmission electron microscopy
Reconstruction of motor control circuits in adult Drosophila using automated
transmission electron microscopy
Jasper S Phelps, David Grant Colburn Hildebrand, Brett J Graham, Aaron T Kuan,
Logan A Thomas, Tri M Nguyen, Julia Buhmann, Anthony W Azevedo, Anne Sustar,
Sweta Agrawal, Mingguan Liu, Brendan L Shanny, Jan Funke, John C Tuthill,
Expand All @@ -1021,6 +1025,66 @@ class _FANC(FlyTemplateBrain):
FANC = _FANC(**template_meta['FANC'])


class _MANC(FlyTemplateBrain):
"""Male Adult Nerve Cord.
A FIBSEM volume containing a ventral nerve cord of an adult male
Drosophila melanogaster.
References
----------
A Connectome of the Male Drosophila Ventral Nerve Cord
Shin-ya Takemura, Kenneth J Hayworth, Gary B Huang, Michal Januszewski,
Zhiyuan Lu, Elizabeth C Marin, Stephan Preibisch, C Shan Xu, John Bogovic,
Andrew S Champion, Han SJ Cheong, Marta Costa, Katharina Eichler,
William Katz, Christopher Knecht, Feng Li, Billy J Morris, Christopher Ordish,
Patricia K Rivlin, Philipp Schlegel, Kazunori Shinomiya, Tomke Stürner,
Ting Zhao, Griffin Badalamente, Dennis Bailey, Paul Brooks, Brandon S Canino,
Jody Clements, Michael Cook, Octave Duclos, Christopher R Dunne, Kelli Fairbanks,
Siqi Fang, Samantha Finley-May, Audrey Francis, Reed George, Marina Gkantia,
Kyle Harrington, Gary Patrick Hopkins, Joseph Hsu, Philip M Hubbard,
Alexandre Javier, Dagmar Kainmueller, Wyatt Korff, Julie Kovalyak,
Dominik Krzemiński, Shirley A Lauchie, Alanna Lohff, Charli Maldonado,
Emily A Manley, Caroline Mooney, Erika Neace, Matthew Nichols, Omotara Ogundeyi,
Nneoma Okeoma, Tyler Paterson, Elliott Phillips, Emily M Phillips,
Caitlin Ribeiro, Sean M Ryan, Jon Thomson Rymer, Anne K Scott, Ashley L Scott,
David Shepherd, Aya Shinomiya, Claire Smith, Natalie Smith, Alia Suleiman,
Satoko Takemura, Iris Talebi, Imaan FM Tamimi, Eric T Trautman, Lowell Umayam,
John J Walsh, Tansy Yang, Gerald M Rubin, Louis K Scheffer, Jan Funke,
Stephan Saalfeld, Harald F Hess, Stephen M Plaza, Gwyneth M Card,
Gregory SXE Jefferis, Stuart Berg
bioRxiv 2023.06.05.543757; doi: https://doi.org/10.1101/2023.06.05.543757
"""
@property
def mesh(self):
"""On-demand loading of surface mesh."""
if not hasattr(self, '_mesh'):
# Load the raw mesh (voxels)
fp = os.path.join(mesh_filepath, f'{self.label}raw.ply')
self._mesh = tm.load_mesh(fp)
# Convert voxels to nanometers
if self.units[0] == 'nm':
self._mesh.vertices *= 8
return self._mesh


# MANC in nanometers
MANC = _MANC(**template_meta['MANC'])
MANC.boundingbox = [b * 8 for b in MANC.boundingbox]
MANC.dims = [b * 8 for b in MANC.dims]
MANC.units = ['nm', 'nm', 'nm']


class _MANCraw(FlyTemplateBrain):
"""Male Adult Nerve Cord."""


# MANC in raw voxels (original)
MANCraw = _MANCraw(**template_meta['MANC'])
MANCraw.label = 'MANCraw'


class _DmelL1CNS_Seymour(FlyTemplateBrain):
"""L1 CNS ssTEM at 3.8x3.8x50 nm of whole Drosophila 1st instar larval CNS.
Expand All @@ -1046,7 +1110,9 @@ def register_templates():
FAFB14, FAFB, FLYWIRE,
JRCFIB2022M,JRCFIB2022Mraw,
JRCFIB2018F, JRCFIB2018Fraw,
FANC, DmelL1CNS_Seymour, COURT2017VNS, COURT2018VNS]
FANC, MANC, MANCraw,
DmelL1CNS_Seymour,
COURT2017VNS, COURT2018VNS]

for tmp in templates:
transforms.registry.register_templatebrain(tmp, skip_existing=True)

0 comments on commit db1d04a

Please sign in to comment.