From e651da386013fcad8a2705a127f5bb3c85bf7038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= Date: Thu, 9 Jan 2025 09:48:09 +0100 Subject: [PATCH 1/3] adapt singlecell example to macos --- examples/simplecell/download_ephys_data.sh | 3 +++ examples/simplecell/simplecell.ipynb | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/simplecell/download_ephys_data.sh b/examples/simplecell/download_ephys_data.sh index 8c13a08f..d6cb00f2 100755 --- a/examples/simplecell/download_ephys_data.sh +++ b/examples/simplecell/download_ephys_data.sh @@ -62,7 +62,10 @@ FILES_TO_DOWNLOAD=( mkdir -p "$DEST_DIR" # Fetch the list of files from the GitHub API and filter for required files +# Execute the following line if you are working on linux: FILES=$(curl -s "$BASE_API" | grep -oP "\"path\": \"$FOLDER/.*?\.ibw\"" | grep -oP "(?<=\"$FOLDER/)[^\"]+") +# Execute the following line if you are working on macos: +# FILES=$(curl -s "$BASE_API" | grep -oE "\"path\": \"$FOLDER/.*?\.ibw") # Download each file if it matches the list to download for file in $FILES; do diff --git a/examples/simplecell/simplecell.ipynb b/examples/simplecell/simplecell.ipynb index 5debfb09..78b435fc 100644 --- a/examples/simplecell/simplecell.ipynb +++ b/examples/simplecell/simplecell.ipynb @@ -12,7 +12,9 @@ "\n", "However, here we will present the rheobase independent approach which means that we use specific amplitude values like `IDRest_1.0` (indicating a fixed current of 1.0 nA) instead of `IDRest_100` (which represents 100% of the rheobase).\n", "\n", - "For rheobase dependent optimisation or additional details, please refer to the [L5PC](./../L5PC/) example." + "For rheobase dependent optimisation or additional details, please refer to the [L5PC](./../L5PC/) example.\n", + "\n", + "Please note that in this example we will use only the two NEURON-inbuilt HH channels for simplicity. As such, the output model will not be able to accurately reproduce the experimental traces, but the optimisation will demonstrate its ability to produce at least a spiking model. " ] }, { @@ -171,7 +173,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We need to download the required data using the script `./download_ephys_data.sh`. This dataset features continuous adapting pyramidal cells (cADpyr) e-type models from the rat somatosensory cortex. The data can be obtained from this [repository]()." + "We need to download the required data using the script `./download_ephys_data.sh`. This dataset features continuous adapting pyramidal cells (cADpyr) e-type models from the rat somatosensory cortex. The data can be obtained from this [repository]().\n", + "\n", + "If you are working on macos, you will need to modify the download_ephys_data.sh file by commenting line 66 and uncommenting line 68,before executing the next jupyter notebook cell" ] }, { From 93844af7941978d16e8ffba040dc406f613d3cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= Date: Thu, 9 Jan 2025 09:49:30 +0100 Subject: [PATCH 2/3] fix typo --- examples/simplecell/simplecell.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/simplecell/simplecell.ipynb b/examples/simplecell/simplecell.ipynb index 78b435fc..7438ead4 100644 --- a/examples/simplecell/simplecell.ipynb +++ b/examples/simplecell/simplecell.ipynb @@ -175,7 +175,7 @@ "source": [ "We need to download the required data using the script `./download_ephys_data.sh`. This dataset features continuous adapting pyramidal cells (cADpyr) e-type models from the rat somatosensory cortex. The data can be obtained from this [repository]().\n", "\n", - "If you are working on macos, you will need to modify the download_ephys_data.sh file by commenting line 66 and uncommenting line 68,before executing the next jupyter notebook cell" + "If you are working on macos, you will need to modify the download_ephys_data.sh file by commenting line 66 and uncommenting line 68, before executing the next jupyter notebook cell" ] }, { From 884efaac04d66a2eb2febcd8984e585c2864bf85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= Date: Thu, 9 Jan 2025 15:52:25 +0100 Subject: [PATCH 3/3] make singlecell example trace download compatible with both linux and macos --- examples/simplecell/download_ephys_data.sh | 5 +---- examples/simplecell/simplecell.ipynb | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/examples/simplecell/download_ephys_data.sh b/examples/simplecell/download_ephys_data.sh index d6cb00f2..5a62f9c5 100755 --- a/examples/simplecell/download_ephys_data.sh +++ b/examples/simplecell/download_ephys_data.sh @@ -62,10 +62,7 @@ FILES_TO_DOWNLOAD=( mkdir -p "$DEST_DIR" # Fetch the list of files from the GitHub API and filter for required files -# Execute the following line if you are working on linux: -FILES=$(curl -s "$BASE_API" | grep -oP "\"path\": \"$FOLDER/.*?\.ibw\"" | grep -oP "(?<=\"$FOLDER/)[^\"]+") -# Execute the following line if you are working on macos: -# FILES=$(curl -s "$BASE_API" | grep -oE "\"path\": \"$FOLDER/.*?\.ibw") +FILES=$(curl -s "$BASE_API" | grep -oE "\"path\": \"$FOLDER/[^\"]*\.ibw") # Download each file if it matches the list to download for file in $FILES; do diff --git a/examples/simplecell/simplecell.ipynb b/examples/simplecell/simplecell.ipynb index 7438ead4..e01da54e 100644 --- a/examples/simplecell/simplecell.ipynb +++ b/examples/simplecell/simplecell.ipynb @@ -173,9 +173,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We need to download the required data using the script `./download_ephys_data.sh`. This dataset features continuous adapting pyramidal cells (cADpyr) e-type models from the rat somatosensory cortex. The data can be obtained from this [repository]().\n", - "\n", - "If you are working on macos, you will need to modify the download_ephys_data.sh file by commenting line 66 and uncommenting line 68, before executing the next jupyter notebook cell" + "We need to download the required data using the script `./download_ephys_data.sh`. This dataset features continuous adapting pyramidal cells (cADpyr) e-type models from the rat somatosensory cortex. The data can be obtained from this [repository]()." ] }, {