Browse Source

上传文件至 ''

master
yingyu 5 years ago
parent
commit
1de1106973
1 changed files with 9 additions and 4 deletions
  1. +9
    -4
      RNAseq_6_enrichfunc.R

+ 9
- 4
RNAseq_6_enrichfunc.R View File

make_option(c("-q", "--qvalueCutoff"), type="double",default=0.2,metavar="number", make_option(c("-q", "--qvalueCutoff"), type="double",default=0.2,metavar="number",
help="Cutoff value of q value. [default: 0.2]"), help="Cutoff value of q value. [default: 0.2]"),
make_option(c("-p", "--project_code"), type="character",default="rnaseq", 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, # get command line options, if help option encountered print help and exit,
# otherwise if options not found on command line then set defaults, # otherwise if options not found on command line then set defaults,
opt <- parse_args(OptionParser(option_list=option_list)) opt <- parse_args(OptionParser(option_list=option_list))


message("Begin ID conversion.") 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{ }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"){ if(opt$type_gene_id=="EnsemblGID"){

Loading…
Cancel
Save