wadrc-bcp-scripts 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/.gitignore +7 -0
  2. data/.svn/entries +41 -0
  3. data/.svn/format +1 -0
  4. data/.svn/prop-base/reconstruct_dti_test.rb.svn-base +5 -0
  5. data/.svn/text-base/reconstruct_dti_test.rb.svn-base +25 -0
  6. data/Gemfile +4 -0
  7. data/README.md +5 -0
  8. data/Rakefile +7 -0
  9. data/VERSION +1 -0
  10. data/bin/FS_local_recon +98 -0
  11. data/bin/FieldmapAtWaisman.rb +35 -0
  12. data/bin/createFieldmap.rb +33 -0
  13. data/bin/preprocess_dti.rb +110 -0
  14. data/bin/run_dti_fit_for_study.sh +26 -0
  15. data/bin/run_dti_fit_script.sh +28 -0
  16. data/bin/tensor_transpose.rb +45 -0
  17. data/lib/.svn/entries +54 -0
  18. data/lib/.svn/format +1 -0
  19. data/lib/.svn/prop-base/dti_wrapper.rb.svn-base +5 -0
  20. data/lib/.svn/prop-base/dtifit_processing.rb.svn-base +5 -0
  21. data/lib/.svn/text-base/dti_wrapper.rb.svn-base +33 -0
  22. data/lib/.svn/text-base/dtifit_processing.rb.svn-base +95 -0
  23. data/lib/additions/NetSshConnectionSession.rb +20 -0
  24. data/lib/wadrc-bcp-scripts.rb +13 -0
  25. data/lib/wadrc-bcp-scripts/basic_task.rb +137 -0
  26. data/lib/wadrc-bcp-scripts/dtitask.rb +156 -0
  27. data/lib/wadrc-bcp-scripts/fieldmap_classes.rb +166 -0
  28. data/lib/wadrc-bcp-scripts/freesurfer_roi_task.rb +134 -0
  29. data/lib/wadrc-bcp-scripts/tensor.rb +25 -0
  30. data/lib/wadrc-bcp-scripts/version.rb +3 -0
  31. data/spec/.svn/entries +28 -0
  32. data/spec/.svn/format +1 -0
  33. data/spec/FS_local_recon_spec.rb +22 -0
  34. data/spec/blueprints.rb +12 -0
  35. data/spec/dtitask_spec.rb +95 -0
  36. data/spec/examples/johnson.alz.snodrest.visit2.yaml +14 -0
  37. data/spec/examples/johnson.tbi.aware.visit1.yaml +11 -0
  38. data/spec/examples/johnson.wrap140.visit1.yaml +12 -0
  39. data/spec/examples/johnson.wrap140.visit1_TR12s.yaml +12 -0
  40. data/spec/examples/spec.yaml +22 -0
  41. data/spec/factories.rb +11 -0
  42. data/spec/helper_spec.rb +8 -0
  43. data/test/.svn/entries +41 -0
  44. data/test/.svn/format +1 -0
  45. data/test/.svn/prop-base/reconstruct_dti_test.rb.svn-base +5 -0
  46. data/test/.svn/text-base/reconstruct_dti_test.rb.svn-base +25 -0
  47. data/test/reconstruct_dti_test.rb +25 -0
  48. metadata +188 -0
