That script looks almost identical to the script I used for
hybridising multiple diffusion tensors on a single molecule and then
using AIC model selection to select between the hybrid and the full
tensor. Although this bug has been triggered (I'm guessing here so I
could be wrong) by improper use of the model_selection() user function
in combination with the hybrid model, would you like to create a bug
report for it?
For the model selection of the global diffusion models (the sphere,
oblate spheroid, prolate spheroid, ellipsoid, the local tm models, and
the hybrid models) eash model must consist of exactly the same number
of relaxation data points (n) and exactly the same number of spins
(l). If one spin is selected in the sphere and deselected in the
ellipsoid - they cannot be compared as l_sphere != l_ellipsoid and
model selection cannot be used to select between them. In the case of
your script, the number of spins used in the hybrid is the total
number n. But it is being compared to two models which consist of
incomplete subsets (x < n and n-x < n) of the total number of spins n.
Hence model selection cannot be applied. If the hybrid consists of
all spins n, it must be compared to other model consisting of all
spins n. relax should therefore be modified print a RelaxError
message stating that the models cannot be compared, either due to the
number of spins being different or the number of relaxation data sets
being different.
Cheers,
Edward
On 11/10/06, Alexandar Hansen <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to run a hybrid model selection on my data and have been getting
a Traceback error. This is my script and the output.
script = 'my_hybrid.py'
----------------------------------------------------------------------------------------------------
run.create('Dom1','mf')
run.create('Dom2','mf')
run.create('hybrid_select','mf')
results.read('Dom1','results.bz2','15N_final_domain1/final')
results.read('Dom2','results.bz2','15N_final_domain2/final')
run.hybridise('hybrid',['Dom1','Dom2'])
model_selection('AIC','hybrid_select',['Dom1','Dom2','hybrid'])
----------------------------------------------------------------------------------------------------
relax> run.create(run='Dom1', run_type='mf')
relax> run.create(run='Dom2', run_type='mf')
relax> run.create(run='hybrid_select', run_type='mf')
relax> results.read(run='Dom1', file='results.bz2',
dir='15N_final_domain1/final', format='columnar')
Opening the file '15N_final_domain1/final/results.bz2' for
reading.
Loading all structures from the PDB file.
Structure('etar_au22_phage_df_pt.pdb', model=1):
Nucleotide chain of length 68
relax> results.read(run='Dom2', file='results.bz2',
dir='15N_final_domain2/final', format='columnar')
Opening the file '15N_final_domain2/final/results.bz2' for
reading.
Using the structures from the run 'Dom1'.
Structure('etar_au22_phage_df_pt.pdb', model=1):
Nucleotide chain of length 68
relax> run.hybridise(hybrid='hybrid', runs=['Dom1', 'Dom2'])
relax> model_selection(method='AIC', modsel_run='hybrid_select',
runs=['Dom1', 'Dom2', 'hybrid'])
AIC model selection.
Instance 0.
Run Num_params_(k) Num_data_sets_(n) Chi2
Criterion
Dom1 9 12 3.70303
21.70303
Dom2 10 12 1.89550
21.89550
Traceback (most recent call last):
File "relax", line 454, in ?
Relax()
File "relax", line 166, in __init__
self.interpreter.run()
File "/local/home/viochem/relax/prompt/interpreter.py",
line 213, in run
run_script(intro=self.relax.intro_string, local= self.local,
script_file=self.relax.script_file, quit=1)
File "/local/home/viochem/relax/prompt/interpreter.py",
line 388, in run_script
console.interact(intro, local, script_file, quit)
File "/local/home/viochem/relax/prompt/interpreter.py",
line 340, in interact_script
execfile(script_file, local)
File "my_hybrid.py", line 9, in ?
model_selection('AIC','hybrid_select',['Dom1','Dom2','hybrid'])
File
"/local/home/viochem/relax/prompt/model_selection.py", line
121, in model_selection
self.relax.generic.model_selection.select(method=method,
modsel_run=modsel_run, runs=runs)
File
"/local/home/viochem/relax/generic_fns/model_selection.py",
line 217, in select
k, n, chi2 = self.model_statistics [run](run=run, instance=i,
global_stats=global_stats)
File "/local/home/viochem/relax/specific_fns/hybrid.py",
line 117, in model_statistics
for i in xrange(num):
NameError: global name 'num' is not defined
Is this a bug, or am I doing something totally wrong?
Alex
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-devel mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-devel mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel