Learn R Programming

⚠️There's a newer version (1.15.3.1) of this package.Take me there.

wrMisc (version 1.15.2)

Analyze Experimental High-Throughput (Omics) Data

Description

The efficient treatment and convenient analysis of experimental high-throughput (omics) data gets facilitated through this collection of diverse functions. Several functions address advanced object-conversions, like manipulating lists of lists or lists of arrays, reorganizing lists to arrays or into separate vectors, merging of multiple entries, etc. Another set of functions provides speed-optimized calculation of standard deviation (sd), coefficient of variance (CV) or standard error of the mean (SEM) for data in matrixes or means per line with respect to additional grouping (eg n groups of replicates). A group of functions facilitate dealing with non-redundant information, by indexing unique, adding counters to redundant or eliminating lines with respect redundancy in a given reference-column, etc. Help is provided to identify very closely matching numeric values to generate (partial) distance matrixes for very big data in a memory efficient manner or to reduce the complexity of large data-sets by combining very close values. Other functions help aligning a matrix or data.frame to a reference using partial matching or to mine an experimental setup to extract patterns of replicate samples. Many times large experimental datasets need some additional filtering, adequate functions are provided. Convenient data normalization is supported in various different modes, parameter estimation via permutations or boot-strap as well as flexible testing of multiple pair-wise combinations using the framework of 'limma' is provided, too. Batch reading (or writing) of sets of files and combining data to arrays is supported, too.

Copy Link

Version

Install

install.packages('wrMisc')

Monthly Downloads

1,813

Version

1.15.2

License

GPL-3

Maintainer

Wolfgang Raffelsberger

Last Published

August 20th, 2024

Functions in wrMisc (1.15.2)

checkGrpOrderSEM

Check order of multiple groups including non-overlapping SEM-margins
cleanReplicates

Replace Most Distant Values by NA
checkFilePath

Check If File Is Available For Reading
checkStrictOrder

Check for strict (ascencing or descending) order
closeMatchMatrix

Reorganize results of search for close (similar) values in matrix-view
checkUnitPrefix

Check For Common Unit-Name in Text
checkVectLength

Check length of vector
coinPermTest

Compare Means Of Two Vectors By Permutation Test
checkSimValueInSer

Check for similar values in series
checkGrpOrder

checkGrpOrder
colCVs

rowCVs
combinatIntTable

Planing for making all multiplicative combinations
combineAsN

Combine Vectors From List And Return Basic Count Statistics
combineOverlapInfo

Find and combine points located very close in x/y space
colMedSds

Standard Error Of Median For Each Column By Bootstrap
combineByEitherFactor

Create factor-like column regrouping data regrouping simultaneaously by two factors
combineRedundLinesInList

Combine Redundant Lines In List
colorAccording2

Transform Numeric Values To Color-Gradient
colSds

sd for each column
combineRedBasedOnCol

Combine/reduce redundant lines based on specified column
combineReplFromListToMatr

Combine replicates from list to matrix
concatMatch

Value Matching With Option For Concatenated Terms
combineSingleT

Get all combinations with TRUE from each column
combineRedundLinesInListAcRef

Combine Redundant Lines In List, Deprecated
convColorToTransp

Assign new transparency to given colors
completeArrLst

Complete list of arrays for same dimensions
conv01toColNa

Convert matrix of integer to matrix of x-times repeated column-names
contribToContigPerFrag

Characterize individual contribution of single edges in tree-structures
confInt

Confidence Interval To Given Alpha
convMatr2df

Convert matrix (eg with redundant) row-names to data.frame
cutArrayInCluLike

Cut 3-dim array in list of matrixes (or arrays) similar to organizing into clusters
convToNum

Convert Vector To Numeric
cutToNgrp

Cut numeric vector to n groups (ie convert to factor)
diffCombin

Compute matrix of differences for all pairwise combinations of numeric vector
cutAtMultSites

Cut character-vector at multiple sites
.arrLstSEM

Summarize along columns of mult arrays in list
.arrLstMean

Summarize along columns of multiple arrays in list
coordOfFilt

get coordinates of values/points in matrix according to filtering condition
countSameStartEnd

Count same start- and end- sites of edges (or fragments)
.addLetterWoLast

Add letter to all elements but not last
diffPPM

Difference in ppm between numeric values
.breakInSer

Get series of values after last discontinuity
.asDF2

Convert anything to data.frame
countCloseToLimits

Count from two vectors number of values close within given limits
.checkLmConfInt

Compare 'dat' to confindence interval of linare model 'lMod' (eg from lm())
.checkLegendLoc

