DataFilter$minCountGroupConstraint {IdMappingAnalysis} | R Documentation

## Perform minimum count based thresholding of an input vector subdivided into groups

### Description

Perform minimum count based thresholding of an input vector subdivided into groups.

### Usage

    ## Static method (use this):
    ## DataFilter$minCountGroupConstraint(X, filtParams, ...)

    ## Don't use the below:
    ## S3 method for class 'DataFilter'
    minCountGroupConstraint(static, X, filtParams, ...)

### Arguments

`X` | `numeric` input `vector`.
`filtParams` | `vector` of constraint parameters. The filtParams[3] is a list of integer vectors, each containing the indexes of an input X vector data and thus defining the groups within the input vector. If the fraction of input elements for a given group (defined by filtParam[3]) which value is greater or equal filtParams[1] is less than filtParam[2], and if all groups satisfy this condition, then the input vector is replaced by NAs, otherwise it is kept intact.
`...` | Not used

### Value

`numeric` `vector` or vector of `NA` 's depending on passing the constraints criteria.

### Author(s)

Alex Lisovich, Roger Day

### See Also

For more information see `DataFilter`.

### Examples

     #derive sample groups from outcomes
     outcomes<-unique(examples$outcomeMap[,2]);
     groups<-list();
     for(outcome in outcomes)
    	groups[[outcome]]<-which(examples$outcomeMap[,2]==outcome);

     #perform filtering by groups
     fltExperimentSet<-DataFilter$do.apply(examples$msmsExperimentSet,
       byRows=TRUE,filterFun=DataFilter$minCountGroupConstraint,filtParams=list(1,0.3,groups),verbose=TRUE);

     #print the number of rows set to NA
     sum(is.na(rowSums(fltExperimentSet[,-1])))

[Package IdMappingAnalysis version 1.24.0 Index]