@@ -0,0 +1,14 @@
1
+ # DTI Processing Configuration File
2
+ # johnson.alz.snodrest.visit2
3
+ # Andy's 3T, 12 Directions
4
+ # Last Edited: 3/24/2010, ekk
5
+ ---
6
+ :file_glob: "'S*'"
7
+ :volumes: 13
8
+ :slices_per_volume: 39
9
+ :slice_order: altplus
10
+ :bvectors_file: /Data/vtrak1/preprocessed/visits/johnson.alz.snodrest.visit2/DTI_info/preproc_dti/enc12.txt
11
+ :bvalues_file: /Data/vtrak1/preprocessed/visits/johnson.alz.snodrest.visit2/DTI_info/preproc_dti/bvalues
12
+
13
+ # Optional Defaults
14
+ # :repetition_time: 8000
@@ -0,0 +1,11 @@
1
+ # DTI Processing Configuration File
2
+ # johnson.tbi.aware.visit1
3
+ # Andy's 3T, 12 Directions
4
+ # Last Edited: 3/24/2010, ekk
5
+ ---
6
+ :file_glob: "'S*'"
7
+ :volumes: 13
8
+ :slices_per_volume: 39
9
+ :slice_order: altplus
10
+ :bvectors_file: /Data/vtrak1/preprocessed/visits/johnson.tbi.aware.visit1/DTI_info/preproc_dti/enc12.txt
11
+ :bvalues_file: /Data/vtrak1/preprocessed/visits/johnson.tbi.aware.visit1/DTI_info/preproc_dti/b-values
@@ -0,0 +1,12 @@
1
+ # DTI Processing Configuration File
2
+ # johnson.wrap140.visit1
3
+ # UWMR5, 25 Directions
4
+ # Last Edited: 3/24/2010, ekk
5
+ ---
6
+ :file_glob: "'I*.dcm'"
7
+ :volumes: 26
8
+ :slices_per_volume: 49
9
+ :slice_order: altplus
10
+ :bvectors_file: /Data/vtrak1/preprocessed/progs/wrap140.visit1/DTI_Fitting/25_directions_UWhospital_magnet_horizontal_spaces.txt
11
+ :bvalues_file: /Data/vtrak1/preprocessed/progs/wrap140.visit1/DTI_Fitting/25_directions_bvalues.txt
12
+ :repetition_time: 12000
@@ -0,0 +1,12 @@
1
+ # DTI Processing Configuration File
2
+ # johnson.wrap140.visit1
3
+ # UWMR5, 25 Directions
4
+ # Last Edited: 3/24/2010, ekk
5
+ ---
6
+ :file_glob: "'I*.dcm'"
7
+ :volumes: 26
8
+ :slices_per_volume: 49
9
+ :slice_order: altplus
10
+ :bvectors_file: /Data/vtrak1/preprocessed/progs/wrap140.visit1/DTI_info/preproc_dti/25_directions_table.txt
11
+ :bvalues_file: /Data/vtrak1/preprocessed/visits/wrap140.visit1/DTI_info/preproc_dti/bvalues
12
+ :repetition_time: 12000
@@ -0,0 +1,22 @@
1
+ # DTI Processing File
2
+ ---
3
+ :file_glob: "'*.dcm'"
4
+ :volumes: 26
5
+ :slices_per_volume: 48
6
+ :slice_order: altplus
7
+ :bvectors_file: /Data/vtrak1/analyses/barb/cathy_temp/25_directions_bvectors.txt
8
+ :bvalues_file: /Data/vtrak1/analyses/barb/cathy_temp/25_directions_bvalues.txt
9
+ :force_overwrite: true
10
+ :dry_run: false
11
+ :repetition_time: 10000
12
+
13
+ # Defaults:
14
+ # :file_glob: "'*.0*'"
15
+ # :volumes: 26
16
+ # :slices_per_volume: 49
17
+ # :slice_order: altplus
18
+ # :bvectors_file: /Data/vtrak1/preprocessed/progs/wrap140.visit1/DTI_Fitting/25_directions_UWhospital_magnet_horizontal_spaces.csv
19
+ # :bvalues_file: /Data/vtrak1/preprocessed/progs/wrap140.visit1/DTI_Fitting/25_directions_bvalues.txt
20
+ #
21
+ # Optional:
22
+ # :repetition_time:
@@ -0,0 +1,11 @@
1
+ Factory.define :dtitask do |f|
2
+ f.config({
3
+ :bvectors_file=>"/Data/vtrak1/analyses/barb/cathy_temp/25_directions_bvectors.txt",
4
+ :bvectors_file=>"/Data/vtrak1/analyses/barb/cathy_temp/25_directions_bvectors.txt",
5
+ :bvalues_file=>"/Data/vtrak1/analyses/barb/cathy_temp/25_directions_bvalues.txt",
6
+ :file_glob=>"'*.dcm'",
7
+ :volumes=>26,
8
+ :dry_run=>true,
9
+ :slices_per_volume=>48 }
10
+ )
11
+ end
@@ -0,0 +1,8 @@
1
+ require 'rubygems'
2
+ require 'tmpdir'
3
+ require 'pp'
4
+
5
+ require 'factory_girl'
6
+ require 'factories'
7
+
8
+ $MRI_DATA = ENV['MRI_DATA'] ||'/Data/vtrak1/raw/test/fixtures/ImageProcessing'
@@ -0,0 +1,41 @@
1
+ 8
2
+
3
+ dir
4
+ 146
5
+ file:///Data/vtrak1/SysAdmin/lab_repository/trunk/ImageProcessing/test
6
+ file:///Data/vtrak1/SysAdmin/lab_repository
7
+
8
+
9
+
10
+ 2009-05-08T17:32:47.685248Z
11
+ 146
12
+ erik
13
+
14
+
15
+ svn:special svn:externals svn:needs-lock
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+ fd7843e3-2c87-496d-a67a-9fe0c7cb9cb9
28
+
29
+ reconstruct_dti_test.rb
30
+ file
31
+
32
+
33
+
34
+
35
+ 2009-05-08T17:33:51.000000Z
36
+ 692bb730b8001354d2fde46acd336087
37
+ 2009-05-08T17:32:47.685248Z
38
+ 146
39
+ erik
40
+ has-props
41
+
@@ -0,0 +1 @@
1
+ 8
@@ -0,0 +1,5 @@
1
+ K 14
2
+ svn:executable
3
+ V 0
4
+
5
+ END
@@ -0,0 +1,25 @@
1
+ #!/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
4
+
5
+ require 'test/unit'
6
+ require 'fileutils'
7
+ require 'dtifit_processing'
8
+
9
+ class ReconstructDTI_test < Test::Unit::TestCase
10
+ def setup
11
+ @input_directory = '/Data/vtrak1/raw/wrap140/wrp002_5938_03072008/017'
12
+ @output_directory = '/tmp/wrp002/dti'
13
+ @subject_prefix = 'wrp002'
14
+ end
15
+
16
+ def test_dti_reconstruction_class
17
+ ReconstructDTI.reconstruct!(@input_directory, @output_directory, @subject_prefix)
18
+ end
19
+
20
+
21
+ def teardown
22
+ FileUtils.rm_r @output_directory
23
+ end
24
+
25
+ end
@@ -0,0 +1,25 @@
1
+ #!/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
4
+
5
+ require 'test/unit'
6
+ require 'fileutils'
7
+ require 'dtifit_processing'
8
+
9
+ class ReconstructDTI_test < Test::Unit::TestCase
10
+ def setup
11
+ @input_directory = '/Data/vtrak1/raw/wrap140/wrp002_5938_03072008/017'
12
+ @output_directory = '/tmp/wrp002/dti'
13
+ @subject_prefix = 'wrp002'
14
+ end
15
+
16
+ def test_dti_reconstruction_class
17
+ ReconstructDTI.reconstruct!(@input_directory, @output_directory, @subject_prefix)
18
+ end
19
+
20
+
21
+ def teardown
22
+ FileUtils.rm_r @output_directory
23
+ end
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,188 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wadrc-bcp-scripts
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 6
10
+ version: 0.0.6
11
+ platform: ruby
12
+ authors:
13
+ - Erik Kastman
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-08-30 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: net-ssh
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 7
29
+ segments:
30
+ - 2
31
+ - 2
32
+ version: "2.2"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: escoffier
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ hash: 29
44
+ segments:
45
+ - 0
46
+ - 1
47
+ - 3
48
+ version: 0.1.3
49
+ type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: rspec
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ hash: 9
60
+ segments:
61
+ - 2
62
+ - 5
63
+ version: "2.5"
64
+ type: :development
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: factory_girl
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ~>
73
+ - !ruby/object:Gem::Version
74
+ hash: 5
75
+ segments:
76
+ - 2
77
+ - 0
78
+ - 5
79
+ version: 2.0.5
80
+ type: :development
81
+ version_requirements: *id004
82
+ description: This gem contains scripts for basic preprocessing in the Wisconsin Alzheimer's Disease Research Center Neuroimaging Group
83
+ email: ekk@medicine.wisc.edu
84
+ executables:
85
+ - FS_local_recon
86
+ - FieldmapAtWaisman.rb
87
+ - createFieldmap.rb
88
+ - preprocess_dti.rb
89
+ - run_dti_fit_for_study.sh
90
+ - run_dti_fit_script.sh
91
+ - tensor_transpose.rb
92
+ extensions: []
93
+
94
+ extra_rdoc_files: []
95
+
96
+ files:
97
+ - .gitignore
98
+ - .svn/entries
99
+ - .svn/format
100
+ - .svn/prop-base/reconstruct_dti_test.rb.svn-base
101
+ - .svn/text-base/reconstruct_dti_test.rb.svn-base
102
+ - Gemfile
103
+ - README.md
104
+ - Rakefile
105
+ - VERSION
106
+ - bin/FS_local_recon
107
+ - bin/FieldmapAtWaisman.rb
108
+ - bin/createFieldmap.rb
109
+ - bin/preprocess_dti.rb
110
+ - bin/run_dti_fit_for_study.sh
111
+ - bin/run_dti_fit_script.sh
112
+ - bin/tensor_transpose.rb
113
+ - lib/.svn/entries
114
+ - lib/.svn/format
115
+ - lib/.svn/prop-base/dti_wrapper.rb.svn-base
116
+ - lib/.svn/prop-base/dtifit_processing.rb.svn-base
117
+ - lib/.svn/text-base/dti_wrapper.rb.svn-base
118
+ - lib/.svn/text-base/dtifit_processing.rb.svn-base
119
+ - lib/additions/NetSshConnectionSession.rb
120
+ - lib/wadrc-bcp-scripts.rb
121
+ - lib/wadrc-bcp-scripts/basic_task.rb
122
+ - lib/wadrc-bcp-scripts/dtitask.rb
123
+ - lib/wadrc-bcp-scripts/fieldmap_classes.rb
124
+ - lib/wadrc-bcp-scripts/freesurfer_roi_task.rb
125
+ - lib/wadrc-bcp-scripts/tensor.rb
126
+ - lib/wadrc-bcp-scripts/version.rb
127
+ - spec/.svn/entries
128
+ - spec/.svn/format
129
+ - spec/FS_local_recon_spec.rb
130
+ - spec/blueprints.rb
131
+ - spec/dtitask_spec.rb
132
+ - spec/examples/johnson.alz.snodrest.visit2.yaml
133
+ - spec/examples/johnson.tbi.aware.visit1.yaml
134
+ - spec/examples/johnson.wrap140.visit1.yaml
135
+ - spec/examples/johnson.wrap140.visit1_TR12s.yaml
136
+ - spec/examples/spec.yaml
137
+ - spec/factories.rb
138
+ - spec/helper_spec.rb
139
+ - test/.svn/entries
140
+ - test/.svn/format
141
+ - test/.svn/prop-base/reconstruct_dti_test.rb.svn-base
142
+ - test/.svn/text-base/reconstruct_dti_test.rb.svn-base
143
+ - test/reconstruct_dti_test.rb
144
+ homepage: http://github.com/brainmap/wadrc-bcp-scripts
145
+ licenses: []
146
+
147
+ post_install_message:
148
+ rdoc_options: []
149
+
150
+ require_paths:
151
+ - lib
152
+ required_ruby_version: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ hash: 3
158
+ segments:
159
+ - 0
160
+ version: "0"
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
162
+ none: false
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ hash: 3
167
+ segments:
168
+ - 0
169
+ version: "0"
170
+ requirements: []
171
+
172
+ rubyforge_project:
173
+ rubygems_version: 1.8.10
174
+ signing_key:
175
+ specification_version: 3
176
+ summary: Basic Common Preprocessing Scripts for Neuroimaging Data
177
+ test_files:
178
+ - spec/FS_local_recon_spec.rb
179
+ - spec/blueprints.rb
180
+ - spec/dtitask_spec.rb
181
+ - spec/examples/johnson.alz.snodrest.visit2.yaml
182
+ - spec/examples/johnson.tbi.aware.visit1.yaml
183
+ - spec/examples/johnson.wrap140.visit1.yaml
184
+ - spec/examples/johnson.wrap140.visit1_TR12s.yaml
185
+ - spec/examples/spec.yaml
186
+ - spec/factories.rb
187
+ - spec/helper_spec.rb
188
+ - test/reconstruct_dti_test.rb