R/getClinicalDataMatrix.R

Defines functions getClinicalDataMatrix

Documented in getClinicalDataMatrix

#' get matrix with clinical from file
#' @usage getClinicalDataMatrix()
#' @export
#' @return dataframe of clinicaldata
#' @examples 
#' load(paste(path.package("canceR"),"/data/brca_tcga73genes.RData", sep=""))
#' \dontrun{
#' getClinicalDataMatrix()
#' }
getClinicalDataMatrix <- function(){
 
    Sys.chmod(getwd(), mode = "0777", use_umask = TRUE)
    if(exists("ClinicalDataMatrixfile", envir = myGlobalEnv)){
        rm(myGlobalEnv$ClinicalDataMatrixfile)
    }
    myGlobalEnv$ClinicalDataMatrixfile <- tclvalue(tkgetOpenFile(filetypes = "{{txt Files} {.txt}} {{All files} *}", title="Choose Gene Expression Matrix from File")) 
    
    if (!nchar(myGlobalEnv$ClinicalDataMatrixfile)) {
        tkmessageBox(message = "No file was selected!")
    } else {
        Sys.chmod(getwd(), mode = "0777", use_umask = TRUE)
        myGlobalEnv$ClinicalData<-read.table(myGlobalEnv$ClinicalDataMatrixfile)
       
        tkmessageBox(message = paste("The file selected was", myGlobalEnv$ClinicalDataMatrixfile))
        tkfocus(ttMain)
    }
    
}
Bioconductor-mirror/canceR documentation built on June 1, 2017, 5:24 a.m.