getAbundance {mia}R Documentation

Get abundance values by “SampleID” or “FeatureID”

Description

These are functions for extracting abundances present in assay(x). These functions are convenience wrapper around subsetting columns or rows from assay(x,name).

Usage

getAbundanceSample(x, sample_id, abund_values = "counts")

## S4 method for signature 'SummarizedExperiment'
getAbundanceSample(x, sample_id = NULL, abund_values = "counts")

getAbundanceFeature(x, feature_id, abund_values)

## S4 method for signature 'SummarizedExperiment'
getAbundanceFeature(x, feature_id = NULL, abund_values = "counts")

Arguments

x

A SummarizedExperiment object.

sample_id

A “SampleID” from which user wants to extract the abundances of “FeatureID”. This is essentially a column name in assay(x).

abund_values

a character value to select an assayNames

feature_id

A “FeatureID” for which user wants to extract the abundances from all of “SampleID” in assayNames. This is essentially a rowname in assay(x).

Details

getAbundanceSample returns abundance values for all “FeatureIDs” in a user specified “SampleID”.

getAbundanceFeature returns abundance values in all “SampleIDs” for user specified “FeatureID”.

Value

getAbundanceSample and getAbundanceFeature return a numeric matrix of the abundance values for all “SampleIDs”/“FeatureIDs”

Author(s)

Sudarshan A. Shetty

Examples

# getAbundanceSample
data(GlobalPatterns)
getAbundanceSample(GlobalPatterns,
                   sample_id = 'CC1',
                   abund_values = 'counts')
# getAbundanceFeature
getAbundanceFeature(GlobalPatterns,
                    feature_id = '522457',
                    abund_values = 'counts')

[Package mia version 1.2.3 Index]