-
Notifications
You must be signed in to change notification settings - Fork 1
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 #8 from UCL-ARC/km/add-new-script
Add dockerfiles and latest analysis script
- Loading branch information
Showing
8 changed files
with
383 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docker_log.txt | ||
code/ | ||
data/ |
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,29 @@ | ||
FROM cvriend/pgs:latest | ||
WORKDIR / | ||
|
||
# Need fslinstaller.py | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
wget \ | ||
bc \ | ||
dc \ | ||
tree \ | ||
parallel \ | ||
zip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py && python fslinstaller.py -d /usr/local/fsl/ -V 6.0.7.13 | ||
|
||
RUN echo '\n # FSL Setup \nFSLDIR=/usr/local/fsl \nPATH=${FSLDIR}/share/fsl/bin:${PATH} \nexport FSLDIR PATH \n. ${FSLDIR}/etc/fslconf/fsl.sh' >> /root/.bashrc | ||
|
||
COPY analysis_script.sh . | ||
|
||
RUN mkdir /data | ||
RUN mkdir /code | ||
|
||
RUN chmod +x analysis_script.sh | ||
|
||
CMD ["/analysis_script.sh"] | ||
|
||
ENTRYPOINT [] |
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 |
---|---|---|
@@ -1,3 +1,58 @@ | ||
# Enigma-PD-WML | ||
|
||
Segment White Mater Lesions (WML) in T1-weighted and FLAIR MR images using FSL and U-Net | ||
Segment White Mater Lesions (WML) in T1-weighted and FLAIR MRI images using FSL and U-Net | ||
|
||
## Build and run the docker container | ||
|
||
- Clone this repository | ||
|
||
```bash | ||
git clone https://github.com/UCL-ARC/Enigma-PD-WML.git | ||
``` | ||
|
||
- Build the docker image | ||
|
||
```bash | ||
cd Enigma-PD-WML | ||
docker build -f Dockerfile -t fsl_test . | ||
``` | ||
|
||
- Create `code` and `data` directories inside the `Enigma-PD-WML` directory | ||
|
||
- Create a `subjects.txt` file at `Enigma-PD-WML/data/subjects.txt`. | ||
This file should contain subject identifiers (one per line). | ||
|
||
- For each subject id: | ||
- Create a directory at `Enigma-PD-WML/data/subject-id` (replacing 'subject-id' with the relevant id from | ||
your `subjects.txt` file) | ||
|
||
- Create a sub-directory inside the 'subject-id' directory called `niftis`. | ||
|
||
- Inside `niftis` place the subject's T1 MRI scan and FLAIR MRI scan. Both these files should be in nifti format | ||
(ending `.nii.gz`) and contain either `T1` or `FLAIR` in their name respectively. | ||
|
||
- Your final file structure should look like below (for two example subject ids): | ||
|
||
```bash | ||
Enigma-PD-WML | ||
│ | ||
├───code | ||
│ | ||
└───data | ||
├───subject-1 | ||
│ └───niftis | ||
│ ├───T1.nii.gz | ||
│ └───FLAIR.nii.gz | ||
│ | ||
├───subject-2 | ||
│ └───niftis | ||
│ ├───T1.nii.gz | ||
│ └───FLAIR.nii.gz | ||
└───subjects.txt | ||
``` | ||
|
||
- Run the docker container. Make sure you are in the `Enigma-PD-WML` directory when you run this command. | ||
|
||
```bash | ||
./docker_runscript.sh | ||
``` |
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 @@ | ||
[default.extend-words] | ||
# Don't correct -thr option | ||
thr = "thr" |
Oops, something went wrong.