navis-org / navis-flybrains Goto Github PK
View Code? Open in Web Editor NEWTransforms for navis that enable mapping between different Drosophila template brains.
License: GNU General Public License v3.0
Transforms for navis that enable mapping between different Drosophila template brains.
License: GNU General Public License v3.0
PTAL at error message below:
> flybrains.download_saalfeldlab_transforms()
Downloading Saalfeld lab transforms into /Users/dominik/flybrain-data
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-6-205a66d97e28> in <module>
----> 1 flybrains.download_saalfeldlab_transforms()
~/anaconda3/envs/pyg/lib/python3.8/site-packages/flybrains/download.py in download_saalfeldlab_transforms(data_home, skip_existing)
233 if skip_existing and os.path.exists(dst):
234 continue
--> 235 _ = download_from_url(url, dst)
236
237
~/anaconda3/envs/pyg/lib/python3.8/site-packages/flybrains/download.py in download_from_url(url, dst, resume)
255
256 """
--> 257 file_size = int(requests.head(url, allow_redirects=True).headers["Content-Length"])
258 if os.path.exists(dst) and resume:
259 first_byte = os.path.getsize(dst)
~/anaconda3/envs/pyg/lib/python3.8/site-packages/requests/structures.py in __getitem__(self, key)
52
53 def __getitem__(self, key):
---> 54 return self._store[key.lower()][1]
55
56 def __delitem__(self, key):
KeyError: 'content-length'
FLYBRAINS_DATA
environment variable and warn if not.FLYBRAINS_DATA='path1;path2'
flybrains.report()
to just iterate over available folders.Unify all downloads into a single function and let users determine which ones they want.
In theory, we could even subclass a OnDemandTransform
to manage on-demand downloads of transforms.
Pick a grid of points in FAFB and mirror via JRC2018F to generate a cheap thin plate spine transform for FAFB.
Would it be possible to prevent creating this folder by default, even without an environmental variable set?
Hi,
I am using python 3.7 on Windows 10 and when I import flybrains in ipython, I get the following error:
""""
----> 1 import flybrains
~\Anaconda3\envs\fanc_analysis\lib\site-packages\flybrains_init_.py in
15
16 # Import the template brains
---> 17 from .templates import *
18
19 # Import download functions
~\Anaconda3\envs\fanc_analysis\lib\site-packages\flybrains\templates.py in
42
43 with open(meta_filepath, 'r') as f:
---> 44 template_meta = json.load(f)
45
46 # Index by short label
~\Anaconda3\envs\fanc_analysis\lib\json_init_.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
291 kwarg; otherwise JSONDecoder
is used.
292 """
--> 293 return loads(fp.read(),
294 cls=cls, object_hook=object_hook,
295 parse_float=parse_float, parse_int=parse_int,
~\Anaconda3\envs\fanc_analysis\lib\encodings\cp1252.py in decode(self, input, final)
21 class IncrementalDecoder(codecs.IncrementalDecoder):
22 def decode(self, input, final=False):
---> 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0]
24
25 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 19631: character maps to
""""
After researching the problem, I discovered that Windows' default encoder is the systems' encoder, unlike MacOS and Linux where the default is utf-8.
I think changing "open(meta_filepath, 'r')" to "open(meta_filepath, 'r', encoding='utf-8')" in templates.py would resolve this issue.
Thank you,
Best,
Brandon Pratt
The "Registration transforms from MANC (EM) to JRC 2018 VNC template (LM)" have been published https://www.janelia.org/open-science/jrc-2018-brain-templates
Would it be possible to also include them in navis-flybrains?
Hi,
When I tried to use the code (flybrains.download_saalfeldlab_transforms()), I have the error below:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-25-205a66d97e28> in <module>
----> 1 flybrains.download_saalfeldlab_transforms()
~\Anaconda3\lib\site-packages\flybrains\download.py in download_saalfeldlab_transforms(data_home, skip_existing)
233 if skip_existing and os.path.exists(dst):
234 continue
--> 235 _ = download_from_url(url, dst)
236
237
~\Anaconda3\lib\site-packages\flybrains\download.py in download_from_url(url, dst, resume)
255
256 """
--> 257 file_size = int(requests.head(url, allow_redirects=True).headers["Content-Length"])
258 if os.path.exists(dst) and resume:
259 first_byte = os.path.getsize(dst)
~\Anaconda3\lib\site-packages\requests\structures.py in __getitem__(self, key)
52
53 def __getitem__(self, key):
---> 54 return self._store[key.lower()][1]
55
56 def __delitem__(self, key):
KeyError: 'content-length'
--------------------------------
May I how I can solve the issue?
Thanks a lot!
Best,
Yifan
Hi,
When I try to download a mesh or a skeleton to transform to FAFB like below:
neuron_mesh = neu.fetch_mesh_neuron(1324365879, lod=2, with_synapses=False)
flywireneuron_mesh=navis.xform_brain(neuron_mesh,source='JRCFIB2018Fraw', target='FAFB',verbose=True)
The actual hemibrain mesh looks like below:
However, the transformed stuff looks like squished like below:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.