123456789101112131415 |
- library(mclust)
- args<- commandArgs(TRUE)
- chrf<-args[1]
- num<- 5
- num<- ifelse(is.na(args[2]),num,args[2])
- chr.data<-read.table(file=chrf,sep="\t",row.names=1,header=TRUE,comment.char='')
- xydata<-chr.data[,1:2]
- samples<-row.names(xydata)
- xymod<- Mclust(xydata,num)
- pdf(file="FMBY2_chrXY_class.pdf")
- plot(xymod, what = "classification")
- dev.off()
- nclass<-which.max(table(xymod$classification))
- refs<-samples[xymod$classification==nclass]
- write.table(file="M.ref.list",refs,quote=FALSE,row.names=FALSE,col.names=FALSE)
|