Open main menu

Changes

no edit summary
c
== Intro ==
Made from [[Tutorial_for_Relaxation_dispersion_analysis_cpmg_fixed_time_recorded_on_varian_as_fid_interleaved | Tutorial for Relaxation dispersion analysis cpmg fixed time recorded on varian as fid interleaved]]
=== Analyse ===
<source lang="bash">relax_trunk relax_1_ini.py -t log_relax_1_ini.log</source> = Method 2 === Intro ==You have measured a range of HSQC with different settings of T1 and T2. You have imported one spectrum in analysis, made peak assignment, and now wan't to analyse for all the spectrum. == Export peak list from analysis ==We want to use the NMRPipe program, '''seriesTab'''.<br>First export to Sparky format. Go to# Other# Format converter# Export# Sparky# Peaks export menu# Select spectrum which contain your peaks# Select export file. Save to somewhere. For example: '''test.sparky'''.# Export# In the last menu which pop-up, slect OK for moelcular system# Then be SURE to have '''Proton first in Dim 0'''. Remove potential un-assigned peaks '?'.<source lang="bash">grep -v "?" test.sparky > test2.sparky</source> Then sort the file, according to residue number. Be aware of small tricks.<source lang="bash"># Extraxt assignments, removing first letterawk '{print $1}' test2.sparky | cut -d'-' -f1 | cut -c2- > sort.txt # Merge columns to prepare for sortpaste sort.txt test2.sparky > sort2.tx # Sort after natural sort of (version) numbers within textsort -V sort2.tx | grep -v "Assignment" > sort3.txt # Now extract columnsawk '{print $2, $3, $4, $5, $6, $7}' sort3.txt > test3.sparkycat test3.sparky</source> You should now have a sorted peak list. Congratulations. Now we convert the peak list from Sparky to NMRPipe format. First find directory with files. <source lang="bash"> # Go into directory, and copy the peak filecd "/sbinlab2/rma/Desktop/Documents/.../XYZ.fid"cp /sbinlab2/rma/Desktop/test/test3.sparky . set SPEAKS=test3.sparkyset FTFILE=0/test.ft2 stPeakList.pl $FTFILE $SPEAKS > test.tabcat test.tab # Now check filenmrDraw $FTFILE</source> In NMRDraw, '''Shift + k'''. Push '''read'''. Now zoom into a peak. Be "sure", that you have not moved the spectrum in analysis or so. == Do intensity measurements for all spectra ==<source lang="bash"># '-1': single column, 'v' natural sort of (version) numbers within text, ls -v -d -1 */*.ft2 > ft2_files.lscat ft2_files.ls # So. -in 'test.tab' contains information about x,y positions in frequency units.# -out tells where to store file.# -list tells which ft2 files to compare.# -max takes the height.# -max -dx 1 -dy 1, takes the height within a freqency box of +/- 1 freqeuncy unit.seriesTab -in test.tab -out peaks_list_max_standard.ser -list ft2_files.ls -maxseriesTab -in test.tab -out peaks_list_max_dx1_dy1.ser -list ft2_files.ls -max -dx 1 -dy 1</source> == Extract time delays from procpar==<source lang="bash"># '^' look for line starting with. # Then take next line.# print from column 2 to end of line.set RELAXT=`awk '/^relaxT /{f=1;next}f{print $0;exit}' procpar | cut -d" " -f 2-`; echo $RELAXT set SFRQ=`awk '/^sfrq /{f=1;next}f{print $2;exit}' procpar`; echo $SFRQ</source> Now extract noise from spectrums<source lang="bash">set FIDS=`cat ft2_files.ls`set OUT=../apod_rmsd.txt foreach I (`seq 1 ${#FIDS}`) set FID=${FIDS[$I]}; set DIRN=`dirname $FID` cd $DIRN set apodrmsd=`showApod *.ft2 | grep "REMARK Automated Noise Std Dev in Processed Data:" | awk '{print $9}'` set RELAXTI=${RELAXT[$I]} echo $DIRN $RELAXTI $apodrmsd $SFRQ >> $OUT cd ..end cat apod_rmsd.txt</source> You should now a file with settings, which tell the delay time and spectrum noise for the measurements. <br>You also have a file, which have measured intensities for spins at each spectrum. == Analyse in relax == === In GUI ===<source lang="bash">gedit analyse_relax_gui.py</source> <source lang="python"># Create the spinsspectrum.read_spins(file="peaks_list_max_standard.ser", dir=None) # Read the spectrum from NMRSeriesTab file. The "auto" will generate spectrum name of form: Z_A{i}spectrum.read_intensities(file="peaks_list_max_standard.ser", dir=None, spectrum_id='auto', int_method='height') # Open the settings file.set_file = open('apod_rmsd.txt', 'r') for i, line in enumerate(set_file): # Set the current spectrum id current_id = "Z_A%s"%(i)  # Get the relax time. relaxT_i = float(line.split()[1]) rmsd_i = float(line.split()[2]) sfrq_i = float(line.split()[3])  print relaxT_i, rmsd_i, sfrq_i  # Set time relax_fit.relax_time(time=relaxT_i, spectrum_id=current_id)  # Set noise spectrum.baseplane_rmsd(error=rmsd_i, spectrum_id=current_id)  # Set sfrq spectrometer.frequency(id=current_id, frq=sfrq_i, units='MHz')</source> Then do# relax -g# New analysis# R2 relaxation# Create pipe# User functions (n-z) -> script -> analyse_relax_gui.py# Set in top '''NMR freqeuncy label''' to '''750'''.# Go === In GUI ===<source lang="bash">gedit analyse_relax.py</source> <source lang="python">from auto_analyses.relax_fit import Relax_fit # Taken from the relax disp manual, section 10.6.1 Dispersion script mode - the sample script# Create the data pipe.pipe_name = 'base pipe'pipe_bundle = 'RMA'pipe.create(pipe_name=pipe_name, bundle=pipe_bundle, pipe_type='relax_fit') # Create the spinsspectrum.read_spins(file="peaks_list_max_standard.ser", dir=None) # Read the spectrum from NMRSeriesTab file. The "auto" will generate spectrum name of form: Z_A{i}spectrum.read_intensities(file="peaks_list_max_standard.ser", dir=None, spectrum_id='auto', int_method='height') # Open the settings file.set_file = open('apod_rmsd.txt', 'r') for i, line in enumerate(set_file): # Set the current spectrum id current_id = "Z_A%s"%(i)  # Get the relax time. relaxT_i = float(line.split()[1]) rmsd_i = float(line.split()[2]) sfrq_i = float(line.split()[3])  print relaxT_i, rmsd_i, sfrq_i  # Set time relax_fit.relax_time(time=relaxT_i, spectrum_id=current_id)  # Set noise spectrum.baseplane_rmsd(error=rmsd_i, spectrum_id=current_id)  # Set sfrq spectrometer.frequency(id=current_id, frq=sfrq_i, units='MHz') Relax_fit(pipe_name=pipe_name, pipe_bundle=pipe_bundle, file_root='R2', results_dir=None, grid_inc=11, mc_sim_num=500, view_plots=False)</source> Run relax<source lang="bash">relax analyse_relax.py</source>