# 1 level Makefile # # this is makefile for processing of triple resonance spectra from an FID recorded in the nonlinear sampling mode (NLS) in Vnmr (Varian Inc.) # # # installations: 'nmrPipe' is assumed to be preinstalled separately, # 'bin' (with programs'mddnmr1.2c' and 'pros') must be also in the path # # for each spectrum make a working directory, where you copy this 'Makefile' from bin directory # set range in direct dimension 1HN in ppm RANGEH = 8.82 9.57 # the FIDDIR directory is assumed to be in the upper dirrectory, e.g. '../fid' # then command 'make data' processes '$FIDDIR/fid' with '$FIDDIR/proc/fidSP.com' (calling nmrPipe) and result put into $DATDIR/F???.DAT # below specify paths to these two dirs $FIDDIR $DATDIR (change fidSP.com if these directories are not in the upper directory) # # # below are 5 names to be specified by the user, most other options could be left as defaults # EXPNAME is the common name of the fid and data directories EXPNAME = ubi_ghnco_3d_600Y FIDDIR = ../$(EXPNAME).fid DATDIR = ../$(EXPNAME).data # ROOT is common name of files *.in and *.hdr_3 ROOT = ghnco INFILE = ${FIDDIR}/$(ROOT).in INDEXFILE = ${FIDDIR}/$(ROOT).hdr_3 TABFILE = ../ubi_nhsqc_600Y.fid/hsqc2d.tab # TABFILE contains name of the ipeak list file with HN peaks, which are used for estimation of number of components in all triple-resonance experiments. # it is assumed to be supplied by the user and can be any file with HN ppm values in the specified colomn . # in this example it is nmrDraw generated tab file of 2D HSQC-TROSY. # below set are the number of colomns for the amide proton ppm values, and the number of lines to skip in the file (7 and 6 in the usual nmrDraw file) before first peak line. TABCOLOMN= 7 TABLINESKIP=6 # usable are 3d or 2d peak lists, or a constant (below) # TABFILE = 30 # uncomment this line, in this case colomn and skip are any (in many cases it could be adequate approximation, but it is recommended to use the peak list; otherwise the constant must be the max number for all regions.) # So, this 'Makefile', plus $INFILE about sparse sampling indices and optional $TABFILE with some peaks, are all what is needed to do 'make all' command; # this can be done already at this point. # General comments: # this makefile will call several shell scripts , which contain a number of default parameters in them, which should work for most cases as is. # (optionally any of the *.sh files could be copyed into the working directory if any user modification or non-default behavior is needed.) # # For example, to change default nmrPipe processing : # after MDD reconstructions are done , pipe processing script 'conv_yz.com' is called from 'process.sh' (making FT in two indirect dimensions) # the default scripts (from the path) are used if no 'conv_yz.com' is found in the current dir # in the latter ('conv_yz.com') # default pipe processing is: SP=sine2, zero filling to twice,FT, 0 0 indirect phases 1,2 with 1st point c=0.5 for f180=n, and -90 180 with 1st point 1.0 for f180=y # (optionally: copy both 'process.sh' and 'conv_yz.com' to the current dir and modify these two for specific processing) # # This are for files other than HNCO : set multiplier for peaks counting in relation to 1 HN peak in HNCO (e.g. 2 for HNCA, 4 for HNCACB ...) HNSTRIP = 1 # Below are if several intermediate steps (here called TA) are needed, to use all sparse data set 1 and 1. # optional: number of TA calculation steps NTASTEPS = 1 # optional: number of TA processing steps NTALAST = 1 ############################################################################################### # END OF Header section (do not have to make changes below) # # these are fixed (for now) working dir names for intermediate files CURDIR = `pwd` # mdds - for mdd files # proc - for processed spectra in nmrpipe format, they are numbered by ta steps # ress - for results of mdd calculations # runs - for regions mddcalcs shell files # tabs - for peak tables # temp - for all other temporary files # logs - for logs SUBDIRS = mdds proc ress runs tabs temp logs # optional: it is usually Y OPTION = Y # this make "all" can work fine in easy cases (on a single CPU) all: infiles calcs runmdds specs # at this point, with only the Makefile in the current dir you can type 'make all' and after some time (from minutes to a few hours) there should be processed spectra in the 'proc' directory . # if the mdd processing is done on a cluster use make-target "allcluster" , here instead of 'calcruns' it makes 'pack' allcluster: infiles calcs pack echo "after all 'runs/run???.sh' completed, import back all the dirs that were exported (now with completed results and logs), untar them in the current directory and type 'make process' " infiles: $(INFILE) ${FIDDIR}/$(ROOT).hdr_1 data calcs: maketempdirs calchdrs calcruns calcmdds #pack4cluster pack: runs/run001.sh mdds/ae001.mdd tar cvf $(EXPNAME).tar runs mdds ress logs; compress $(EXPNAME).tar ; ls -la $(EXPNAME).tar.Z; \ echo "copy this tar to the cluster and run the shells 'runs/run???.sh' in parallel on a cluster "; # $INFILE is created before in vnmr sparse expt # it and its files containing sparse indices should be in $FIDDIR # note that in the $INFILE the dimension order is for example "C,N,Hdir" (i.e. Hdir is last), the other two dims: fast experiment dim is first, in this case "C" ${FIDDIR}/$(ROOT).hdr_1: $(INFILE) ${FIDDIR}/$(ROOT).hdr_3 cd $(FIDDIR); runspheader.sh $(INFILE) ${FIDDIR}/$(ROOT).hdr_3; cd $(CURDIR); refdata: echo " " >> $(FIDDIR)/proc/fidSP.com; $(FIDDIR)/proc/fidSP.com 6.0 10.5 $(EXPNAME) R 0.0 conv_yz.com $(DATDIR) R R 0.5 32 64 0 0 0.5 64 128 0 0; dat2pipe.com $(DATDIR) tRR rm $(DATDIR)/*R???.DAT # $DATDIR/F???.DAT are transposed so that direct dimension is in Z; only direct dim is FT-ed, the other two dims are in time domain data: $(DATDIR)/F001.DAT echo " " >> $(FIDDIR)/proc/fidSP.com; $(DATDIR)/F001.DAT: $(FIDDIR)/fid $(FIDDIR)/proc/fidSP.com $(RANGEH) $(EXPNAME) F 0.0 # this could be done once or every time maketempdirs: for i in $(SUBDIRS); do \ if [ -e $$i ]; then echo "exists " $$i ; else echo "making " $$i ; mkdir $$i; fi; \ done; \ echo "options: $(DATDIR) $(FIDDIR) $(INFILE) $(NTASTEPS) $(NTALAST) $(OPTION) $(HNSTRIP) $(TABFILE)"; \ echo "Initialization complete " calchdrs: $(INFILE) processNall.sh "calcHDRs" $(DATDIR) $(FIDDIR) $(INFILE) $(NTASTEPS) $(NTALAST) $(OPTION) $(HNSTRIP) $(TABFILE) $(TABCOLOMN) $(TABLINESKIP) calcmdds: $(INFILE) data processNall.sh "calcMDDs" $(DATDIR) $(FIDDIR) $(INFILE) $(NTASTEPS) $(NTALAST) $(OPTION) $(HNSTRIP) $(TABFILE) $(TABCOLOMN) $(TABLINESKIP) calcruns: $(INFILE) data processNall.sh "calcRUNs" $(DATDIR) $(FIDDIR) $(INFILE) $(NTASTEPS) $(NTALAST) $(OPTION) $(HNSTRIP) $(TABFILE) $(TABCOLOMN) $(TABLINESKIP) runmdds: runmdds.sh echo "start MDD calculation for all $$nregs regions; ...."; cat runs/nreg_pk_comp.txt; runmdds.sh echo "finished MDD calculation for all regions"; specs: $(INFILE) ress/res001001.dat process.sh "procSpecs" $(DATDIR) $(FIDDIR) $(INFILE) $(NTASTEPS) $(NTALAST) $(OPTION) $(HNSTRIP) $(TABFILE) # optional: sometimes used to make intermediate reconstruction to 3dims calcres3: ress/res001001.dat processNall.sh "calcRes3" $(DATDIR) $(FIDDIR) $(INFILE) $(NTASTEPS) $(NTALAST) $(OPTION) $(HNSTRIP) $(TABFILE) $(TABCOLOMN) $(TABLINESKIP) #mddnmr: main.c # g77 main.c -LLIB -lutils -lalapack -lablas -o mddnmr .c.o: $(CC) -c $< clean: rm -f tmp?* _*.gawk temp/[rnbtTS]???* echo "clean complete " purge: clean rm -f temp/* tmp* ; echo "ok"