DepLogo (version 1.0)

filterColumns: Filter data columns by some filter function

Description

Filters the columns of the input data, i.e., positions of input sequences, by a filter function that, given a DLData object, returns a list containing i) as element $selected a vector with entries TRUE for every column that should be retained in the filtered data and ii) as element $range the range of values obtained for the filtering criterion

Usage

filterColumns(data, filter.fun)

Arguments

data

the data as DLData object

filter.fun

the filter function

Value

a DLData object containing the filtered columns and the indexes of the remaining in its axis.labels field

See Also

filter.by.gaps

filter.by.dependencies

filter.by.conservation

Examples

Run this code
# NOT RUN {
# read data and create DLData object
seqs <- read.table(system.file("extdata", "cjun.txt", package = "DepLogo"), 
    stringsAsFactors = FALSE)
data <- DLData(sequences = seqs[, 1], weights = log1p(seqs[, 2]) )

# create a filter function based on the percentage of gap symbols (at most 10%)
fun <- filter.by.gaps(percent.gap = 0.1)
data2 <- filterColumns(data, fun)
# }

Run the code above in your browser using DataLab