Learn R Programming

hiReadsProcessor (version 1.8.2)

addFeature: Add a specific feature/attribute to the sampleInfo object.

Description

Given a sampleInfo object, the function adds a new feature for the given samples & sectors.

Usage

addFeature(sampleInfo, sector = NULL, samplename = NULL, feature = NULL,
  value = NULL)

Arguments

sampleInfo
sample information SimpleList object, which samples per sector/quadrant information along with other metadata.
sector
a vector or a specific sector to add the new feature(s) to. Default is NULL, in which case the sectors are searched from samplename parameter.
samplename
a character vector or a specific sample to add the new feature(s) to. Default is NULL.
feature
a string of naming the new feature to add for the defined samplename and sector.
value
named vector of samplenames & values which is assigned for the defined sector, samplename, and feature. Example: c("Sample1"="ACDTDASD")

Value

  • modified sampleInfo object with new feature(s) added.

See Also

findPrimers, extractSeqs, trimSeqs, extractFeature, getSectorsForSamples

Examples

Run this code
load(file.path(system.file("data", package = "hiReadsProcessor"),
"FLX_seqProps.RData"))
extractFeature(seqProps, sector="2",
samplename="Roth-MLV3p-CD4TMLVWell6-MseI", feature="metadata")
seqProps <- addFeature(seqProps, sector="2",
samplename="Roth-MLV3p-CD4TMLVWell6-MseI", feature="foo",
value=c("Roth-MLV3p-CD4TMLVWell6-MseI"="woo"))
extractFeature(seqProps, sector="2",
samplename="Roth-MLV3p-CD4TMLVWell6-MseI", feature="metadata")

Run the code above in your browser using DataLab