aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Kabui2022-02-01 00:30:44 +0300
committerBonfaceKilz2022-02-02 10:59:34 +0300
commitc315d3dcc67f9cbde7bef79845cc47bed0fc2b88 (patch)
treec9c1808eab0066768a508e55a8367f6384b6050b /scripts
parentcef01360b03c433145d05ed19eb21ec6e770eb5d (diff)
downloadgenenetwork3-c315d3dcc67f9cbde7bef79845cc47bed0fc2b88.tar.gz
remove comments
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ctl_analysis.R13
1 files changed, 2 insertions, 11 deletions
diff --git a/scripts/ctl_analysis.R b/scripts/ctl_analysis.R
index 9d27ffe..e06ac25 100644
--- a/scripts/ctl_analysis.R
+++ b/scripts/ctl_analysis.R
@@ -5,8 +5,6 @@ library(rjson)
options(stringsAsFactors = FALSE);
-# The genotypes.csv file containing the genotype matrix is stored individuals (rows) x genetic marker (columns):
-
args = commandArgs(trailingOnly=TRUE)
imgDir = Sys.getenv("GENERATED_IMAGE_DIR")
@@ -14,7 +12,7 @@ imgDir = Sys.getenv("GENERATED_IMAGE_DIR")
if (length(args)==0) {
stop("Argument for the data file", call.=FALSE)
} else {
- # default output file
+
json_file_path = args[1]
}
@@ -48,14 +46,8 @@ geno_matrix = t(matrix(unlist(genoData$genotypes),
pheno_matrix = t(matrix(as.numeric(unlist(phenoData$traits)), nrow=length(phenoData$trait_db_list), ncol=length(
phenoData$individuals), dimnames= list(phenoData$trait_db_list, phenoData$individuals), byrow=TRUE))
-# # Use a data frame to store the objects
-
-
ctls <- CTLscan(geno_matrix,pheno_matrix,nperm=input$nperm,strategy=input$strategy,parametric=parametric,nthreads=3,verbose=TRUE)
-
-
-# # same function used in a different script:refactor
genImageRandStr <- function(prefix){
randStr <- paste(prefix,stri_rand_strings(1, 9, pattern = "[A-Za-z0-9]"),sep="_")
@@ -78,13 +70,12 @@ ctl_significant <- CTLsignificant(ctls,significance = input$significance)
colnames(ctl_significant) = c("trait","marker","trait_2","LOD","dcor")
-# # Create the lineplot
-
imageLoc = file.path(input$imgDir,genRandomFileName("CTLline"))
png(imageLoc,width=1000,height=600,type='cairo-png')
+# Create the lineplot
ctl.lineplot(ctls,significance = input$significance, gap = 50,
col = "orange", bg.col = "lightgray", cex = 1, verbose = FALSE)