Learn R Programming

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

wrMisc (version 1.14.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). Other 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. Many times large experimental datasets need some additional filtering, adequate functions are provided. Batch reading (or writing) of sets of files and combining data to arrays is supported, too. 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.

Copy Link

Version

Install

install.packages('wrMisc')

Monthly Downloads

1,139

Version

1.14.2

License

GPL-3

Maintainer

Wolfgang Raffelsberger

Last Published

February 28th, 2024

Functions in wrMisc (1.14.2)

cbindNR

cbind to non-redundant
adjBy2ptReg

Linear rescaling of numeric vertor or matrix
arrayCV

CV of array
checkAvSd

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

Add text before file-extension
XYToDiffPpm

Express difference as ppm
asSepList

Organize Data as Separate List-Entries
appendNR

Append vectors or lists, without duplcating common elements
buildTree

Connect edges to from tree and extract all possible branches
adjustUnitPrefix

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

Check for strict (ascencing or descending) order
checkFilePath

Check If File Is Available For Reading
checkGrpOrderSEM

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

checkGrpOrder
cleanReplicates

Replace Most Distant Values by NA
coinPermTest

Compare means of two vectors by permutation test
checkVectLength

Check length of vector
closeMatchMatrix

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

Standard error of median for each column by bootstrap
checkSimValueInSer

Check for similar values in series
combinatIntTable

Planing for making all multiplicative combinations
combineAsN

Combine Vectors From List And Return Basic Count Statistics
colSds

sd for each column
colorAccording2

Transform numeric values to color-gradient
combineRedundLinesInList

Combine Redundant Lines In List
combineRedBasedOnCol

Combine/reduce redundant lines based on specified column
combineReplFromListToMatr

Combine replicates from list to matrix
combineRedundLinesInListAcRef

Combine Redundant Lines In List, Deprecated
concatMatch

Value Matching With Option For Concatenated Terms
confInt

Confidence Interval To Given Alpha
combineOverlapInfo

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

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

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

Convert vector to numeric
convColorToTransp

Assign new transparency to given colors
countCloseToLimits

Count from two vectors number of values close within given limits
countSameStartEnd

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

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

Difference in ppm between numeric values
.addLetterWoLast

Add letter to all elements but not last
contribToContigPerFrag

Characterize individual contribution of single edges in tree-structures
cutArrayInCluLike

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

Cut character-vector at multiple sites
conv01toColNa

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

Compute matrix of differences for all pairwise combinations of numeric vector
.checkConvt2Vect

Convert to simple vector (similar to unlist)
.checkConsistentArrList

Check list of arrays for consistent dimensions of all arrays
cutToNgrp

Cut numeric vector to n groups (ie convert to factor)
.bringToCtr

Bring most extreme to center
.checkArgNa

Check argument names
.allRatioMatr1to2

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

Summarize along columns of multiple arrays in list
.combineListAnnot

Combine annotation information from list of matrixes
.allRatios

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

Compare by distance/difference
.checkLmConfInt

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

Check argument for Location of legend
combineSingleT

Get all combinations with TRUE from each column
.checkFactor

Check Factor
correctToUnique

Correct vector to unique
completeArrLst

Complete list of arrays for same dimensions
.complCols

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

Compare by PPM
.compareByLogRatio

Compare by log-ratio
.arrLstSEM

Summarize along columns of mult arrays in list
.convertMatrToNum

Convert numeric matrix to numeric
.convertNa

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

Model linear regression and optional plot
.checkFileNameExtensions

checkFileNameExtensions Function for checking file-names.
.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.
.filterSw

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

Grow tree
correctWinPath

Correct mixed slash and backslash in file path
.breakInSer

Get series of values after last discontinuity
.asDF2

Convert anything to data.frame
.insp1dimByClustering

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

Check regression arguments
.minDif

find closest neighbour to numeric vector
.getAmean2

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

Distances beteenw sorted points of 2-columns
.getMvalue2

Get M value for each group of replicates based on comp
.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
.composeCallName

Compose sequence of (function-)calls
.mergeMatrices

Merge Multiple Matrices (main)
.corDuplItemsByIncrem

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

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

Filter for size
.scale01

Scale between 0 and 1 (main)
.extrNumHeadingSepChar

Extract numbers before separator followed by alphabetic character
.fuse2ArrBy2ndDim

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

Rescale respective to specific group
.firstMin

Get first minimum
.findBorderOverlaps

Find overlap instances among range of values in lines
.keepFiniteCol

Remove all columns where all data are not finite
.cutStr

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

row group CV (main)
.getAmean

Get A value for each group of replicates
.mayBeNum

Check if vector may be numeric content
.removeCol

Remove columns indicated by col-number
.removeEmptyCol

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

row group mean (main)
.setLowestTo

Set lowest value to given value
.replSpecChar

Replace Special Characters
.sortMid

Choose most frequent or middle of sorted vector
.retain1stPart

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

Scale between min and max value (main)
.seqCutStr

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

Add lower caps to character vector
.plotCountPie

Pie plot for counting results
.extrNAneighb

Extract NA-neighbour values
.chooseGrpCol

Automatic choice of colors
.extrNumHeadingCap

Extract number(s) before capital character
.inspectHeader

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

Trim from Left
.trimRight

Trim from right
.normalize

Main Normalization function
.normConstSlope

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

Trim from start
.rowNormFact

Obtain normalization factor (main)
.rowNorm

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

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

Extract numeric part of matrix or data.frame
.trimFromEnd

