Previous changeset 4:8bba31f628da (2018-03-04) Next changeset 6:7bd523ca1f9a (2018-07-18) |
Commit message:
planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit aff1790e25523d038a1e9528de748191c096132f |
modified:
w4mcorcov.xml w4mcorcov_calc.R w4mcorcov_input.R w4mcorcov_output.R w4mcorcov_util.R w4mcorcov_wrapper.R |
b |
diff -r 8bba31f628da -r 50f60f94c034 w4mcorcov.xml --- a/w4mcorcov.xml Sun Mar 04 14:51:42 2018 -0500 +++ b/w4mcorcov.xml Fri Mar 30 14:59:19 2018 -0400 |
b |
b'@@ -1,11 +1,23 @@\n-\xef\xbb\xbf<tool id="w4mcorcov" name="OPLS-DA_Contrasts" version="0.98.7">\n+\xef\xbb\xbf<tool id="w4mcorcov" name="OPLS-DA_Contrasts" version="0.98.8">\n \n <description>OPLS-DA Contrasts of Univariate Results</description>\n \n+ <macros>\n+ <xml name="paramPairSigFeatOnly">\n+\t\t\t<param\n+\t\t\t\tname="pairSigFeatOnly"\n+\t\t\t\ttype="boolean"\n+\t\t\t\tchecked="true"\n+\t\t\t\ttruevalue="TRUE"\n+\t\t\t\tfalsevalue="FALSE"\n+\t\t\t\tlabel="Retain only pairwise-significant features"\n+\t\t\t\thelp="When this option is set to \'Yes\', analysis will be performed including only features that differ significantly for the pair of levels being contrasted; when set to \'No\', any feature that varies significantly across all levels will be included (i.e., exclude any feature that is not significantly different across all levels). See examples below." />\n+ </xml>\n+\t</macros>\n+\n <requirements>\n <requirement type="package">r-batch</requirement>\n <requirement type="package">bioconductor-ropls</requirement>\n- <!-- <requirement type="package">r-foreach</requirement> -->\n </requirements>\n \n <stdio>\n@@ -17,13 +29,17 @@\n dataMatrix_in "$dataMatrix_in"\n sampleMetadata_in "$sampleMetadata_in"\n variableMetadata_in "$variableMetadata_in"\n- tesC "$tesC"\n facC "$facC"\n- pairSigFeatOnly "$pairSigFeatOnly"\n+ #if str( $signif_test.tesC ) == "none":\n+ tesC "none"\n+ pairSigFeatOnly "FALSE"\n+ #else:\n+ tesC "$signif_test.tesC"\n+ pairSigFeatOnly "$signif_test.pairSigFeatOnly"\n+ #end if\n levCSV \'$levCSV\'\n matchingC \'$matchingC\'\n labelFeatures \'$labelFeatures\'\n- labelOrthoFeatures \'$labelOrthoFeatures\'\n contrast_detail \'$contrast_detail\'\n contrast_corcov \'$contrast_corcov\'\n contrast_salience \'$contrast_salience\'\n@@ -34,21 +50,28 @@\n <param name="sampleMetadata_in" label="Sample metadata file" type="data" format="tabular" help="Samples x metadata (tabular data - decimal: \'.\'; missing: NA; mode: character or numerical; separator: tab character)" />\n <param name="variableMetadata_in" label="Variable metadata file (ideally from Univariate)" type="data" format="tabular" help="Features x metadata (tabular data - decimal: \'.\'; missing: NA; mode: character or numerical; separator: tab character)" />\n <param name="facC" label="Factor of interest" type="text" help="REQUIRED - The name of the column of sampleMetadata corresponding to the qualitative variable used to define the contrasts. Except when the \'Univariate Significance-test\' is set to \'none\', this also must be a portion of the column names in the variableMetadata file."/>\n- <param name="tesC" label="Univariate significance-test" type="select" help="Either \'none\' or the name of the statistical test that was run by the \'Univariate\' tool to produce the variableMetadata file; that name must also be a portion of the column names in that file.">\n- <option value="none">none - Display all features from variableMetadata (rather than choosing a subset based on significance in univariate testing)</option>\n- <option value="ttest">ttest - Student\'s t-test (parametric test, qualitative factor with exactly 2 levels)</option>\n- <option value="anova">anova - Analysis of variance (parametric test, qualitative factor with more than 2 levels)</option>\n- <option value="wilcoxon">wilcoxon - Wilcoxon rank test (nonparametric test, qualitative factor with exactly 2 levels)</option> \n- <option value="kruskal">kruskal - Kruskal-Wallis rank test (nonparametric test, qualitative factor with more than 2 levels)</option>\n- </param>\n- <param\n- name="pairSigFeatOnly"\n- type="boolean"\n- checked="true"\n- truevalue="TRUE"\n- falsevalue="FALSE"\n- label="Retain only pairwise-significant features"\n- help="When \'none\' is chosen as the test, all features are included in the analysis (i. e., this parameter is ignored). Otherwise, when this option is set to \'Yes\', analysis will be performed including o'..b' |\n +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+\n | Level-name matching | use regular expressions for matching level-names |\n +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+\n | Number of features having extreme loadings | 3 |\n +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+\n- | Label feat. having extreme orth. loadings | Yes |\n- +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+\n | Output primary table | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/test-data/expected_contrast_corcov_lohi.tsv |\n +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+\n | Output salience table | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/test-data/expected_contrast_salience_lohi.tsv |\n@@ -659,25 +651,29 @@\n Release notes\n -------------\n \n+0.98.8\n+\n+- new feature: Replace loadings plot with correlation-versus-covariance plot for orthogonal features, i.e., the consistency of features influencing within-treatment variation (which is linearly related to the loading of the orthogonal projection) versus consistency. This eliminates the need for the parameter to suppress labels for features with extreme orthogonal loadings\n+\n 0.98.7\n \n-- bug fix: handle case of a treatment level with only one sample.\n+- bug fix: Handle case of a treatment level with only one sample.\n \n 0.98.6\n \n-- bug fix: set \'crossvalI\' param (of R function \'ropls::opls\') to the number of samples when the there are fewer than seven samples.\n+- bug fix: Set \'crossvalI\' param (of R function \'ropls::opls\') to the number of samples when the there are fewer than seven samples.\n \n 0.98.5\n \n-- bug fix: fit feature-labels within clipping region of cor-vs.cov plot\n+- bug fix: Fit feature-labels within clipping region of cor-vs.cov plot\n - new feature: optionally (and by default) suppress labels for features with extreme orthogonal loadings\n \n 0.98.3\n \n-- add support for two-level factors\n-- add adjusted mz and rt to output tables\n-- allow explicitly setting the number of features with extreme loadings to be labelled on the correlation vs. covariance plot\n-- add loadings to corcov table\n+- Add support for two-level factors\n+- Add adjusted mz and rt to output tables\n+- Allow explicitly setting the number of features with extreme loadings to be labelled on the correlation vs. covariance plot\n+- Add loadings to corcov table\n \n 0.98.2\n \n@@ -686,6 +682,7 @@\n \n ]]></help>\n <citations>\n+ <!-- this tool -->\n <citation type="doi">10.5281/zenodo.1034784</citation>\n <!-- Galindo_Prieto_2014 Variable influence on projection (VIP) for OPLS -->\n <citation type="doi">10.1002/cem.2627</citation>\n@@ -719,6 +716,6 @@\n <citation type="doi">10.1021/ac0713510</citation>\n </citations>\n <!--\n- vim:noet:sw=4:ts=4\n+ vim:noet:sw=2:ts=2\n -->\n </tool>\n' |
b |
diff -r 8bba31f628da -r 50f60f94c034 w4mcorcov_calc.R --- a/w4mcorcov_calc.R Sun Mar 04 14:51:42 2018 -0500 +++ b/w4mcorcov_calc.R Fri Mar 30 14:59:19 2018 -0400 |
[ |
b'@@ -7,7 +7,7 @@\n #### OPLS-DA\n algoC <- "nipals"\n \n-do_detail_plot <- function(x_dataMatrix, x_predictor, x_is_match, x_algorithm, x_prefix, x_show_labels, x_show_loado_labels, x_progress = print, x_env, x_crossval_i) {\n+do_detail_plot <- function(x_dataMatrix, x_predictor, x_is_match, x_algorithm, x_prefix, x_show_labels, x_progress = print, x_env, x_crossval_i) {\n off <- function(x) if (x_show_labels == "0") 0 else x\n if ( x_is_match && ncol(x_dataMatrix) > 0 && length(unique(x_predictor))> 1 && x_crossval_i < nrow(x_dataMatrix) ) {\n my_oplsda <- opls(\n@@ -23,83 +23,140 @@\n my_oplsda_suppLs_y_levels <- levels(as.factor(my_oplsda@suppLs$y))\n fctr_lvl_1 <- my_oplsda_suppLs_y_levels[1]\n fctr_lvl_2 <- my_oplsda_suppLs_y_levels[2]\n- my_cor_vs_cov <- cor_vs_cov(\n- matrix_x = x_dataMatrix\n- , ropls_x = my_oplsda\n- )\n- with(\n- my_cor_vs_cov\n- , {\n- min_x <- min(covariance)\n- max_x <- max(covariance)\n- lim_x <- max(sapply(X=c(min_x, max_x), FUN=abs))\n- covariance <- covariance / lim_x\n- lim_x <- 1.2\n- main_label <- sprintf("%s for level %s versus %s", x_prefix, fctr_lvl_1, fctr_lvl_2)\n- main_cex <- min(1.0, 46.0/nchar(main_label))\n- # "It is generally accepted that a variable should be selected if vj>1, [27\xe2\x80\x9329],\n- # but a proper threshold between 0.83 and 1.21 can yield more relevant variables according to [28]."\n- # (Mehmood 2012 doi:10.1186/1748-7188-6-27)\n- vipco <- pmax(0, pmin(1,(vip4p-0.83)/(1.21-0.83)))\n- alpha <- 0.1 + 0.4 * vipco\n- red <- as.numeric(correlation > 0) * vipco\n- blue <- as.numeric(correlation < 0) * vipco\n- plus_cor <- correlation\n- plus_cov <- covariance\n- cex <- 0.75\n- plot(\n- y = plus_cor\n- , x = plus_cov\n- , type="p"\n- , xlim=c( -lim_x - off(0.2), lim_x + off(0.2) )\n- , ylim=c( -1.0 - off(0.2), 1.0 + off(0.2) )\n- , xlab = sprintf("relative covariance(feature,t1)")\n- , ylab = sprintf("correlation(feature,t1)")\n- , main = main_label\n- , cex.main = main_cex\n- , cex = cex\n- , pch = 16\n- , col = rgb(blue = blue, red = red, green = 0, alpha = alpha)\n+ do_s_plot <- function(parallel_x) {\n+ my_cor_vs_cov <- cor_vs_cov(\n+ matrix_x = x_dataMatrix\n+ , ropls_x = my_oplsda\n+ , parallel_x = parallel_x\n )\n- low_x <- -0.7 * lim_x\n- high_x <- 0.7 * lim_x\n- text(x = low_x, y = -0.05, labels = fctr_lvl_1, col = "blue")\n- text(x = high_x, y = 0.05, labels = fctr_lvl_2, col = "red")\n- if ( x_show_labels != "0" ) {\n- my_loadp <- loadp\n- my_loado <- loado\n- names(my_loadp) <- tsv1$featureID\n- names(my_loado) <- tsv1$featureID\n- if ( x_show_labels == "ALL" ) {\n- n_labels <- length(loadp)\n+ with(\n+ my_cor_vs_cov\n+ , {\n+ min_x <- min(covariance)\n+ max_x <- max(covariance)\n+ lim_x <- max(sapply(X=c(min_x, max_x), FUN=abs))\n+ covariance <- covariance / lim_x\n+ lim_x <- 1.2\n+ # "It is generally accepted that a variable should be selected if vj>1, [27\xe2\x80\x9329],\n+ # but a proper threshold between 0.83 and 1.21 can yield more relevant variables according to [28]."\n+ # (Mehmood 2012 doi:10.1186/1748-7188-6-27)\n+ plus_cor <- correlation\n+ plus_cov <- covariance\n+ cex <- 0.75\n+ which_projection <- if (projection == 1) "t1" else "o1"\n+ which_loading <- if (projection == 1) "parallel" else "orthogonal"\n+ if (projection == 1) {\n+ my_xlab <- "relative covariance(feature,t1)"\n+ my_x <- plus_cov\n+ my_ylab <- "correlation(feature,t1) [~ parallel loading]"\n+ my_y <- plus_cor\n+ my_xlim <- c( -lim_x - off(0.2), lim_x + off(0.2) )\n+ my_ylim '..b'500,18 +547,22 @@\n # Wiklund_2008 doi:10.1021/ac0713510\n # Galindo_Prieto_2014 doi:10.1002/cem.2627\n # https://github.com/HegemanLab/extra_tools/blob/master/generic_PCA.R\n-cor_vs_cov <- function(matrix_x, ropls_x) {\n+cor_vs_cov <- function(matrix_x, ropls_x, parallel_x = TRUE) {\n x_class <- class(ropls_x)\n if ( !( as.character(x_class) == "opls" ) ) { # || !( attr(class(x_class),"package") == "ropls" ) ) \n stop( "cor_vs_cov: Expected ropls_x to be of class ropls::opls but instead it was of class ", as.character(x_class) )\n }\n result <- list()\n+ result$projection <- projection <- if (parallel_x) 1 else 2\n # suppLs$algoC - Character: algorithm used - "svd" for singular value decomposition; "nipals" for NIPALS\n if ( ropls_x@suppLs$algoC == "nipals") {\n # Equations (1) and (2) from *Supplement to* Wiklund 2008, doi:10.1021/ac0713510\n mag <- function(one_dimensional) sqrt(sum(one_dimensional * one_dimensional))\n mag_xi <- sapply(X = 1:ncol(matrix_x), FUN = function(x) mag(matrix_x[,x]))\n- score_matrix <- ropls_x@scoreMN\n+ if (parallel_x)\n+ score_matrix <- ropls_x@scoreMN\n+ else\n+ score_matrix <- ropls_x@orthoScoreMN\n score_matrix_transposed <- t(score_matrix)\n score_matrix_magnitude <- mag(score_matrix)\n result$covariance <- score_matrix_transposed %*% matrix_x / ( score_matrix_magnitude * score_matrix_magnitude )\n@@ -520,7 +571,10 @@\n # WARNING - untested code - I don\'t have test data to exercise this branch\n # Equations (1) and (2) from Wiklund 2008, doi:10.1021/ac0713510\n # scoreMN - Numerical matrix of x scores (T; dimensions: nrow(x) x predI) X = TP\' + E; Y = TC\' + F\n- score_matrix <- ropls_x@scoreMN\n+ if (parallel_x)\n+ score_matrix <- ropls_x@scoreMN\n+ else\n+ score_matrix <- ropls_x@orthoScoreMN\n score_matrix_transposed <- t(score_matrix)\n cov_divisor <- nrow(matrix_x) - 1\n result$covariance <- sapply(\n@@ -540,8 +594,8 @@\n }\n )\n }\n- result$correlation <- result$correlation[1,,drop = TRUE]\n- result$covariance <- result$covariance[1,,drop = TRUE]\n+ result$correlation <- result$correlation[ 1, , drop = TRUE ]\n+ result$covariance <- result$covariance [ 1, , drop = TRUE ]\n \n # Variant 4 of Variable Influence on Projection for OPLS from Galindo_Prieto_2014\n # Length = number of features; labels = feature identifiers. (The same is true for $correlation and $covariance.)\n@@ -556,7 +610,6 @@\n feature_count <- length(ropls_x@vipVn)\n result$level1 <- rep.int(x = fctr_lvl_1, times = feature_count)\n result$level2 <- rep.int(x = fctr_lvl_2, times = feature_count)\n- # print(sprintf("sd(covariance) = %f; sd(correlation) = %f", sd(result$covariance), sd(result$correlation)))\n superresult <- list()\n if (length(result$vip4o) == 0) result$vip4o <- NA\n greaterLevel <- sapply( X = result$correlation, FUN = function(my_corr) if ( my_corr < 0 ) fctr_lvl_1 else fctr_lvl_2 )\n@@ -565,6 +618,7 @@\n , factorLevel1 = result$level1\n , factorLevel2 = result$level2\n , greaterLevel = greaterLevel\n+ , projection = result$projection\n , correlation = result$correlation\n , covariance = result$covariance\n , vip4p = result$vip4p\n@@ -574,6 +628,7 @@\n , row.names = NULL\n )\n rownames(superresult$tsv1) <- superresult$tsv1$featureID\n+ superresult$projection <- result$projection\n superresult$covariance <- result$covariance\n superresult$correlation <- result$correlation\n superresult$vip4p <- result$vip4p\n@@ -581,7 +636,6 @@\n superresult$loadp <- result$loadp\n superresult$loado <- result$loado\n superresult$details <- result\n- # #print(superresult$tsv1)\n result$superresult <- superresult\n # Include thise in case future consumers of this routine want to use it in currently unanticipated ways\n result$oplsda <- ropls_x \n@@ -589,4 +643,4 @@\n return (superresult)\n }\n \n-\n+# vim: sw=2 ts=2 et :\n' |
b |
diff -r 8bba31f628da -r 50f60f94c034 w4mcorcov_input.R --- a/w4mcorcov_input.R Sun Mar 04 14:51:42 2018 -0500 +++ b/w4mcorcov_input.R Fri Mar 30 14:59:19 2018 -0400 |
[ |
@@ -36,7 +36,7 @@ my_failure_action( sprintf("bad parameter xcms_data_type '%s'", xcms_data_type) ) return ( FALSE ) } - if ( is.character(xcms_data_in) ){ + if ( is.character(xcms_data_in) ) { # case: xcms_data_in is a path to a file xcms_data_input_env <- read_data_frame( xcms_data_in, sprintf("%s input", xcms_data_type) ) if (!xcms_data_input_env$success) { @@ -44,30 +44,6 @@ return ( FALSE ) } return ( xcms_data_input_env$data ) - # commenting out pasted code that is not tested here - # } else if ( is.data.frame(xcms_data_in) || is.matrix(xcms_data_in) ) { - # # case: xcms_data_in is a data.frame or matrix - # return(xcms_data_in) - # } else if ( is.list(xcms_data_in) || is.environment(xcms_data_in) ) { - # # NOTE WELL: is.list succeeds for data.frame, so the is.data.frame test must appear before the is.list test - # # case: xcms_data_in is a list - # if ( ! exists(xcms_data_type, where = xcms_data_in) ) { - # my_failure_action(sprintf("%s xcms_data_in is missing member '%s'"), ifelse(is.environment(xcms_data_in),"environment","list"), xcms_data_type) - # return ( FALSE ) - # } - # prospect <- getElement(name = xcms_data_type, object = xcms_data_in) - # if ( ! is.data.frame(prospect) && ! is.matrix(prospect) ) { - # utils::str("list - str(prospect)") - # utils::str(prospect) - # if ( is.list(xcms_data_in) ) { - # my_failure_action(sprintf("the first member of xcms_data_in['%s'] is neither a data.frame nor a matrix but is a %s", xcms_data_type, typeof(prospect))) - # } else { - # my_failure_action(sprintf("the first member of xcms_data_in$%s is neither a data.frame nor a matrix but is a %s", xcms_data_type, typeof(prospect))) - # } - # return ( prospect ) - # } - # # stop("stopping here for a snapshot") - # return ( prospect ) } else { # case: xcms_data_in is invalid my_failure_action( sprintf("xcms_data_in has unexpected type %s", typeof(xcms_data_in)) ) |
b |
diff -r 8bba31f628da -r 50f60f94c034 w4mcorcov_output.R --- a/w4mcorcov_output.R Sun Mar 04 14:51:42 2018 -0500 +++ b/w4mcorcov_output.R Fri Mar 30 14:59:19 2018 -0400 |
b |
@@ -0,0 +1,77 @@ + +# turn off all plotting devices +dev.off.all <- function() { + while (!is.null(dev.list())) { dev.off() } +} + +# capture plot and write to PDF; then close any devices opened in the process +plot2pdf <- function( + file.name +, plot.function +, width = 12 +, height = 12 +) { + # capture plot and write to PDF + cur.dev <- dev.list() + filename <- file.name + pdf(file = filename, width = width, height = height) + plot.function() + # close any devices opened in the process + dev.off() + if (is.null(cur.dev)) { + dev.off.all() + } else { + while ( length(dev.list()) > length(cur.dev) ) { dev.off() } + } +} + +# print and capture plot and write to PDF; then close any devices opened in the process +# This is needed for ggplot which does not print the plot when invoked within a function. +print2pdf <- function( + file.name +, plot.function +, width = 12 +, height = 12 +) { + plot2pdf( + file.name = file.name + , width = width + , height = height + , plot.function = function() { + print(plot.function()) + } + ) +} + +iso8601.znow <- function() +{ + strftime(as.POSIXlt(Sys.time(), "UTC"), "%Y-%m-%dT%H:%M:%SZ") +} + +# pdf.name <- function(name) +# { +# paste0(name, "_", iso8601.filename.fragment(), ".pdf") +# } +# +# tsv.name <- function(name) +# { +# paste0(name, "_", iso8601.filename.fragment(), ".tsv") +# } +# + +tsv_action_factory <- function(file, colnames, append) { + return ( + function(tsv) { + write.table( + x = tsv + , file = file + , sep = "\t" + , quote = FALSE + , row.names = FALSE + , col.names = colnames + , append = append + ) + } + ) +} + |
b |
diff -r 8bba31f628da -r 50f60f94c034 w4mcorcov_util.R --- a/w4mcorcov_util.R Sun Mar 04 14:51:42 2018 -0500 +++ b/w4mcorcov_util.R Fri Mar 30 14:59:19 2018 -0400 |
b |
@@ -21,66 +21,8 @@ return (retval) } -# turn off all plotting devices -dev.off.all <- function() { - while (!is.null(dev.list())) { dev.off() } -} - -# capture plot and write to PDF; then close any devices opened in the process -plot2pdf <- function( - file.name -, plot.function -, width = 12 -, height = 12 -) { - # capture plot and write to PDF - cur.dev <- dev.list() - filename <- file.name - pdf(file = filename, width = width, height = height) - plot.function() - # close any devices opened in the process - dev.off() - if (is.null(cur.dev)) { - dev.off.all() - } else { - while ( length(dev.list()) > length(cur.dev) ) { dev.off() } - } -} -# print and capture plot and write to PDF; then close any devices opened in the process -# This is needed for ggplot which does not print the plot when invoked within a function. -print2pdf <- function( - file.name -, plot.function -, width = 12 -, height = 12 -) { - plot2pdf( - file.name = file.name - , width = width - , height = height - , plot.function = function() { - print(plot.function()) - } - ) -} - -iso8601.znow <- function() -{ - strftime(as.POSIXlt(Sys.time(), "UTC"), "%Y-%m-%dT%H:%M:%SZ") -} - -# pdf.name <- function(name) -# { -# paste0(name, "_", iso8601.filename.fragment(), ".pdf") -# } -# -# tsv.name <- function(name) -# { -# paste0(name, "_", iso8601.filename.fragment(), ".tsv") -# } -# -# # pseudo-inverse - computational inverse non-square matrix a +# # pseudo-inverse - computational inverse of non-square matrix a # p.i <- function(a) { # solve(t(a) %*% a) %*% t(a) # } |
b |
diff -r 8bba31f628da -r 50f60f94c034 w4mcorcov_wrapper.R --- a/w4mcorcov_wrapper.R Sun Mar 04 14:51:42 2018 -0500 +++ b/w4mcorcov_wrapper.R Fri Mar 30 14:59:19 2018 -0400 |
[ |
@@ -63,7 +63,6 @@ my_env$contrast_detail <- as.character(argVc["contrast_detail"]) my_env$contrast_corcov <- as.character(argVc["contrast_corcov"]) my_env$contrast_salience <- as.character(argVc["contrast_salience"]) -# print(sprintf("contrast_salience: %s", my_env$contrast_salience)) # other parameters @@ -73,7 +72,6 @@ my_env$levCSV <- as.character(argVc["levCSV"]) my_env$matchingC <- as.character(argVc["matchingC"]) my_env$labelFeatures <- as.character(argVc["labelFeatures"]) # number of features to label at each extreme of the loadings or 'ALL' -my_env$labelOrthoFeatures <- as.logical(argVc["labelOrthoFeatures"]) label_features <- my_env$labelFeatures labelfeatures_check <- TRUE @@ -93,22 +91,6 @@ quit(save = "no", status = 10, runLast = TRUE) } -tsv_action_factory <- function(file, colnames, append) { - return ( - function(tsv) { - write.table( - x = tsv - , file = file - , sep = "\t" - , quote = FALSE - , row.names = FALSE - , col.names = colnames - , append = append - ) - } - ) -} - corcov_tsv_colnames <- TRUE corcov_tsv_append <- FALSE corcov_tsv_action <- function(tsv) { |