Check argument for Location of legend
.checkConvt2Vect

Convert to simple vector (similar to unlist)
.checkConsistentArrList

Check list of arrays for consistent dimensions of all arrays
.combineListAnnot

Combine annotation information from list of matrixes
.allRatioMatr1to2

Calculate ratios for each column to each column of reference-matrix
.compareByDiff

Compare by distance/difference
.allRatios

Search character-string and cut either before or after
.compareByPPM

Compare by PPM
.compareByLogRatio

Compare by log-ratio
correctToUnique

Correct vector to unique
.checkArgNa

Check argument names
.bringToCtr

Bring most extreme to center
correctWinPath

Correct mixed slash and backslash in file path
.cutAtSearch

Search character-string and cut either before or after
.corDuplItemsByIncrem

Avoid duplicating items between 'curNa' and 'newNa' by incrementing digits after 'extPref' (in newNa)
.datSlope

Model linear regression and optional plot
.cutStr

Cut string to get all variants from given start with min and max length
.extrNAneighb

Extract NA-neighbour values
.extrNumHeadingSepChar

Extract numbers before separator followed by alphabetic character
.filtSize

Filter for size
.filterNetw

Filter nodes & edges for extracting networks (main) This function allows extracting and filtering network-data based on fixed threshold (limInt) and add sandwich-nodes (nodes inter-connecting initial nodes) out of node-based queries.
.getMvalue2

Get M value for each group of replicates based on comp
.filterSw

Filter 3-dim array of numeric data (main)
.getAmean2

Get A value for each group of replicates based on comp
.insp1dimByClustering

Segment (1-dim vector) 'dat' into clusters
.growTree

Grow tree
.convertNa

Convert/standardize names of 'query' to standard names from 'ref'
.checkRegrArguments

Check regression arguments
.checkFactor

Check Factor
.checkFileNameExtensions

checkFileNameExtensions Function for checking file-names.
.keepCenter1d

Refine/filter 'dat1' (1dim dataset, eg cluster) with aim of keeping center of data
.composeCallName

Compose sequence of (function-)calls
.convertMatrToNum

Convert numeric matrix to numeric
.chooseGrpCol

Automatic choice of colors
.findBorderOverlaps

Find overlap instances among range of values in lines
.firstMin

Get first minimum
.inspectHeader

Inspect 'matr' and check if 1st line can be used/converted as header
.complCols

Search (complementing) columns for best coverage of non-NA data for rowNormalization (main)
.plusLowerCaps

Add lower caps to character vector
.plotCountPie

Pie plot for counting results
.rowGrpSds

row group sd (main)
.extrNumHeadingCap

Extract number(s) before capital character
.predRes

Calculate residues of (2-dim) linear model 'lMod'-prediction of/for 'dat'
.keepFiniteCol

Remove all columns where all data are not finite
.fuse2ArrBy2ndDim

fuse 2 instances of 3dim arr as mult cols in 3dim array
.getAmean

Get A value for each group of replicates
.raiseColLowest

Raise all values close to lowest value
.mayBeNum

Check if vector may be numeric content
.medianSpecGrp

Rescale respective to specific group
.rowGrpSums

row group rowSums per group (main)
.mergeMatrices

Merge Multiple Matrices (main)
.pasteCols

Paste-concatenate all columns of matrix
.offCenter

Return position of 'di' (numeric vector) which is most excentric (distant to 0), starts with NAs as most excentric
.normalize

Main Normalization function
.scale01

Scale between 0 and 1 (main)
.normConstSlope

Normalize columns of 2dim matrix to common linear regression fit
.replSpecChar

Replace Special Characters
.retain1stPart

Trim character string: keep only text before 'sep'
.summarizeCols

Summarize columns of matrix (or data.frame) 'x' using apply (main)
.stackArray

Reorganize array by reducing dimension 'byDim' (similar to stack() for data-frames)
exclExtrValues

Exclude extreme values (based on distance to mean)
.removeCol

Remove columns indicated by col-number
.neigbDis

Distances beteenw sorted points of 2-columns
.setLowestTo

Set lowest value to given value
.minDif

find closest neighbour to numeric vector
.sortMid

Choose most frequent or middle of sorted vector
.scaleSpecGrp

Rescale respective to specific group
elimCloseCoord

Eliminate close (overlapping) points (in x & y space)
exponNormalize

Normalize by adjusting exponent
.trimFromStart

Trim from start (Deprecated)
.trimFromEnd

Trim from end (Deprecated)
.rowNormFact

Obtain normalization factor (main)
.rowNorm

