yingyu 5 лет назад
Родитель
Сommit
1de1106973
1 измененных файлов: 9 добавлений и 4 удалений
  1. +9
    -4
      RNAseq_6_enrichfunc.R

+ 9
- 4
RNAseq_6_enrichfunc.R Просмотреть файл

@@ -27,9 +27,12 @@ option_list <- list(
make_option(c("-q", "--qvalueCutoff"), type="double",default=0.2,metavar="number",
help="Cutoff value of q value. [default: 0.2]"),
make_option(c("-p", "--project_code"), type="character",default="rnaseq",
help="Project code, which is used as prefix of output file. [default: rnaseq]")
help="Project code, which is used as prefix of output file. [default: rnaseq]"),
make_option(c("-d", "--ref_rdata_dir"), type="character",default="./",
help="The directory of reference files: human_c2_v5p2.rdata, human_c5_v5p2.rdata and ID_convert_table.rds. [default: ./]")
)


# get command line options, if help option encountered print help and exit,
# otherwise if options not found on command line then set defaults,
opt <- parse_args(OptionParser(option_list=option_list))
@@ -51,10 +54,12 @@ gene<-read.csv(opt$input,header=T,stringsAsFactors=F)

message("Begin ID conversion.")

if(length(grep("ID_convert_table.rds",dir()))>0){
idconvert<-readRDS("ID_convert_table.rds")
refdir<-paste(gsub("/$","",opt$ref_rdata_dir),"/",sep="")

if(length(grep("ID_convert_table.rds",dir(refdir)))>0){
idconvert<-readRDS(paste(refdir,"ID_convert_table.rds",sep=""))
}else{
stop("Cannot find ID_convert_table.rds in the working folder. Exit!", call.=FALSE)
stop("Cannot find ID_convert_table.rds in the ref_rdata_dir. Exit!", call.=FALSE)
}

if(opt$type_gene_id=="EnsemblGID"){

Загрузка…
Отмена
Сохранить