-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add script to download test data
- Loading branch information
Showing
4 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,3 +132,7 @@ ENV/ | |
MANIFEST | ||
|
||
tmp/ | ||
|
||
# Test data | ||
mmc2 | ||
WannerAA* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
# %% | ||
import navis | ||
skeletons = navis.read_swc( | ||
'~/Downloads/mmc2/skeletons_swc.zip', | ||
'./mmc2/skeletons_swc.zip', | ||
include_subdirs=True | ||
) | ||
skeletons | ||
|
@@ -47,7 +47,7 @@ | |
# %% | ||
# Load only the first 10 skeletons | ||
sample = navis.read_swc( | ||
'~/Downloads/mmc2/skeletons_swc.zip', | ||
'./mmc2/skeletons_swc.zip', | ||
include_subdirs=True, | ||
limit=10 | ||
) | ||
|
@@ -58,7 +58,7 @@ | |
|
||
# %% | ||
# For this I extraced the skeletons_swc.zip archive | ||
s = navis.read_swc('~/Downloads/mmc2/swc/CENT/11519759.swc') | ||
s = navis.read_swc('./mmc2/swc/CENT/11519759.swc') | ||
s | ||
|
||
# %% | ||
|
@@ -75,22 +75,22 @@ | |
# %% | ||
|
||
# Write a single neuron: | ||
navis.write_swc(s, '~/Downloads/mmc2/my_neuron.swc') | ||
navis.write_swc(s, './mmc2/my_neuron.swc') | ||
|
||
# %% | ||
|
||
# Write a whole list of skeletons to a folder and use the neurons' `name` property as filename: | ||
navis.write_swc(sample, '~/Downloads/mmc2/{neuron.name}.swc') | ||
navis.write_swc(sample, './mmc2/{neuron.name}.swc') | ||
|
||
# %% | ||
|
||
# Write directly to a zip file: | ||
navis.write_swc(sample, '~/Downloads/mmc2/skeletons.zip') | ||
navis.write_swc(sample, './mmc2/skeletons.zip') | ||
|
||
# %% | ||
|
||
# Write directly to a zip file and use the neuron name as filename: | ||
navis.write_swc(sample, '~/Downloads/mmc2/{neuron.name}[email protected]') | ||
navis.write_swc(sample, './mmc2/{neuron.name}[email protected]') | ||
|
||
# %% | ||
# See [`navis.write_swc`][] for further details! | ||
|
@@ -104,12 +104,12 @@ | |
|
||
# %% | ||
# Read a single file | ||
s = navis.read_nmx('~/Downloads/WannerAA201605_SkeletonsGlomeruli/Neuron_id0001.nmx') | ||
s = navis.read_nmx('./WannerAA201605_SkeletonsGlomeruli/Neuron_id0001.nmx') | ||
s | ||
|
||
# %% | ||
# Read all files in folder | ||
nl = navis.read_nmx('~/Downloads/WannerAA201605_SkeletonsGlomeruli/') | ||
nl = navis.read_nmx('./WannerAA201605_SkeletonsGlomeruli/') | ||
nl | ||
|
||
# %% | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# This script downloads the test data used in tutorials and examples | ||
mkdir -p -- "docs/examples/0_io/mmc2" | ||
curl -o docs/examples/0_io/mmc2/skeletons_swc.zip https://flyem.mrc-lmb.cam.ac.uk/flyconnectome/misc/skeletons_swc.zip | ||
|
||
mkdir -p -- "docs/examples/0_io/mmc2/swc/CENT" | ||
curl -o docs/examples/0_io/mmc2/swc/CENT/11519759.swc https://flyem.mrc-lmb.cam.ac.uk/flyconnectome/misc/11519759.swc | ||
|
||
curl -o docs/examples/0_io/WannerAA201605_SkeletonsGlomeruli.zip https://flyem.mrc-lmb.cam.ac.uk/flyconnectome/misc/WannerAA201605_SkeletonsGlomeruli.zip | ||
cd docs/examples/0_io | ||
unzip WannerAA201605_SkeletonsGlomeruli.zip |