# HG changeset patch # User eschen42 # Date 1515720134 18000 # Node ID f1eabb5973b1924c0f58256cc73747befb2e3163 # Parent ae791fe4fbe96e8a5d0827731d9c5ba09172360c planemo upload for repository https://github.com/HegemanLab/w4mclassfilter_galaxy_wrapper/tree/master commit 08a878ac05ac0c05eafac27b9ebaadb88ae21eb7 diff -r ae791fe4fbe9 -r f1eabb5973b1 w4mclassfilter.xml --- a/w4mclassfilter.xml Thu Sep 07 17:32:09 2017 -0400 +++ b/w4mclassfilter.xml Thu Jan 11 20:22:14 2018 -0500 @@ -1,10 +1,11 @@ - + Filter W4M data by sample class - r-base + + r-base r-batch - w4mclassfilter + w4mclassfilter @@ -22,6 +23,7 @@ wildcards '$wildcards' classnameColumn '$classnameColumn' samplenameColumn '$samplenameColumn' + variable_range_filter '$variable_range_filter' dataMatrix_out '$dataMatrix_out' sampleMetadata_out '$sampleMetadata_out' variableMetadata_out '$variableMetadata_out' @@ -56,8 +58,8 @@ + - @@ -66,6 +68,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -436,6 +464,10 @@ | '``filter-out``' - exclude only the named sample classes | +Variable-range filters (default = no filters) + | comma-separated names of variable-range filters (see 'Variable-range filters' below) + | + ------------ @@ -512,6 +544,26 @@ - '``^[A-Z][A-Z]*[0-9][0-9]$``' - NO MATCH - the name does not end with the pattern '``[A-Z][0-9][0-9]$``', i.e., it ends with four digits, not two. - '``^[A-Z][0-9]*$``' - NO MATCH - the pattern specifies that second character and all those that follow, if present, must be digits. +---------------------- +Variable-range filters +---------------------- + +An array of range-specification strings may be supplied in the `variable_range_filter` +argument. If supplied, only features having numerical values in the specified column +of `variableMetadata` that fall within the specified ranges will be retained +in the output. Each range is a string of three colon-separated values (e.g., "mz:200:800") in the +following order: + +- the **name of a column of `variableMetadata`** which must have numerical data (e.g., "mz"); +- the **minimum allowed value** in that column for the feature to be retained (e.g., 200); +- the **maximum allowed value** (e.g., 800). + +Note for the range specification strings: + +- **If the "maximum" is less than the "minimum", then the range is exclusive** (e.g., "mz:800:200" means retain only features whose mz is NOT in the range 200-800) +- **If the name supplied in the first field is 'FEATMAX',** then the string is defining the minimum (and possibly, though less useful, maximum) intensity for each feature in the dataMatrix. For example, "FEATMAX:1e6:" would specify that any feature would be excluded if no sample had an intensity for that feature greater than 1000000. + + - Note, however, that when the "maximum" is greater than the "minimum" for the FEATMAX range specification, then the specification is ignored. --------------- Working example @@ -568,6 +620,19 @@ NEWS ---- +CHANGES IN VERSION 0.98.6 +========================= + +NEW FEATURES + +* Added support for filtering out features whose attributes fall outside specified ranges. + For more detail, see "Variable-range filters" above. + +INTERNAL MODIFICATIONS + +* Now uses w4mclassfilter R package v0.98.6. +* Now sorts sample names and feature names in output files because some statistical tools expect the same order in `dataMatrix` row and column names as in the corresponding metadata files. + CHANGES IN VERSION 0.98.3 ========================= diff -r ae791fe4fbe9 -r f1eabb5973b1 w4mclassfilter_wrapper.R --- a/w4mclassfilter_wrapper.R Thu Sep 07 17:32:09 2017 -0400 +++ b/w4mclassfilter_wrapper.R Thu Jan 11 20:22:14 2018 -0500 @@ -82,8 +82,8 @@ # other parameters +wildcards <- as.logical(argVc["wildcards"]) sampleclassNames <- as.character(argVc["sampleclassNames"]) -wildcards <- as.logical(argVc["wildcards"]) sampleclassNames <- strsplit(x = sampleclassNames, split = ",", fixed = TRUE)[[1]] if (wildcards) { sampleclassNames <- gsub("[.]", "[.]", sampleclassNames) @@ -93,22 +93,26 @@ classnameColumn <- as.character(argVc["classnameColumn"]) samplenameColumn <- as.character(argVc["samplenameColumn"]) +variable_range_filter <- as.character(argVc["variable_range_filter"]) +variable_range_filter <- strsplit(x = variable_range_filter, split = ",", fixed = TRUE)[[1]] + ##------------------------------ ## Computation ##------------------------------ result <- w4m_filter_by_sample_class( - dataMatrix_in = dataMatrix_in -, sampleMetadata_in = sampleMetadata_in -, variableMetadata_in = variableMetadata_in -, dataMatrix_out = dataMatrix_out -, sampleMetadata_out = sampleMetadata_out -, variableMetadata_out = variableMetadata_out -, classes = sampleclassNames -, include = inclusive -, class_column = classnameColumn -, samplename_column = samplenameColumn -, failure_action = my_print + dataMatrix_in = dataMatrix_in +, sampleMetadata_in = sampleMetadata_in +, variableMetadata_in = variableMetadata_in +, dataMatrix_out = dataMatrix_out +, sampleMetadata_out = sampleMetadata_out +, variableMetadata_out = variableMetadata_out +, classes = sampleclassNames +, include = inclusive +, class_column = classnameColumn +, samplename_column = samplenameColumn +, variable_range_filter = variable_range_filter +, failure_action = my_print ) my_print("\nResult of '", modNamC, "' Galaxy module call to 'w4mclassfilter::w4m_filter_by_sample_class' R function: ",