小弟新学R,求助
Args<-commandArgs();
len<-length(Args);
if(len !=11)
{
stop(paste("Usage:Rscript",program_name,"<totalFUR><totalFGC><totalMUR><totalMGC><total_integration><outdir>"));
}
FUR<-read.table(Args[6],header=F,na.strings="NA")
FGC<-read.table(Args[7],header=F,na.strings="NA")
MUR<-read.table(Args[8],header=F,na.strings="NA")
MGC<-read.table(Args[9],header=F,na.strings="NA")
total<-read.table(Args[10],header=F,na.strings="NA")
#out_path<-Args[11]
#male_num<-(match(total[,2],"male"))
#female_num<-!is.na(match(total[,2],"female"))
#print(male_num)
male<-total[total[,2]=="male",]
female<-total[total[,2]=="female",]
fgc<-t(FGC[10:33,])
fur<-t(FUR[10:33,])
mgc<-t(MGC[10:33,])
mur<-t(MUR[10:33,])
sfur<-female[,3:26]
sfgc<-female[,27:50]
smur<-male[,3:26]
smgc<-male[,27:50]
print (sfgc)
afgc<-rbind(fgc,sfgc)
fur<-rbind(fur,sfur)
mgc<-rbind(mgc,smgc)
mur<-rbind(mur,smur)
chr.name=c("chr1","chr2","chr3","chr4","chr5","chr6","chr7","chr8","chr9","chr10","chr11","chr12","chr13","chr14","chr15","chr16","chr17","chr18","chr19","chr20","chr21","chr22","chrX","chrY")
pdf(paste(Args[11],"/Furgc.pdf",sep=""),width=8,height=6)
par(mfrow=c(4,6),mar= c(2.7,2 ,1,1),oma=c(2,2,2,2))
for(i in 1:24){
|