Trim from end
extrSpcText

Extract specific text
extr1chan

Extract just one series, ie channel, of list of arrays
.scaleSpecGrp

Rescale respective to specific group
exclExtrValues

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

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

Raise all values close to lowest value
extrColsDeX

Flexible extraction of columns
findSimilFrom2sets

Find similar numeric values from two vectors/matrixes
.summarizeCols

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

row group sd (main)
.stackArray

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

Normalize by adjusting exponent
.rowGrpSums

row group rowSums per group (main)
findUsableGroupRange

Select groups within given range
firstLineOfDat

Filter matrix to keep only first of repeated lines
firstOfRepLines

Reduce to first occurance of repeated lines
filterList

Filter for unique elements
fuseAnnotMatr

Fuse annotation matrix to initial matrix
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.
firstOfRepeated

Find first of repeated elements
fuseCommonListElem

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

Fuse pairs to generate cluster-names
makeMAList

Make MA-List object
makeNRedMatr

Make non-redundant matrix
levIndex

Transform (factor) levels into index
extractLast2numericParts

Extract last two numeric parts from character vector
filt3dimArr

Filter three-dimensional array of numeric data
keepCommonText

Extract Longest Common Text Out Of Character Vector
listBatchReplace

Replacements in list
.uniqueWName

Check regression arguments
.vector2Matr

Convert numeric vector to matrix
filtSizeUniq

Filter for unique elements
findRepeated

Find repeated elements
elimCloseCoord

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

Equal character-length number
findCloseMatch

Find close numeric values between two vectors
get1stOfRepeatedByCol

Get first of repeated by column
getValuesByUnique

Print matrix-content as plot
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
linModelSelect

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

Fit linear regression, return parameters and p-values
mergeVectors

Merge Named Vectors
mergeSelCol3

mergeSelCol3
mergeW2

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

Multiple moderated pair-wise t-tests from limma
multiCharReplace

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

Minimum distance/difference between values
nonAmbiguousMat

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

Fast na.omit
lmSelClu

Run lm on segmented data (from clustering)
mergeMatrices

Merge Multiple Matrices
mergeMatrixList

Merge Multiple Matrices from List
lrbind

rbind on lists
packageDownloadStat

Simple Package Download Statistics from CRAN
pairsAsPropensMatr

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

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

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

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

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

Convert p-values to lfdr
organizeAsListOfRepl

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

Moderated pair-wise t-test from limma
presenceFilt

Filter lines of matrix for max number of NAs
pasteC

Advanced paste-collapse
randIndFx

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

Contingenty tables for fit of ranking
gitDataUrl

Convert ulr-name for reading in raw-mode
listGroupsByNames

Organize values into list and sort by names
filterLiColDeList

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

Html special character conversion
partialDist

Partial distance matrix (focus on closest)
nonredDataFrame

Filter for unique elements
partUnlist

Partial unlist of lists of lists
normalizeThis

Normalize data in various modes
readCsvBatch

Read batch of csv-files
readTabulatedBatch

Batch reading of Tabulated Text-Files
readXlsxBatch

Read Batch of Excel xlsx-Files
readVarColumns

Read tabular content of files with variable number of columns
reorgByCluNo

Reorganize matrix according to clustering-output
replNAbyLow

Replace NAs by low values
ratioToPpm

Convert ratio to ppm
ratioAllComb

Calculate all ratios between x and y
matchNamesWithReverseParts

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

Count number of non-numeric characters
nonAmbiguousNum

make numeric vector non-ambiguous (ie unique)
nFragments0

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

Non-redundant lines of matrix
matchMatrixLinesToRef

Match All Lines of Matrix To Reference Note
protectSpecChar

Protect Special Characters
rowGrpCV

Row group CV
rmDupl2colMatr

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

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

Count number of NAs per row and group of columns
rowGrpSds

Per line and per group sd-values
reduceTable

Reduce table by aggregating smaller groups
rowSEMs

SEM for each row
regrBy1or2point

Rescaling according to reference data using linear regression.
scaleXY

Scale data to given minimum and maxiumum
replPlateCV

CV of replicate plates (list of matrixes)
rowNormalize

Row Normalize
rnormW

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

rowCVs
presenceGrpFilt

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

Search points forming lines at given slope
sysDate

System-date (compressed format)
renameColumns

Rename columns
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)
regrMultBy1or2point

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

Search and Select Groups of Replicates
rowGrpSums

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

sd of median for each row by bootstrap
standardW

Standardize (scale) data
stdErrMedBoot

Standard eror of median by boot-strap
rowGrpMeans

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

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

Estimate mode (most frequent value)
transpGraySca

Make single vector gray-gradient
sortByNRepeated

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

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

Count number of NAs per sub-set of columns
tableToPlot

Print matrix-content as plot
upperMaCoord

(upper) pairwise x,y combinations
tTestAllVal

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

Check for values within range of reference
sampNoDeMArrayLM

Locate Sample Index From Index or Name Of Pair-Wise Comparisons in list or MArrayLM-Object
rowSds

sd for each row (fast execution)
test2factLimma

2-factorial limma-style t-test
singleLineAnova

2-factorial Anova on single line of data
unifyEnumerator

Unify Enumerators
sortBy2CategorAnd1IntCol

Sort matrix by two categorical and one integer columns
uniqCountReport

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

Locate duplicates in text and make non-redundant
writeCsv

Write (and convert) csv files
triCoord

Pairwise x,y combinations
trimRedundText

Trim redundant text