SCM

SCM Repository

[batman] Annotation of /pkg/batman/man/Batman-Input.Rd
ViewVC logotype

Annotation of /pkg/batman/man/Batman-Input.Rd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 203 - (view) (download) (as text)

1 : jie 203 \name{Batman-Input}
2 :     \alias{Batman-Input}
3 :     \title{BATMAN Input Files are Explained Here}
4 :     \description{\code{batman} gets input parameters and metabolite templates information
5 :     from the input files explained here. The input files are in either
6 :     folder ".../runBATMAN/BatmanInput" or folder "extdata" depending on
7 :     \code{batman} arguments.
8 :     The user can modify the parameter values in the following input files (
9 :     do not change the name of these files):
10 :     batmanOptions.txt,
11 :     metabolitesList.csv,
12 :     multi_data.csv,
13 :     multi_data_user.csv,
14 :     NMRdata.txt.
15 :     }
16 :     \arguments{
17 :     \item{batmanOptions.txt}{Option file to be used by \code{batman}. A copy of this
18 :     file in the output directory is used for \code{batmanrerun}.
19 :     The parameters in \code{batmanOptions.txt} file are explained here with example
20 :     input values. The parameters have to be listed in the particular order given here,
21 :     and do not leave empty lines in between except beginning with the comment character "\%".
22 :     Please note that for version 1.0.9 and later, one more input line,
23 :    
24 :     "Use specified chemical shift for spectra (chemShiftperSpectra.csv) file (1/0): 0",
25 :    
26 :     is added at the end of this file.
27 :     For earlier version users updated to this version, running \code{batman} will
28 :     add the above input line at the end of the file if missing.
29 :    
30 :    
31 :    
32 :    
33 :     \code{Include ppm ranges for analysis: (1.2, 1.6) (2.1, 2.8)}
34 :    
35 :    
36 :     \itemize{
37 :     \item{Put each set of ppm range in a pair of parentheses in the same line,
38 :     separate start and end ppm values with a comma, separate each set of
39 :     ppm range with space. Note that, very small number of spectra variables
40 :     may cause error in wavelet analysis, do not give very narrow ppm ranges and also check the "Down sampling:"
41 :     factor below, which used together, may also left very small number of spectra variables. }}
42 :    
43 :    
44 :     \code{Spectra range to be included: 1-3, 5}
45 :    
46 :    
47 :     \itemize{
48 :     \item{Integer, if no. > 1 and fixed effect (same concentration for all spectra)
49 :     is 0, user will be asked to choose
50 :     whether to parallelize fittings between spectra when running
51 :     \code{batman} or \code{rerunbatman}.}}
52 :    
53 :    
54 :     \code{Lower limit for spectrum intensity: -0.5}
55 :    
56 :    
57 :     \itemize{
58 :     \item{Spectrum intensity smaller than the lower limit
59 :     will be replaced by the lower limit.}}
60 :    
61 :    
62 :     \code{Normalisation factor: 20000}
63 :    
64 :    
65 :     \itemize{
66 :     \item{The whole spectrum will be divided by the normalisation factor.}}
67 :    
68 :    
69 :     \code{Down sampling: 3}
70 :    
71 :    
72 :     \itemize{
73 :     \item{Integer, number of spectra variable will be reduced by the factor of
74 :     the input parameter, 3, in this case. For the example shown, the spectra variables
75 :     with the index \eqn{1:3:end} will be used for analysis.}}
76 :    
77 :    
78 :     \code{Save metabolites fit same as the original spectrum resolution (1/0): 1}
79 :    
80 :    
81 :     \itemize{
82 :     \item{Whether to save the metabolites fitting result in
83 :     the original resolution without down sampling.
84 :     Input 1 for yes, and 0 for no.}}
85 :    
86 :    
87 :     \code{Set seed for random number generation: 25}
88 :    
89 :     \itemize{
90 :     \item{Random number generation seed, integer.}}
91 :    
92 :    
93 :     \code{Stop burn in at iteration: 4000}
94 :    
95 :    
96 :     \itemize{
97 :     \item{Integer, this is the number of burn in iterations. The number of iterations
98 :     after burn in will be asked when running \code{batman}. The posterior samples
99 : jie 132 will be saved in the frequency specified by the next parameter. If changing
100 :     the range of spectrum causing fitting results inconsistent, this indicates that the burn in
101 :     stage hasn't found the best chemical shift. User may need to increase burn in iterations or reduce
102 : jie 203 prior truncation on ppm shift for each multiple (adjust parameter "rdelta" below). }}
103 :    
104 :    
105 :     \code{Save results in every ? iterations: 5}
106 :    
107 :     \itemize{
108 :     \item{Integer, save posterior samples for every 5 iterations.}}
109 :    
110 :    
111 :     \code{Same concentration for all spectra (fixed effect) (1/0): 0}
112 :    
113 :    
114 :     \itemize{
115 :     \item{Whether all the input spectra have the same metabolite concentrations (e.g.
116 :     technical replicates). Input 1 for yes, and 0 for no.}}
117 :    
118 :    
119 :     \code{Rerun iterations: 5000}
120 :    
121 :    
122 :     \itemize{
123 :     \item{Integer, this is the number of iterations for \code{batmanrerun}.
124 :     The rerun will use fixed multiplets positions obtained
125 :     from running \code{batman}. There is no burnin for batman rerun.}}
126 :    
127 :    
128 :     \code{Start temperature: 1000}
129 :    
130 :    
131 :     \itemize{
132 :     \item{Sets the start temperature parameter of the likelihood of tempering. Higher temperature
133 :     may need more burnin iterations to cool down.}}
134 :    
135 :    
136 :     \code{Spectrometer frequency (MHz): 600}
137 :    
138 :    
139 :     \itemize{
140 :     \item{Spectrometer used to collect the spectrum.}}
141 :    
142 :    
143 :     \code{a: 0.00001}
144 :    
145 :    
146 :     \code{b: 0.000000001}
147 :    
148 :    
149 :     \itemize{
150 :     \item{Hyper parameters for the global precision priors
151 :     (\eqn{\lambda \sim Gamma(a,b/2)}) on wavelet coefficients.}}
152 :    
153 :    
154 :     \code{Mean of the prior on mu: 0}
155 :    
156 :    
157 :     \code{Variance of the prior on mu: 0.1}
158 :    
159 :    
160 :     \code{Proposal variance for the Metropolis-Hastings sampler for mu: 0.002}
161 :    
162 :    
163 :     \code{Variance of each of the priors on the nu_m: 0.0025}
164 :    
165 :    
166 :     \code{Proposal variance for the Metropolis-Hastings sampler for each nu_m: 0.0001}
167 :    
168 :    
169 :     \itemize{
170 :     \item{For peak width, \eqn{\gamma}, in Hz of metabolite \eqn{m}, the model for
171 :     \eqn{\gamma} is \eqn{\ln(\gamma)= \mu + \nu_m}
172 :     where \eqn{\mu} is the spectrum wide average log-peakwidth and
173 :     \eqn{\nu_m} is a random effect on metabolite deviation from \eqn{\mu}.
174 :     The mean of each prior on \eqn{\nu_m} is 0. Set the variance of the prior on
175 :     \eqn{\nu_m} to 0 to turn off the random effect on peak width to keep peaks at
176 :     the same width. The user can keep the proposal variance parameters unchanged
177 :     for most of the case.
178 :     }}
179 :    
180 :     \code{mean of the prior on tau: -0.01}
181 :    
182 :     \itemize{
183 :     \item{Hyper priors (\eqn{\tau}) on negative wavelet coefficient (truncated normal).
184 :     A more negative value means the wavelet fit will have more negative component.}}
185 :    
186 :    
187 :     \code{steep: 2}
188 :    
189 :    
190 :     \itemize{
191 :     \item{This parameter is inversely proportional to the variance of the prior on \eqn{\tau}.}}
192 :    
193 :    
194 :     \code{rdelta: 0.030}
195 :    
196 :     \itemize{
197 :     \item{Prior of the truncation on ppm shift for all multiplets, individual prior
198 :     for each multiplet can be changed in the "multi_data.csv" file. Increase this
199 : jie 132 parameter to allow multiplets to shift more. Please note, increasing this value may need more burn in
200 : jie 203 iterations to find the best chemical shift for multiplets.}}
201 :    
202 :     \code{Use specified chemical shift for spectra (chemShiftperSpectra.csv) file (1/0): 0}
203 :    
204 :     \itemize{
205 : jie 120 \item{Input "1" to use file "chemShiftperSpectra.csv" to specify chemical shift per multiplet and per spectrum.
206 :     Input "0" will not use that file. User can use the MATLAB tool "SplineFitBATMAN" provided to get more accurate
207 : jie 203 chemical shift per spectra for each multiplet. This tool will save chemical shift information into "chemShiftperSpectra.csv".}}
208 :     }
209 :    
210 :    
211 :     \item{metabolitesList.csv}{List of metabolite names to be fitted. Put "\%" in front
212 :     of the metabolite name to comment out any metabolite for batman analysis.}
213 :    
214 :    
215 :     \item{multi_data.csv}{Multiplet template parameters file, obtained from the online
216 :     Human Metabolome Database (HMDB) version 2.5. The user can modify the parameters in
217 :     the template file and specify ppm positions, and normal distribution truncation of ppm
218 :     shift parameters (a positive value applied as +/- on the distribution).
219 :    
220 :    
221 :     The columns are:
222 :    
223 :    
224 :     \code{Metabolite}: The name of metabolite the multiplets belongs to.
225 :    
226 :    
227 :     \code{pos_in_ppm}: The ppm position of the multiplets.
228 :    
229 :    
230 :     \code{couple_code}: Coupling code.
231 :     0 = singlet,
232 :     1 = doublet,
233 :     2 = triplet,
234 :     3 = quartet,
235 :     4 = quintet,
236 :     5 = sextet,
237 :     6 = septet,
238 :     1,1 = doublet of doublets,
239 :     1,2 = doublet of triplets,
240 :     2,1 = triplet of doublets,
241 :     2,2 = triplet of triplets,
242 :     1,3 = doublet of quartets,
243 :     3,1 = quartet of doublets,
244 :     1,1,1 = doublet of doublet of doublets,
245 :     2,3 = triplet of quartets,
246 :     3,2 = quartet of triplets,
247 :     3,3 = quartet of quartets.
248 :     If "-1" is inputted here, a user specified multiplet can be created.
249 :     An example can be found in file "multi_data_user.csv". If "-2" is inputted here, a multiplet with range
250 :     specified in ppm in the field "J_constant" is used. Examples can be found in file "multi_data_user.csv".
251 :    
252 :    
253 :     \code{J_constant}: J constant. If "-1" is inputted in the previous field "couple_code", J_constant/f are the offset
254 :     of peaks from the mutiplet position (f is the magnet frequency). Note that the spectra are shown in reverse ppm axis, so
255 :     a positive offset means peak at higher ppm value, and a negative offset is peak at lower ppm value. If "-2" is inputted
256 :     in the previous field "couple_code", the field here requires a two values input seperated by comma, which specifies the ppm
257 :     range of the multiplet in the pure spectrum. Note in this case, the field "Metabolite" name will also be the .txt file name
258 :     containing the pure spectrum (refer to \code{\link{createPureSpectraTemplate}}).
259 :    
260 :    
261 :     \code{no_of_protons}: Number of protons in each multiplet. If "-1" is inputted for "couple_code", one or more
262 :     (corresponding to J_constant) values can be given here as peak weights. The sum of no_of_protons is
263 :     the number of protons in this multiplet.
264 :    
265 :    
266 :     \code{overwrite_pos}: The default is "n" for not overwrite position, and in that case
267 :     the value in "pos_in_ppm" is used for each multiplet. If user want to use a different
268 :     value from "pos_in_ppm", it should be put in this column.
269 :    
270 :    
271 :     \code{overwrite_truncation}: The default is "n", and the default truncation value is obtained from
272 :     the user input truncation on ppm shift (rdelta) in \code{batmanOptions.txt}.
273 :     If the user wants to use different truncations for specific multiplets, it should be put in this column.
274 :     This value will be used to calculate the ppm shift variance value (truncation/5)
275 :     for the corresponding multiplets.
276 :    
277 :    
278 :     \code{Include_multiplet}: The default is "1" and all multiplets belong to the listed
279 :     metabolites will be used. Set to "0" to exclude certain multiplet(s) from listed metabolite(s).}
280 :    
281 :     \item{multi_data_user.csv}{Metabolite template parameters file for user to add new metabolites in the
282 :     same format as \code{multi_data.csv}. }
283 :    
284 :     \item{NMRdata.txt}{The file has ppm value as its first column, and real part of the
285 :     NMR spectrum in each of the subsequent columns. This file will be used when none of the input data argument is given.}
286 :     }

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge