##annotation is from the fasta of each of the superfamilies' alignments. #num_1kko=3 #num_1n55=5 #num_3cwn=5 #num_3ch0=5 #num_1e15=5 num_1kko=c(1,3) num_1n55=c(2,3,4,5) num_3cwn=c(1,2,4,5) num_3ch0=c(1,2,3,5) num_1e15=c(1,3,4,5) beta_1kko=c(5,6,27,30,70,73,106,109,139,142,163,166,190,193,218,220) helix_1kko=c(14,23,44,62,86,102,116,135,147,158,167,188,200,215,227,247) catalytic_1kko=c(30,167) metal_1kko=c(74,109,143) substrate_1kko=c(8,165,196,197,220) phosp_1kko='' beta_1n55=c(7,11,38,42,60,64,91,94,123,128,163,167,208,212,231,234) helix_1n55=c(17,31,44,55,80,88,106,120,139,155,180,199,219,225,235,249) catalytic_1n55=c(11,13,96,168) phosp_1n55=c(174,214,235,236) substrate_1n55=c(172,173,213,233) metal_1n55='' beta_1e15=c(13,19,56,60,145,151,195,199,249,255,277,282,360,365,389,393) helix_1e15=c(42,54,103,140,173,192,200,240,257,274,341,351,371,385,410,424) catalytic_1e15=c(197,199,201,284) substrate_1e15=c(17,61,153,202,259,260,282,285,290,291,340,393) phosp_1e15='' metal_1e15='' beta_3ch0=c(26,29,58,65,164,169,214,218,235,240,270,273,293,294,319,322) helix_3ch0=c(44,56,148,160,187,202,221,232,257,263,276,290,306,317,325,330) catalytic_3ch0=c(31,76) phosp_3ch0=c(32,171) metal_3ch0=c(61,63,170) substrate_3ch0='' beta_3cwn=c(16,20,34,36,99,102,135,140,160,165,181,184,229,232,249,252) helix_3cwn=c(23,31,71,93,110,128,142,156,167,177,204,224,237,244,253,263) catalytic_3cwn=c(20,102,138,163) substrate_3cwn=c(38,161,183,185) phosp_3cwn=c(188,234,236) metal_3cwn='' plot_function<-function(name,num,number,fluct,conserved_fluct,v,v2,catalytic_annot,sub_annot,phosp_annot,metal_annot){ plot(fluct[,num],type="l",lty="dotted",ylim=c(0,1.5),col=1,xlab="") for (i in number) {points(fluct[,as.numeric(i)],type="l",lty="dotted",col="gray")} for (i in (number+1)) {points(conserved_fluct[,i],type="l",col="gray")} points(fluct[,num],type="l",lty="dotted") points(conserved_fluct[,num+1],type="l",col=1) rect(v[c(T,F)],array(-1,8),v[c(F,T)],array(5.5,8),border="transparent",col= '#FF003322') rect(v2[c(T,F)],array(-1,8),v2[c(F,T)],array(5.5,8),border="transparent",col='#00FF3322') abline(v=catalytic_annot,col="gold") #abline(v=sub_annot,col="darkolivegreen4") #abline(v=phosp_annot,col="aquamarine") #abline(v=metal_annot,col="firebrick1") #legend("topright",names(fluct),fill=1:number,cex=0.7) title(name, line=-2)} pdf("TIM_fluctuations_panels_fromhomologues_catonly_withsse.pdf",paper="a4r") par(mfrow=c(3,2)) par(oma=c(0,0,0,0)) par(mar=c(3.5,2,0.5,0)) f_1kko<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/1KKO_homologues.afasta_fluctuations.dat", header=TRUE,na.strings="nan",check.names=F) conserved_f_1kko<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/1KKO_homologues.afasta_fluctuations_conserved_profile.dat",header=TRUE, na.strings="nan",check.names=F) plot_function("1KKO",2,num_1kko,f_1kko,conserved_f_1kko,beta_1kko,helix_1kko,catalytic_1kko,substrate_1kko,phosp_1kko,metal_1kko) f_1n55<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/1N55_homologues.afasta_fluctuations.dat", header=TRUE,na.strings="nan",check.names=F) conserved_f_1n55<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/1N55_homologues.afasta_fluctuations_conserved_profile.dat",header=TRUE, na.strings="nan",check.names=F) plot_function("1N55",1,num_1n55,f_1n55,conserved_f_1n55,beta_1n55,helix_1n55,catalytic_1n55,substrate_1n55,phosp_1n55,metal_1n55) f_3cwn<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/3CWN_homologues.afasta_fluctuations.dat", header=TRUE,na.strings="nan",check.names=F) conserved_f_3cwn<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/3CWN_homologues.afasta_fluctuations_conserved_profile.dat",header=TRUE, na.strings="nan",check.names=F) plot_function("3CWN",3,num_3cwn,f_3cwn,conserved_f_3cwn,beta_3cwn,helix_3cwn,catalytic_3cwn,substrate_3cwn,phosp_3cwn,metal_3cwn) f_3ch0<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/3CH0_homologues.afasta_fluctuations.dat", header=TRUE,na.strings="nan",check.names=F) conserved_f_3ch0<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/3CH0_homologues.afasta_fluctuations_conserved_profile.dat",header=TRUE, na.strings="nan",check.names=F) plot_function("3CH0",4,num_3ch0,f_3ch0,conserved_f_3ch0,beta_3ch0,helix_3ch0,catalytic_3ch0,substrate_3ch0,phosp_3ch0,metal_3ch0) f_1e15<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/1E15_homologues.afasta_fluctuations.dat", header=TRUE,na.strings="nan",check.names=F) conserved_f_1e15<-read.table("/Users/sandhyatiwari/local/webnma.api/webnma.api/parts/scratch/1E15_homologues.afasta_fluctuations_conserved_profile.dat",header=TRUE, na.strings="nan",check.names=F) plot_function("1E15",2,num_1e15,f_1e15,conserved_f_1e15,beta_1e15,helix_1e15,catalytic_1e15,substrate_1e15,phosp_1e15,metal_1e15) dev.off()