filter.features: Perform unsupervised feature filtering.

Description Usage Arguments Details Value Examples

View source: R/filter_features.r

Description

This function performs unsupervised feature filtering. Features can be filtered based on abundance, prevalence, or on variance. Additionally, unmapped reads may be removed.

Usage

1
2
3
filter.features(siamcat, filter.method = "abundance",
    cutoff = 0.001, rm.unmapped = TRUE,
    feature.type='original', verbose = 1)

Arguments

siamcat

an object of class siamcat-class

filter.method

string, method used for filtering the features, can be one of these: c('abundance', 'cum.abundance', 'prevalence', 'variance', 'pass'), defaults to 'abundance'

cutoff

float, abundace, prevalence, or variance cutoff, defaults to 0.001 (see Details below)

rm.unmapped

boolean, should unmapped reads be discarded?, defaults to TRUE

feature.type

string, on which type of features should the function work? Can be either "original", "filtered", or "normalized". Please only change this paramter if you know what you are doing!

verbose

integer, control output: 0 for no output at all, 1 for only information about progress and success, 2 for normal level of information and 3 for full debug information, defaults to 1

Details

This function filters the features in a siamcat-class object in a unsupervised manner.

The different filter methods work in the following way:

Features can also be filtered repeatedly with different methods, e.g. first using the maximum abundance filtering and then using prevalence filtering. However, if a filtering method has already been applied to the dataset, SIAMCAT will default back on the original features for filtering.

Value

siamcat an object of class siamcat-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Example dataset
data(siamcat_example)

# Simple examples
siamcat_filtered <- filter.features(siamcat_example,
    filter.method='abundance',
    cutoff=1e-03)

# 5% prevalence filtering
siamcat_filtered <- filter.features(siamcat_example,
    filter.method='prevalence',
    cutoff=0.05)

SIAMCAT documentation built on Nov. 8, 2020, 5:14 p.m.