-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #797 from NeuroDesk/brainnetviewer
- Loading branch information
Showing
4 changed files
with
89 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
---------------------------------- | ||
## brainnetviewer/toolVersion## | ||
|
||
BrainNet Viewer is a brain network visualization tool, which can help researchers to visualize structural and functional connectivity patterns from different levels in a quick, easy, and flexible way. | ||
|
||
**Citation:** Xia M, Wang J, He Y. BrainNet Viewer: a network visualization tool for human brain connectomics. PLoS One. 2013 Jul 4;8(7):e68910. doi: 10.1371/journal.pone.0068910. PMID: 23861951; PMCID: PMC3701683. | ||
|
||
**Homepage:** https://www.nitrc.org/projects/bnv/ | ||
|
||
**Example:** `brainnetviewer` | ||
|
||
**License:** GNU General Public License Version 3 (GPL-3.0) | ||
|
||
---------------------------------- |
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,36 @@ | ||
bnv_binaries = "https://www.nitrc.org/frs/download.php/11585/BrainNetViewer20191031_sd_Linux_x64_compiled2018a.zip" | ||
mcr_installer = "https://ssd.mathworks.com/supportfiles/downloads/R2018a/deployment_files/R2018a/installers/glnxa64/MCR_R2018a_glnxa64_installer.zip" | ||
|
||
mcr_installed = define.build_vm( | ||
directives = [ | ||
define.plan( | ||
builder = "ubuntu@jammy", | ||
packages = [ | ||
query("openjdk-17-jdk"), | ||
query("bash"), | ||
], | ||
tags = ["level3", "defaults"], | ||
), | ||
directive.archive(define.read_archive(define.fetch_http(mcr_installer), ".zip"), target = "/mcr"), | ||
directive.run_command("/mcr/install -destinationFolder /opt/matlab -mode silent -agreeToLicense yes"), | ||
directive.run_command("tar caf /matlab.tar.gz /opt/matlab"), | ||
], | ||
storage_size = 16 * 1024, | ||
output = "/matlab.tar.gz", | ||
) | ||
|
||
mcr_installed_archive = define.read_archive(mcr_installed, ".tar.gz") | ||
|
||
bnv_root = define.build_fs([ | ||
define.plan( | ||
builder = "ubuntu@jammy", | ||
packages = [ | ||
query("openjdk-17-jdk"), | ||
query("bash"), | ||
], | ||
tags = ["level3", "defaults", "noScripts"], | ||
), | ||
mcr_installed_archive, | ||
directive.builtin("init", "/init"), | ||
define.read_archive(define.fetch_http(bnv_binaries), ".zip"), | ||
], "tar") |
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,3 @@ | ||
#!/bin/bash | ||
|
||
exec /run_BrainNet.sh /opt/matlab/v94 $@ |
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,35 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
export toolName='brainnetviewer' | ||
export toolVersion='1.7.20191031' | ||
|
||
if [ "$1" != "" ]; then | ||
echo "Entering Debug mode" | ||
export debug=$1 | ||
fi | ||
|
||
source ../main_setup.sh | ||
|
||
# Use Singlrity/Apptainer to run TinyRange to generate the rootfs. | ||
singularity run docker://ghcr.io/tinyrange/tinyrange:stable build bnv.star:bnv_root -o bnv.tar | ||
|
||
# Make sure the automaticcly included template doesn't add to the final layer. | ||
neurodocker generate ${neurodocker_buildMode} \ | ||
--base-image ubuntu \ | ||
--pkg-manager apt \ | ||
--base-image scratch \ | ||
--add bnv.tar . \ | ||
--run "/init -run-scripts /.pkg/scripts.json" \ | ||
--run="printf '#!/bin/bash\nls -la' > /usr/bin/ll" \ | ||
--run="chmod +x /usr/bin/ll" \ | ||
--run="mkdir -p ${mountPointList}" \ | ||
--copy brainnetviewer /usr/bin/brainnetviewer \ | ||
--entrypoint "/usr/bin/brainnetviewer" \ | ||
--env DEPLOY_BINS=brainnetviewer \ | ||
--copy README.md /README.md \ | ||
> ${imageName}.${neurodocker_buildExt} | ||
|
||
if [ "$1" != "" ]; then | ||
./../main_build.sh | ||
fi |