Changes

Jump to navigation Jump to search
and the function '''specific_analyses.relax_disp.disp_data.loop_cluster''' which it uses.
=== Create data pipe for cluster analysis ===The commands be performed in the GUI.<br> '''Ctrl+d''' for Data pipe editor.  # '''Copy''' Source: '''NS 2-site expanded''' Dest: '''cluster NS 2-site expanded''', bundle: '''relax_disp'''. OK# Click '''Switch''' and select '''cluster NS 2-site expanded'''# Right Click '''cluster NS 2-site expanded''', and select '''Associate with a new autoanalysis'''Now jump to next [[Tutorial_for_Relaxation_dispersion_analysis_cpmg_fixed_time_recorded_on_varian_as_fid_interleaved#Select_residues_for_clustering | section, to select residues for clustering]]. In script:<source lang="python">pipe.copy(pipe_from='NS 2-site expanded', pipe_to='cluster NS 2-site expanded', bundle_to='relax_disp')pipe.switch(pipe_name='cluster NS 2-site expanded')</source> === Select Inspect residues for clustering ===
Let us select residue residues based on a criterion that is the same model which are fit.
Open the relax prompt with '''Ctrl+p''' if you are in the GUI.<br>
We see that "NS 2-site expanded" is most represented. <br>
We now make a list to cluster these residueslater.
<source lang="python">
model_crit = 'NS 2-site expanded'
sel_residues = []
for spin, spin_id in spin_loop(return_id=True, skip_desel=True):
if spin.model == 'NS 2-site expanded'model_crit:
sel_residues.append( [spin._res_num, spin._res_name, spin.model, spin.num ])
for p in sel_residues: print p
</source>
Now we want to cluster the residues.<br>
Use '''User functions (n->) -> relax_disp -> cluster'''.<br>
Set '''The cluster ID''' to '''NS2_cluster''' and '''The spin ID string''' to ''':5@N''' for nitrogen at residue number 5. <br>
Continue for the residues you want to cluster. Keep the same '''Cluster ID'''.
=== Create data pipe for cluster analysis ===For the clustered analysis, you need to start again from the start. <br>You should not load the results from the final pipe, since this will likely be fatalfor the clustered analysis. <br>The auto-analysis is designed to take the pre-run directory name and load the results files for each model itself (notthe state file). <br>Each results file will be loaded into a temporary data pipe and the initial parameter values copied from that. <br>You can inspect which residues you have should not load a state or results file yourself for the clustered analysis. The commands be performed in the promptGUI.<br> '''Ctrl+d''' for Data pipe editor.  # '''Copy''' Source: '''NS 2-site expanded''' Dest: '''cluster NS 2-site expanded''', bundle: '''relax_disp'''. OK# Click '''Switch''' and select '''cluster NS 2-site expanded'''. OKNow jump to next [[Tutorial_for_Relaxation_dispersion_analysis_cpmg_fixed_time_recorded_on_varian_as_fid_interleaved#Select_residues_for_clustering | section, to select residues for clustering]]In script:
<source lang="python">
cdppipe.clusteringcopy(pipe_from='NS 2-site expanded', pipe_to='cluster NS 2-site expanded', bundle_to='relax_disp')pipe.switch(pipe_name='cluster NS 2-site expanded')
</source>
Since === Make clustering of residues === Now we want to cluster the residues in the list '''sel_residues'''.<br> It is fastest to do it in the relax prompt, since we have our selected list '''sel_residues''' from above, it is faster to do:
<source lang="python">
for resi, resn, model, spini in sel_residues:
relax_disp.cluster('NS2_cluster', ":%s@N"%resi)
cdp.clustering
</source>
 
Or use in the GUI '''User functions (n->) -> relax_disp -> cluster'''.<br>
Set '''The cluster ID''' to '''NS2_cluster''' and '''The spin ID string''' to ''':5@N''' for nitrogen at residue number 5. <br>
Continue for the residues you want to cluster. Keep the same '''Cluster ID'''.
 
You can inspect which residues you have clustered in the prompt.
<source lang="python">
cdp.clustering
</source>
=== Run the analysis ===
'''Ctrl+d''' for Data pipe editor.
# Right Click '''cluster NS 2-site expanded''', and select '''Associate with a new autoanalysis'''
 
In '''Spin cluster IDs''' should now be: '''free spins, NS2_cluster'''. <br>
Save the state now. "Shift+Ctrl+s" as '''prerun_cluster.bz2'''
= See also =
[[Category:Tutorials]]
Trusted, Bureaucrats
1,382

edits

Navigation menu