Row-normalization procedure on matrix or data.frame 'dat'
.uniqueWName

Check regression arguments
.vector2Matr

Convert numeric vector to matrix
.removeEmptyCol

Search for (empty) columns conaining only entries defined in 'searchFields' and remove such columns
.scaleXY

Scale between min and max value (main)
.trimRight

Trim From Right Side
.rowGrpCV

row group CV (main)
.rowGrpMeans

row group mean (main)
.trimLeft

Trim From Left Side
extractLast2numericParts

Extract last two numeric parts from character vector
firstLineOfDat

Filter matrix to keep only first of repeated lines
extrNumericFromMatr

Extract numeric part of matrix or data.frame
equLenNumber

Equal character-length number
firstOfRepLines

Reduce to first occurance of repeated lines
extrSpcText

Extract specific text
filt3dimArr

Filter three-dimensional array of numeric data
filtSizeUniq

Filter for unique elements
extr1chan

Extract just one series, ie channel, of list of arrays
filterList

Filter for unique elements
extrColsDeX

Flexible extraction of columns
.seqCutStr

Cut string to get all variants from given start with min length, depreciated
filterNetw

Filter nodes & edges for extracting networks This function allows extracting and filtering network-data based on fixed threshold (limInt) and add sandwich-nodes (nodes inter-connecting initial nodes) out of node-based queries.
findSimilFrom2sets

Find similar numeric values from two vectors/matrixes
findUsableGroupRange

Select groups within given range
findCloseMatch

Find close numeric values between two vectors
filterLiColDeList

Filter lines(rows) and/or columns from all suitable elements of list
linModelSelect

Test multiple starting levels for linear regression model, select best and plot
linRegrParamAndPVal

Fit linear regression, return parameters and p-values
findRepeated

Find repeated elements
get1stOfRepeatedByCol

Get first of repeated by column
keepCommonText

Extract Longest Common Text Out Of Character Vector
levIndex

Transform (factor) levels into index
mergeSelCol3

mergeSelCol3
mergeSelCol

Merge selected columns out of 2 matrix or data.frames
matchSampToPairw

Match names to concatenated pairs of names
matr2list

Transform columns of matrix to list of vectors
htmlSpecCharConv

Html Special Character Conversion
getValuesByUnique

Print matrix-content as plot
gitDataUrl

Convert ulr-name for reading in raw-mode
makeNRedMatr

Make non-redundant matrix
makeMAList

Make MA-List Object
multiCharReplace

Multiple replacement of entire character elements in simple vector, matrix or data.frame
lrbind

rbind on lists
moderTestXgrp

Multiple moderated pair-wise t-tests from limma
fuseAnnotMatr

Fuse annotation matrix to initial matrix
lmSelClu

Run lm on segmented data (from clustering)
firstOfRepeated

Find first of repeated elements
matchMatrixLinesToRef

Match All Lines of Matrix To Reference Note
fuseCommonListElem

Fuse content of list-elements with redundant (duplicated) names
listBatchReplace

Replacements in list
listGroupsByNames

Organize values into list and sort by names
mergeMatrixList

Merge Multiple Matrices from List
fusePairs

Fuse pairs to generate cluster-names
nFragments0

Number of fragments after cut at specific character(s)
mergeMatrices

Merge Multiple Matrices
mergeVectors

Merge Named Vectors
mergeW2

Extended version of merge for multiple objects (even without rownames)
nonAmbiguousNum

make numeric vector non-ambiguous (ie unique)
nonRedundLines

Non-redundant lines of matrix
nNonNumChar

Count number of non-numeric characters
pVal2lfdr

Convert p-values to lfdr
organizeAsListOfRepl

(re)organize data of (3-dim) array as list of replicates
pasteC

Advanced paste-collapse
multiMatch

Simple Multi-to-Multi Matching of (Concatenated) Terms
presenceGrpFilt

Filter for each group of columns for sufficient data as non-NA
normalizeThis

Normalize Data In Various Modes
protectSpecChar

Protect Special Characters
nFragments

Number of fragments after cut at specific character(s) within size-range
nonredDataFrame

Filter for unique elements
matchNamesWithReverseParts

Value Matching with optional reversing of sub-parts of non-matching elements
naOmit

Fast na.omit
rankToContigTab

Contingenty tables for fit of ranking
numPairDeColNames

Extract pair of numeric values from vector or column-names
partUnlist

Partial unlist of lists of lists
randIndFx

Distance of categorical data (Jaccard, Rand and adjusted Rand index)
nonAmbiguousMat

Transform matrix to non-ambiguous matrix (in respect to given column)
orderMatrToRef

