Learn R Programming

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

wrMisc (version 1.12.0)

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,334

Version

1.12.0

License

GPL-3

Maintainer

Wolfgang Raffelsberger

Last Published

March 20th, 2023

Functions in wrMisc (1.12.0)

XYToDiffPpm

Express difference as ppm
adjBy2ptReg

Linear rescaling of numeric vertor or matrix
arrayCV

CV of array
addBeforFileExtension

Add text before file-extension
appendNR

Append vectors or lists, without duplcating common elements
checkAvSd

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

Organize Data as Separate List-Entries
checkGrpOrder

checkGrpOrder
cbindNR

cbind to non-redundant
buildTree

Connect edges to from tree and extract all possible branches
colorAccording2

Transform numeric values to color-gradient
checkSimValueInSer

Check for similar values in series
colMedSds

Standard error of median for each column by bootstrap
cleanReplicates

Replace Most Distant Values by NA
checkGrpOrderSEM

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

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

Check length of vector
colSds

sd for each column
checkStrictOrder

Check for strict (ascencing or descending) order
coinPermTest

Compare means of two vectors by permutation test
completeArrLst

Complete list of arrays for same dimensions
combineOverlapInfo

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

Combine replicates from list to matrix
confInt

Confidence Interval To Given Alpha
combineSingleT

Get all combinations with TRUE from each column
combineAsN

Combine Vectors From List And Return Basic Count Statistics
convMatr2df

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

Characterize individual contribution of single edges in tree-structures
correctWinPath

Correct mixed slash and backslash in file path
countCloseToLimits

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

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

Correct vector to unique
combinatIntTable

Planing for making all multiplicative combinations
combineRedBasedOnCol

Combine/reduce redundant lines based on specified column
countSameStartEnd

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

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

Convert vector to numeric
.asDF2

Convert anything to data.frame
conv01toColNa

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

Assign new transparency to given colors
coordOfFilt

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

Difference in ppm between numeric values
.arrLstMean

Summarize along columns of multiple arrays in list
.checkLmConfInt

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

Check regression arguments
.addLetterWoLast

Add letter to all elements but not last
.arrLstSEM

Summarize along columns of mult arrays in list
.checkLegendLoc

Check argument for Location of legend
.convertNa

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

Check argument names
.allRatioMatr1to2

Calculate ratios for each column to each column of reference-matrix
cutToNgrp

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

Extract number(s) before capital character
.findBorderOverlaps

Find overlap instances among range of values in lines
diffCombin

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

Convert to simple vector (similar to unlist)
.allRatios

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

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

Cut character-vector at multiple sites
.composeCallName

Compose sequence of (function-)calls
.cutAtSearch

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

checkFileNameExtensions Function for checking file-names.
.corDuplItemsByIncrem

Avoid duplicating items between 'curNa' and 'newNa' by incrementing digits after 'extPref' (in newNa)
.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.
.compareByDiff

Compare by distance/difference
.checkConsistentArrList

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

Grow tree
.compareByLogRatio

Compare by log-ratio
.getAmean

Get A value for each group of replicates
.fuse2ArrBy2ndDim

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

Compare by PPM
.normalize

Main Normalization function
.offCenter

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

Extract numbers before separator followed by alphabetic character
.filterSw

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

Model linear regression and optional plot
.mayBeNum

Check if vector may be numeric content
.rowGrpMeans

row group mean (main)
.getMvalue2

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

Convert numeric matrix to numeric
.breakInSer

Get series of values after last discontinuity
.bringToCtr

Bring most extreme to center
.medianSpecGrp

Rescale respective to specific group
.rowGrpCV

row group CV (main)
.neigbDis

Distances beteenw sorted points of 2-columns
.combineListAnnot

Combine annotation information from list of matrixes
.checkFactor

Check Factor
.predRes

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

Rescale respective to specific group
.chooseGrpCol

Automatic choice of colors
.raiseColLowest

Raise all values close to lowest value
.summarizeCols

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

Trim from end
.rowNormFact

Obtain normalization factor (main)
.plotCountPie

Pie plot for counting results
.pasteCols

Paste-concatenate all columns of matrix
.firstMin

Get first minimum
.getAmean2

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

Replace Special Characters
.rowGrpSums

row group rowSums per group (main)
.keepCenter1d

Refine/filter 'dat1' (1dim dataset, eg cluster) with aim of keeping center of data
.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
extrColsDeX

Flexible extraction of columns
.mergeMatrices

Merge Multiple Matrices (main)
.rowNorm

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

find closest neighbour to numeric vector
.trimRight

Trim from right
.sortMid

Choose most frequent or middle of sorted vector
.stackArray

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

row group sd (main)
fuseCommonListElem

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

Add lower caps to character vector
.retain1stPart

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

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

Set lowest value to given value
elimCloseCoord

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

Filter matrix to keep only first of repeated lines
.extrNAneighb

Extract NA-neighbour values
.normConstSlope

Normalize columns of 2dim matrix to common linear regression fit
fusePairs

Fuse pairs to generate cluster-names
.removeEmptyCol

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

Scale between min and max value (main)
exponNormalize

Normalize by adjusting exponent
.trimFromStart

Trim from start
getValuesByUnique

Print matrix-content as plot
.removeCol

