Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions DISH/DISH.r
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ start = Sys.time()
print("reading arguments...")
args = commandArgs(TRUE)
argsLen <- length(args)
if (argsLen > 7) stop('error: You added too many arguments - usage: Rscript DISH.v2.r input_file MAF ethnicity(European/Asian) output')
if (argsLen < 6) stop('error: You need more auguments. check the usage - usage: Rscript DISH.v2.r input_file MAF ethnicity(European/Asian) output')
if (argsLen > 8) stop('error: You added too many arguments - usage: Rscript DISH.v2.r input_file input_type hg_version ethnicity MAF_threshold stat_type output (lambda)')
if (argsLen < 7) stop('error: You need more auguments. check the usage - usage: Rscript DISH.v2.r input_file input_type hg_version ethnicity MAF_threshold stat_type output (lambda)')

study_map_file = args[1]
if(!file.exists(study_map_file)){stop('error: The incorrect path of your input file')}
Expand Down Expand Up @@ -77,7 +77,8 @@ if(hg_ver == "hg18"){
## Check & Read the user defined input file
print("reading your input file...")
if(input_type=="T"){
study_map = complete.cases(read.table(study_map_file, header=T, sep="\t", stringsAsFactors=F))
data <- read.table(study_map_file, header=T, sep="\t", stringsAsFactors=F)
study_map <- data[complete.cases(data),]
}else if(input_type=="P"){
print("Merge your .frq file with your statistics information")
Ffile = read.table(pasete0(study_map_file,".frq",collapse=NULL), header=T,stringsAsFactors=F)
Expand Down