Order Lines of Matrix According to Reference (Character) Vector
packageDownloadStat

Simple Package Download Statistics From CRAN
moderTest2grp

Moderated Pair-Wise t-test From Limma
minDiff

Minimum distance/difference between values
readCsvBatch

Read batch of csv-files
ratioToPpm

Convert ratio to ppm
ratioAllComb

Calculate all ratios between x and y
partialDist

Partial distance matrix (focus on closest)
renameColumns

Rename columns
regrMultBy1or2point

Rescaling of multiple data-sets according to reference data using regression
readTabulatedBatch

Batch Reading Of Tabulated Text-Files
replicateStructure

Search and Select Groups of Replicates
replPlateCV

CV of replicate plates (list of matrixes)
reorgByCluNo

Reorganize matrix according to clustering-output
replNAbyLow

Replace NAs by low values
rmOrphans

Remove or Reassign Orphan Indexes
rmSharedWords

Trim/Remove Redundant Words
rowCVs

rowCVs
reduceTable

Reduce table by aggregating smaller groups
regrBy1or2point

Rescaling according to reference data using linear regression.
pairsAsPropensMatr

Convert Pairs of Node-Names to Non-Oriented Propensity Matrix
rnormW

Normal random number generation with close fit to expected mean and sd
presenceFilt

Filter lines of matrix for max number of NAs
readXlsxBatch

Read Batch of Excel xlsx-Files
rowGrpCV

Row group CV
readVarColumns

Read Tabular Content Of Files With Variable Number Of Columns
rowGrpMeans

rowMeans with destinction of groups (of columns, eg groups of replicates)
scaleXY

Scale data to given minimum and maxiumum
rowGrpSums

rowSums with destinction of groups (of columns, eg groups of replicates)
singleLineAnova

2-factorial Anova on single line of data
sortBy2CategorAnd1IntCol

Sort matrix by two categorical and one integer columns
rowGrpNA

Count number of NAs per row and group of columns
rowMedSds

Estimate sd Of Median For Each Row By Bootstrap
stableMode

Estimate Mode (Most Frequent Value)
sumNAperGroup

Count number of NAs per sub-set of columns
sysDate

System-date (compressed format)
searchLinesAtGivenSlope

Search Points Forming Lines At Given Slope
rowSds

sd for each row (fast execution)
rmDupl2colMatr

Remove lines of matrix redundant /duplicated for 1st and 2nd column
rowGrpSds

Per line and per group sd-values
sortByNRepeated

Make a list of common occurances sorted by number of repeats
tableToPlot

Print matrix-content as plot
simpleFragFig

Simple figure showing line from start- to end-sites of edges (or fragments) defined by their start- and end-sites simpleFragFig draws figure showing start- and end-sites of edges (or fragments)
rowNormalize

Row Normalize
summarizeCols

Summarize columns (as median,mean,min,last or other methods)
searchDataPairs

Search duplicated data over multiple columns, ie pairs of data
rmEnumeratorName

Remove or rename enumerator tag/name (or remove entire enumerator) from tailing enumerators
sampNoDeMArrayLM

Locate Sample Index From Index Or Name Of Pair-Wise Comparisons In List Or MArrayLM-Object
transpGraySca

Make single vector gray-gradient
uniqCountReport

Report number of unique and redundant elements (optional figure)
treatTxtDuplicates

Locate duplicates in text and make non-redundant
withinRefRange

Check for values within range of reference
test2factLimma

2-Factorial Limma-Style t-Test
rowSEMs

SEM for each row
standardW

Standardize (scale) data
tTestAllVal

t.test on all individual values against all other values
trimmedMean

Trimmed Mean
stdErrMedBoot

Standard Eror Of Median by Boot-Strap
triCoord

Pairwise x,y combinations
trimRedundText

Trim redundant text
writeCsv

Write (and convert) csv files
unifyEnumerator

Unify Enumerators
upperMaCoord

(upper) pairwise x,y combinations
cbindNR

cbind to non-redundant
appendNR

Append vectors or lists, without duplcating common elements
buildTree

Connect edges to from tree and extract all possible branches
checkAvSd

Check how multiple groups of data separate or overlap based on mean +/- sd
addBeforFileExtension

Add text before file-extension
adjustUnitPrefix

Adjust Value With Different Decimal Prefixes To Single Prefix Plus Unit
XYToDiffPpm

Express difference as ppm
asSepList

Organize Data as Separate List-Entries
arrayCV

CV of array
adjBy2ptReg

Linear rescaling of numeric vertor or matrix