############################################################################ # LICENSE INFO: # ############################################################################ # This file is part of CAMPARI. # # # # Version 5.0 # # # # Copyright (C) 2024, The CAMPARI development team (current and former # # contributors) # # Andreas Vitalis, Adam Steffen, Rohit Pappu, Hoang # # Tran, Albert Mao, Xiaoling Wang, Jose Pulido, # # Nicholas Lyle, Nicolas Bloechliger, Marco Bacci, # # Davide Garolini, Jiri Vymetal, Cassiano Langini, # # Alessia Del Panta, Francesco Cocina, Julian # # Widmer # # # # Website: http://sourceforge.net/projects/campari/ # # # # CAMPARI is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # CAMPARI is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with CAMPARI. If not, see . # ############################################################################ # AUTHORSHIP INFO: # ############################################################################ # # # MAIN AUTHOR: Andreas Vitalis # # # ############################################################################ # load the data dat <- read.table("CONTACTMAP.dat",skip=1) cmap <- array(0.0,dim(dat)) for (i in 1:(dim(dat)[1])) {cmap[i,(1:i)] <- as.double(dat[i,(1:i)]); } dev.new(width=15,height=7.5); layout(matrix(1:2,nrow=1,ncol=2),widths=c(7.5,7.5),heights=7.5) image(axes=FALSE,cmap,x=1:(dim(dat)[1]),y=1:(dim(dat)[1]),zlim=c(0,1),col=heat.colors(500)[seq(from=500,to=100,by=-1)],xlab='',ylab='',main='Linear scale') box() axis(side=1,tcl=-0.1,at=1:(dim(dat)[2]),labels=array("",c(dim(dat)[2]))) axis(side=2,tcl=-0.1,at=1:(dim(dat)[2]),labels=array("",c(dim(dat)[2]))) axis(side=1,tcl=0.,at=c(1,4,8,13.5,23.5),labels=c('EAM','HLY','AMP','K+','CL-'),cex.axis=1.2,padj=-1.) axis(side=2,tcl=0.,at=c(1,4,8,13.5,23.5),labels=c('EAM','HLY','AMP','K+','CL-'),cex.axis=1.2,padj=1.2) arrows(x0=c(-1,-1,-1,-1),x1=c(100,100,100,100),y0=c(1.5,6.5,8.5,18.5),y1=c(1.5,6.5,8.5,18.5),lty=3) arrows(y0=c(-1,-1,-1,-1),y1=c(100,100,100,100),x0=c(1.5,6.5,8.5,18.5),x1=c(1.5,6.5,8.5,18.5),lty=3) legend(x=1,y=(dim(dat)[2]),legend=c("0.00","0.25","0.50","0.75","1.00"),fill=heat.colors(500)[c(500,400,300,200,100)],bg='white') low_value = min(cmap[which(cmap > 0.0)]) image(axes=FALSE,log10(pmax(cmap,10^floor(log10(low_value)))),x=1:(dim(dat)[1]),y=1:(dim(dat)[1]),zlim=c(log10(low_value),0.0),col=heat.colors(abs(floor(log10(low_value)))*100+100)[seq(from=abs(floor(log10(low_value)))*100+100,to=100,by=-1)],xlab='',ylab='',main='Logarithmic scale') box() axis(side=1,tcl=-0.1,at=1:(dim(dat)[2]),labels=array("",c(dim(dat)[2]))) axis(side=2,tcl=-0.1,at=1:(dim(dat)[2]),labels=array("",c(dim(dat)[2]))) axis(side=1,tcl=0.,at=c(1,4,8,13.5,23.5),labels=c('EAM','HLY','AMP','K+','CL-'),cex.axis=1.2,padj=-1.) axis(side=2,tcl=0.,at=c(1,4,8,13.5,23.5),labels=c('EAM','HLY','AMP','K+','CL-'),cex.axis=1.2,padj=1.2) arrows(x0=c(-1,-1,-1,-1),x1=c(100,100,100,100),y0=c(1.5,6.5,8.5,18.5),y1=c(1.5,6.5,8.5,18.5),lty=3) arrows(y0=c(-1,-1,-1,-1),y1=c(100,100,100,100),x0=c(1.5,6.5,8.5,18.5),x1=c(1.5,6.5,8.5,18.5),lty=3) minil = floor(log10(low_value)) legend(x=1,y=(dim(dat)[2]),legend=sprintf("10^-%d",seq(abs(floor(log10(low_value))),0,-1)),fill=heat.colors(abs(floor(log10(low_value)))*100+100)[seq(abs(floor(log10(low_value)))*100+100,100,-100)],bg='white')