Created
January 15, 2014 18:00
-
-
Save grassa/8441084 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/Rscript | |
args <- commandArgs(trailingOnly = TRUE) | |
lg<-args[1] | |
infile<-args[2] | |
assembly<-args[3] | |
bpmax<-as.integer(args[4]) | |
genesinfile<-args[5] | |
pngout<-paste(infile,".genes.png",sep="") | |
header<-paste(lg,"",sep="\n") | |
dat<-read.table(infile,head=T) | |
genesdat<-read.table(genesinfile,head=T) | |
attach(dat) | |
attach(genesdat) | |
png(pngout,units="in", width=14, height=14, res=300) | |
par(bg = "transparent") | |
#plot(cM,position_end,xlim=c(0,100),ylim=c(0,bpmax),xlab="cM",ylab="bp",main=header) | |
plot(cM,position_end,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=2,col="#00A0FF0A") | |
segments(0,0,-2,0,col="white") | |
segments(0,(max(position_end)),-2,(max(position_end)),col="white") | |
segments(-1,0,-1,(max(position_end)),col="white") | |
segments(0,0,0,(-2750000*2),col="white") | |
segments((max(cM)),0,(max(cM)),(-2750000*2),col="white") | |
segments(0,-2750000,(max(cM)),-2750000,col="white") | |
opar <- par(new = TRUE) | |
plot(cM,position_end,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=0.3,col="#45FBFE") | |
apar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Leaves_IAA6_RPKM*0.001),col="#F7313132") | |
bpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Leaves_Bra6_RPKM*0.001),col="#F7842932") | |
cpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Ligule_RPKM*0.001),col="#FBFD0032") | |
dpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Bract_RPKM*0.001),col="#4AA57B32") | |
epar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Pollen_RPKM*0.001),col="#4AFF2932") | |
fpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Seed_RPKM*0.001),col="#4AEFF732") | |
gpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Stamen_RPKM*0.001),col="#1842F732") | |
hpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Style_RPKM*0.001),col="#5BB5FF32") | |
ipar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Stem_RPKM*0.001),col="#A573F732") | |
jpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Corolla_RPKM*0.001),col="#E7ADF732") | |
kpar <- par(new = TRUE) | |
plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(Ha_XRQ_Roots_PEG6_RPKM*0.001),col="#EF52F732") | |
par(opar) | |
par(apar) | |
par(bpar) | |
par(cpar) | |
par(dpar) | |
par(epar) | |
par(fpar) | |
par(gpar) | |
par(hpar) | |
par(ipar) | |
par(jpar) | |
par(kpar) | |
dev.off() | |
#[1] "#F731310A" | |
#[1] "#F73131" | |
#"#F731310A" | |
#"#F784290A" | |
#"#FBFD000A" | |
#"#4AFF290A" | |
#"#4AA57B0A" | |
#"#4AEFF70A" | |
#"#1842F70A" | |
#"#5BB5FF0A" | |
#"#A573F70A" | |
#"#E7ADF70A" | |
#"#EF52F70A" | |
#"#F4CC270A" | |
# "#F4CC270A" | |
#plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(log((Ha_XRQ_Seed_RPKM*0.01))),col="green") | |
#plot(centiMorgans,End,xlim=c(-25,100),ylim=c(-75000000,275000000),xlab="cM",ylab="bp",main=lg, pch=20,cex=(log((Ha_XRQ_Seed_RPKM*0.001))),col="green") |
Author
grassa
commented
Jan 16, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment