FeatureTable: FeatureTable

FeatureTableR Documentation

FeatureTable

Description

A template for building documented, tested R6 classes

Methods

Public methods


Method new()

Creates a new instance of this [R6][R6::R6Class] class.

Usage
FeatureTable$new(target.gene, reference.genome)
Arguments
target.gene

character, a recognized gene symbol

reference.genome

character, a recognized genome shorthand code, e.g., "hg38"

Returns

a new instance o FeatureTable


Method getTable()

accessor for the table

Usage
FeatureTable$getTable()
Returns

the data.table


Method setFundamentalRegions()

establish the basic genomic regions, typically transcription factor binding sites

Usage
FeatureTable$setFundamentalRegions(tbl.regions)
Arguments
tbl.regions

a data.frame with at least chrom, start end columns


Method addRegionFeature()

annotate each of the intersecting fundamental regions with the value of this feature

Usage
FeatureTable$addRegionFeature(
  tbl.feature,
  feature.genome,
  feature.guide,
  default.values
)
Arguments
tbl.feature

a data.frame with chrom, start and end columns, and values of interest described in the annotation guidel

feature.genome

character, a recognized genome shorthand code, e.g., "hg38"

feature.guide

a neme list identifying columns of interest in tbl.bed, and the column names to use for them in the feature table

default.values

list matches feature.guide structure


Method addGeneFeature()

annotate each of TFs, via their associated motif mapped to the genome, with the value of the feature described in the feature guide

Usage
FeatureTable$addGeneFeature(tbl.feature, feature.name, default.value)
Arguments
tbl.feature

a data.frame with gene and value columns, values of interest described in the featureguide

feature.name

character use this string to name the new column

default.value

any the value to assign unmatched genes


Method addDistanceToTSS()

annotate each region with a new column, the distance to TSS upstream region starts will be negative, downstream will be positive

Usage
FeatureTable$addDistanceToTSS(tss.loc)
Arguments
tss.loc

integer


Method clone()

The objects of this class are cloneable with this method.

Usage
FeatureTable$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

  rt <- FeatureTable()

import R6
import data.table


PriceLab/trena documentation built on March 16, 2023, 10:01 a.m.