Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fdt
Commits
398959c0
Commit
398959c0
authored
18 years ago
by
David Flitney
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
6a7406c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bedpostx
+17
-17
17 additions, 17 deletions
bedpostx
bedpostx_postproc.sh
+38
-1
38 additions, 1 deletion
bedpostx_postproc.sh
bedpostx_preproc.sh
+4
-4
4 additions, 4 deletions
bedpostx_preproc.sh
bedpostx_single_slice.sh
+2
-2
2 additions, 2 deletions
bedpostx_single_slice.sh
with
61 additions
and
24 deletions
bedpostx
+
17
−
17
View file @
398959c0
...
...
@@ -73,45 +73,45 @@ if [ `${FSLDIR}/bin/imtest ${subjdir}/nodif_brain_mask` -eq 0 ]; then
echo
"
${
subjdir
}
/nodif_brain_mask not found"
fi
echo
Making bedpost directory structure
echo
Making bedpost
X
directory structure
mkdir
-p
${
subjdir
}
.bedpost/
mkdir
-p
${
subjdir
}
.bedpost/diff_slices
mkdir
-p
${
subjdir
}
.bedpost/logs
mkdir
-p
${
subjdir
}
.bedpost/logs/pid_
${
$}
mkdir -p
${
subjdir
}
.bedpost/xfms
mkdir
-p
${
subjdir
}
.bedpost
X
/
mkdir
-p
${
subjdir
}
.bedpost
X
/diff_slices
mkdir
-p
${
subjdir
}
.bedpost
X
/logs
mkdir
-p
${
subjdir
}
.bedpost
X
/logs/pid_
${
$}
mkdir -p
${
subjdir
}
.bedpost
X
/xfms
mailto=
`
whoami
`
@fmrib.ox.ac.uk
echo Queuing preprocessing stages
preprocid=
`
qsub
-M
$mailto
-V
-q
short.q
\
-o
${
subjdir
}
.bedpost/logs
-e
${
subjdir
}
.bedpost/logs
\
-o
${
subjdir
}
.bedpost
X
/logs
-e
${
subjdir
}
.bedpost
X
/logs
\
${
FSLDIR
}
/bin/sge_bedpostX_preproc.sh
${
subjdir
}
|
\
awk
'{print $3}'
`
echo Queuing parallel processing stage
nslices=
`
avwval
${
subjdir
}
/data dim3
`
bedpostid=
`
qsub
-M
$mailto
-hold_jid
$preprocid
-V
-q
long.q
-t
1-
$nslices
\
-o
${
subjdir
}
.bedpost/logs
-e
${
subjdir
}
.bedpost/logs
\
-o
${
subjdir
}
.bedpost
X
/logs
-e
${
subjdir
}
.bedpost
X
/logs
\
${
FSLDIR
}
/bin/sge_bedpostX_single_slice.sh
$subjdir
|
\
awk
'{print $3}'
|
awk
-F
.
'{print $1}'
`
echo Queuing post processing stage
mergeid=
`
qsub
-M
$mailto
-hold_jid
$bedpostid
-V
-q
short.q
\
-o
${
subjdir
}
.bedpost/logs
-e
${
subjdir
}
.bedpost/logs
\
-o
${
subjdir
}
.bedpost
X
/logs
-e
${
subjdir
}
.bedpost
X
/logs
\
${
FSLDIR
}
/bin/sge_bedpostX_postproc.sh
$subjdir
|
\
awk
'{print $3}'
`
echo
echo Type
${
subjdir
}
.bedpost/monitor to show progress.
cat <<EOM >
${
subjdir
}
.bedpost/monitor
echo Type
${
subjdir
}
.bedpost
X
/monitor to show progress.
cat <<EOM >
${
subjdir
}
.bedpost
X
/monitor
#!/bin/sh
finished=0
logdir=
${
subjdir
}
.bedpost/logs
logdir=
${
subjdir
}
.bedpost
X
/logs
while [ \
$finished
-eq 0 ] ; do
nfin=0
if [ -f \
$logdir
/bedpost.o
$bedpostid
.1 ] ; then
nfin=\
`
cat
\$
logdir/bedpost.o
$bedpostid
.
*
|
\
nfin=\
`
cat
\$
logdir/bedpost
X
.o
$bedpostid
.
*
|
\
grep
Done |
wc
-w
|
awk
'{print \$1}'
\`
fi
if
[
\$
nfin
-eq
$nslices
]
;
then
...
...
@@ -122,14 +122,14 @@ while [ \$finished -eq 0 ] ; do
sleep
600
;
done
EOM
chmod
+x
${
subjdir
}
.bedpost/monitor
chmod
+x
${
subjdir
}
.bedpost
X
/monitor
echo
Type
${
subjdir
}
.bedpost/cancel to terminate the task.
cat
<<
EOC
>
${
subjdir
}
.bedpost/cancel
echo
Type
${
subjdir
}
.bedpost
X
/cancel to terminate the task.
cat
<<
EOC
>
${
subjdir
}
.bedpost
X
/cancel
#!/bin/sh
qdel
$mergeid
$bedpostid
$preprocid
EOC
chmod
+x
${
subjdir
}
.bedpost/cancel
chmod
+x
${
subjdir
}
.bedpost
X
/cancel
echo
echo
You will get an email at the end of the post-processing stage.
...
...
This diff is collapsed.
Click to expand it.
bedpostx_postproc.sh
+
38
−
1
View file @
398959c0
...
...
@@ -8,4 +8,41 @@ subjdir=$1
#$ -m ae
echo
cock
\ No newline at end of file
numfib
=
`
${
FSLDIR
}
/bin/imglob
-oneperimage
${
subjdir
}
.bedpostX/diff_slices/data_slice_0000/f
*
samples |wc
-w
`
fib
=
1
;
while
[
$fib
-le
$numfib
]
;
do
${
FSLDIR
}
/bin/avwmerge
-z
${
subjdir
}
.bedpostX/merged_th
${
fib
}
samples
`
${
FSLDIR
}
/bin/imglob
-oneperimage
${
subjdir
}
.bedpostX/diff_slices/data_slice_
*
/th
${
fib
}
samples
`
${
FSLDIR
}
/bin/avwmerge
-z
${
subjdir
}
.bedpostX/merged_ph
${
fib
}
samples
`
${
FSLDIR
}
/bin/imglob
-oneperimage
${
subjdir
}
.bedpostX/diff_slices/data_slice_
*
/ph
${
fib
}
samples
`
${
FSLDIR
}
/bin/avwmerge
-z
${
subjdir
}
.bedpostX/merged_f
${
fib
}
samples
`
${
FSLDIR
}
/bin/imglob
-oneperimage
${
subjdir
}
.bedpostX/diff_slices/data_slice_
*
/f
${
fib
}
samples
`
${
FSLDIR
}
/bin/avwmaths
${
subjdir
}
.bedpostX/merged_th
${
fib
}
samples
-Tmean
${
subjdir
}
.bedpostX/mean_th
${
fib
}
samples
${
FSLDIR
}
/bin/avwmaths
${
subjdir
}
.bedpostX/merged_ph
${
fib
}
samples
-Tmean
${
subjdir
}
.bedpostX/mean_ph
${
fib
}
samples
${
FSLDIR
}
/bin/avwmaths
${
subjdir
}
.bedpostX/merged_f
${
fib
}
samples
-Tmean
${
subjdir
}
.bedpostX/mean_f
${
fib
}
samples
${
FSLDIR
}
/bin/make_dyadic_vectors
${
subjdir
}
.bedpostX/merged_th
${
fib
}
samples
${
subjdir
}
.bedpostX/merged_ph
${
fib
}
samples
${
subjdir
}
.bedpostX/nodif_brain_mask
${
subjdir
}
.bedpostX/dyads
${
fib
}
fib
=
`
echo
"
$fib
+1"
|bc
`
;
done
echo
Removing intermediate files
if
[
`
imtest
${
subjdir
}
.bedpostX/merged_th1samples
`
-eq
1
]
;
then
if
[
`
imtest
${
subjdir
}
.bedpostX/merged_ph1samples
`
-eq
1
]
;
then
if
[
`
imtest
${
subjdir
}
.bedpostX/merged_f1samples
`
-eq
1
]
;
then
rm
-rf
${
subjdir
}
.bedpostX/diff_slices
rm
-f
${
subjdir
}
/data_slice_
*
rm
-f
${
subjdir
}
/nodif_brain_mask_slice_
*
fi
fi
fi
echo
Creating identity xfm
xfmdir
=
${
subjdir
}
.bedpostX/xfms
echo
1 0 0 0
>
${
xfmdir
}
/eye.mat
echo
0 1 0 0
>>
${
xfmdir
}
/eye.mat
echo
0 0 1 0
>>
${
xfmdir
}
/eye.mat
echo
0 0 0 1
>>
${
xfmdir
}
/eye.mat
echo
Done
This diff is collapsed.
Click to expand it.
bedpostx_preproc.sh
+
4
−
4
View file @
398959c0
...
...
@@ -8,13 +8,13 @@ subjdir=$1
#$ -m a
echo
Copying files to bedpost directory
cp
${
subjdir
}
/bvecs
${
subjdir
}
/bvals
${
subjdir
}
.bedpost
${
FSLDIR
}
/bin/imcp
${
subjdir
}
/nodif
${
subjdir
}
/nodif_brain_mask
${
subjdir
}
.bedpost
cp
${
subjdir
}
/bvecs
${
subjdir
}
/bvals
${
subjdir
}
.bedpost
X
${
FSLDIR
}
/bin/imcp
${
subjdir
}
/nodif
${
subjdir
}
/nodif_brain_mask
${
subjdir
}
.bedpost
X
${
FSLDIR
}
/bin/avwmaths
\
${
subjdir
}
/nodif
\
-mas
${
subjdir
}
/nodif_brain_mask
\
${
subjdir
}
.bedpost/nodif_brain
${
subjdir
}
.bedpost
X
/nodif_brain
${
FSLDIR
}
/bin/avwslice
${
subjdir
}
/data
${
FSLDIR
}
/bin/avwslice
${
subjdir
}
/nodif_brain_mask
echo
Done
\ No newline at end of file
echo
Done
This diff is collapsed.
Click to expand it.
bedpostx_single_slice.sh
+
2
−
2
View file @
398959c0
...
...
@@ -13,6 +13,6 @@ ${FSLDIR}/bin/xfibres\
--data
=
$subjdir
/data_slice_
$slicezp
\
--mask
=
$subjdir
/nodif_brain_mask_slice_
$slicezp
\
-b
$subjdir
/bvals
-r
$subjdir
/bvecs
\
--forcedir
--logdir
=
$subjdir
.bedpost/diff_slices/data_slice_
$slicezp
\
--nj
=
1000
--bi
=
600
--se
=
20
--upe
=
24
--nfibres
=
2
>
$subjdir
.bedpost/logs/log
$slicezp
&&
echo
Done
--forcedir
--logdir
=
$subjdir
.bedpost
X
/diff_slices/data_slice_
$slicezp
\
--nj
=
1000
--bi
=
600
--se
=
20
--upe
=
24
--nfibres
=
2
>
$subjdir
.bedpost
X
/logs/log
$slicezp
&&
echo
Done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment