-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new test for sAHP extraction (#163)
- Loading branch information
1 parent
d4edc58
commit f46caab
Showing
5 changed files
with
156 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ test_run | |
MouseCells/ | ||
.ipynb_checkpoints/ | ||
coverage.xml | ||
MouseCells_sAHP/ | ||
tests/exp_data/X/ |
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Utils""" | ||
|
||
import urllib.request | ||
import shutil | ||
from pathlib import Path | ||
|
||
|
||
def download_sahp_datafiles(): | ||
"""Download data files for sAHP and IDthresh traces""" | ||
output_dir = "./tests/exp_data/X/" | ||
gb_url = "https://raw.githubusercontent.com/BlueBrain/SSCxEModelExamples/main/feature_extraction/input-traces/C060109A1-SR-C1/" | ||
sahp_pathname = "X_sAHP" | ||
sahp_ch = ["ch0", "ch1"] | ||
sahp_numbers = list(range(320, 326)) | ||
idthresh_pathname = "X_IDthresh" | ||
idthresh_ch = ["ch0", "ch1"] | ||
idthresh_numbers = list(range(349, 358)) + list(range(362, 371)) | ||
|
||
sahp_paths = [f"{sahp_pathname}_{ch}_{n}.ibw" for ch in sahp_ch for n in sahp_numbers] | ||
idthresh_paths = [f"{idthresh_pathname}_{ch}_{n}.ibw" for ch in idthresh_ch for n in idthresh_numbers] | ||
pathnames = sahp_paths + idthresh_paths | ||
|
||
Path(output_dir).mkdir(exist_ok=True, parents=True) | ||
for pathname in pathnames: | ||
output_path = f"{output_dir}{pathname}" | ||
if not Path(output_path).is_file(): | ||
with urllib.request.urlopen(f"{gb_url}{pathname}") as response, open(output_path, "wb") as out_file: | ||
shutil.copyfileobj(response, out_file) |