Remove columns indicated by col-number
equLenNumber

Equal character-length number
exclExtrValues

Exclude extreme values (based on distance to mean)
extrNumericFromMatr

Extract numeric part of matrix or data.frame
gitDataUrl

Convert ulr-name for reading in raw-mode
extr1chan

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

Moderated pair-wise t-test from limma
.uniqueWName

Check regression arguments
.inspectHeader

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

Segment (1-dim vector) 'dat' into clusters
makeNRedMatr

Make non-redundant 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.
extractLast2numericParts

Extract last two numeric parts from character vector
firstOfRepeated

Find first of repeated elements
matchNamesWithReverseParts

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

Find close numeric values between two vectors
keepCommonText

Extract Longest Common Text Out Of Character Vector
.trimLeft

Trim from Left
moderTestXgrp

Multiple moderated pair-wise t-tests from limma
multiCharReplace

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

Extract specific text
fuseAnnotMatr

Fuse annotation matrix to initial matrix
lrbind

rbind on lists
multiMatch

Simple Multi-to-Multi Matching of (Concatenated) Terms
.scale01

Scale between 0 and 1 (main)
.vector2Matr

Convert numeric vector to matrix
findUsableGroupRange

Select groups within given range
minDiff

Minimum distance/difference between values
mergeW2

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

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

Fit linear regression, return parameters and p-values
filtSizeUniq

Filter for unique elements
filt3dimArr

Filter three-dimensional array of numeric data
partialDist

Partial distance matrix (focus on closest)
nonredDataFrame

Filter for unique elements
firstOfRepLines

Reduce to first occurance of repeated lines
listGroupsByNames

Organize values into list and sort by names
filterList

Filter for unique elements
replicateStructure

Search and Select Groups of Replicates
filterLiColDeList

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

Run lm on segmented data (from clustering)
rmDupl2colMatr

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

Transform (factor) levels into index
regrMultBy1or2point

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

Merge Multiple Matrices
get1stOfRepeatedByCol

Get first of repeated by column
findRepeated

Find repeated elements
rowSEMs

SEM for each row
matchMatrixLinesToRef

Match All Lines of Matrix To Reference Note
htmlSpecCharConv

Html special character conversion
rowSds

sd for each row (fast execution)
replPlateCV

CV of replicate plates (list of matrixes)
linModelSelect

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

Find similar numeric values from two vectors/matrixes
pairsAsPropensMatr

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

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

Rescaling according to reference data using linear regression.
sampNoDeMArrayLM

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

Match names to concatenated pairs of names
rowCVs

rowCVs
nonRedundLines

Non-redundant lines of matrix
searchDataPairs

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

Normalize data in various modes
rowGrpNA

Count number of NAs per row and group of columns
numPairDeColNames

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

Reduce table by aggregating smaller groups
presenceGrpFilt

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

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

Search points forming lines at given slope
presenceFilt

Filter lines of matrix for max number of NAs
matr2list

Transform columns of matrix to list of vectors
mergeVectors

Merge Named Vectors
pasteC

Advanced paste-collapse
mergeMatrixList

Merge Multiple Matrices from List
readTabulatedBatch

Batch reading of Tabulated Text-Files
protectSpecChar

Protect Special Characters
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)
nonAmbiguousNum

make numeric vector non-ambiguous (ie unique)
rnormW

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

Convert p-values to lfdr
readVarColumns

Read tabular content of files with variable number of columns
listBatchReplace

Replacements in list
tableToPlot

Print matrix-content as plot
trimRedundText

Trim redundant text
organizeAsListOfRepl

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

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

Simple Package Download Statistics from CRAN
nonAmbiguousMat

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

Partial unlist of lists of lists
unifyEnumerator

Unify Enumerators
readCsvBatch

Read batch of csv-files
summarizeCols

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

Make MA-List object
ratioAllComb

Calculate all ratios between x and y
mergeSelCol3

mergeSelCol3
rankToContigTab

Contingenty tables for fit of ranking
randIndFx

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

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

Replace NAs by low values
rowGrpSds

Per line and per group sd-values
rowGrpMeans

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

Row group CV
treatTxtDuplicates

Locate duplicates in text and make non-redundant
triCoord

Pairwise x,y combinations
sortBy2CategorAnd1IntCol

Sort matrix by two categorical and one integer columns
stableMode

Estimate mode (most frequent value)
singleLineAnova

2-factorial Anova on single line of data
writeCsv

Write (and convert) csv files
standardW

Standardize (scale) data
scaleXY

Scale data to given minimum and maxiumum
test2factLimma

2-factorial limma-style t-test
nNonNumChar

Count number of non-numeric characters
ratioToPpm

Convert ratio to ppm
tTestAllVal

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

Standard eror of median by boot-strap
sumNAperGroup

Count number of NAs per sub-set of columns
naOmit

Fast na.omit
reorgByCluNo

Reorganize matrix according to clustering-output
sortByNRepeated

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

System-date (compressed format)
renameColumns

Rename columns
readXlsxBatch

Read Batch of Excel xlsx-Files
rowGrpSums

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

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

Row Normalize
rowMedSds

sd of median for each row by bootstrap
withinRefRange

Check for values within range of reference
transpGraySca

Make single vector gray-gradient
upperMaCoord

(upper) pairwise x,y combinations