Title: | Convert segment data into a region by sample matrix to allow for other high level computational analyses. |
---|---|
Description: | This package provides tools to convert the output of segmentation analysis using DNAcopy to a matrix structure with overlapping segments as rows and samples as columns so that other computational analyses can be applied to segmented data |
Authors: | Jianhua Zhang |
Maintainer: | J. Zhang <[email protected]> |
License: | LGPL |
Version: | 1.63.0 |
Built: | 2024-10-30 05:17:09 UTC |
Source: | https://github.com/bioc/CNTools |
Segmentation results of copy number data can not be operated by other analysis tools such as classification. The class "CNSeg" provides methods to convert segmentation data into a (what is called Reduced segments (RS))matrix format so that other computations can be performed
Objects can be created by calls of the form new("CNSeg",..)
.
A constructor CNSeg(segList)
can also be used to instantiate
CNSeg object
segList
:Object of class "data.frame"
is
the "output" element of the object return by the segment
function of DNACopy
chromosome
:Object of class "character"
is
the name of the column in segList that contains the chromosome name a given segment belong to
end
:Object of class "character"
is
the name of the column in segList that contains the ending locatino of a given segment
start
:Object of class "character"
is
the name of the column in segList that contains the starting location of a given segment
segMean
:Object of class "character"
is
the name of the column in segList that contains the mean log ratio of a given segment
id
:Object of class "character"
is
the name of the column in segList that contains the id of a given segment
signature(object = "CNSeg")
: get the
Reduced Segment data matrix
signature(object = "CNSeg")
: get the
value for slot "segList" of a CNSeg object
signature(object = "CNSeg")
: set the
value for slot "segList" of a CNSeg object
signature(object = "CNSeg")
: print a CNSeg
object
Jianhua Zhang
NA
data("sampleData") # take a subset of the data for speed seg <- CNSeg(sampleData[which(is.element(sampleData[, "ID"], sample(unique(sampleData[, "ID"]), 10))), ]) rsBypair <- getRS(seg, by = "pair", imput = FALSE, XY = FALSE, what = "mean") rsBypair
data("sampleData") # take a subset of the data for speed seg <- CNSeg(sampleData[which(is.element(sampleData[, "ID"], sample(unique(sampleData[, "ID"]), 10))), ]) rsBypair <- getRS(seg, by = "pair", imput = FALSE, XY = FALSE, what = "mean") rsBypair
madFilter
With a given threshold, the method checks each pair of samples to exclude features that do not differ by the threshold between two samples. This filter is only applicable to pairs of reduced segments
not iimplemented yet
method that handles RS objects
getDist
gets the data contained by an RS object ready to be passed to the generic functon for distance calculations
see dist of stats
takes an RS object and then call the dist function of stats for distance calculations
Extends genefilter filtering functions to handle reduced segment data
A character string to indicate that filtering is based on reduced segment data
getCor
gets data contained by an RS object ready and then calls the cor function for correlation calculations
see function cor of stats
method that handles RS objects
getRS
takes a CNSeg object containing the output of the segment function of DNAcopy and format the data into a matrix based on overlapping chromosome region (by = region", gene (by = gene) or pair overlapping chromosome region (by = pair)
a reduced segment can be generated in three ways; by chromosomal regions that overlap across sample (by = region), by genes (by = gene), or by pair of samples with chromosome regions aligned (by = pair). User may choose to imput cells (by region or gene only) where a value can not be assigned by setting imput = TRUE. The X and Y chromosomes can dropped by stting XY = FALSE.
madFilter
calculates the mean absolute deviation across samples for each rows and drops rows that are not above percentile defined by a user
not iimplemented yet
method that handles RS objects
The class contains the Reduced Segment data matrix derived from the output of the segment method of DNACopy and provides functions to manipulate the data or perform other computational operations
Objects can be created by calls of the form new("RS", ...)
.
A constructor RS(rs, by, imput, XY) can also be used to intantiate
an object of this class
rs
:Object of class "ANY"
eith a matrix if
the RS is by region or gene or a list of matrix if the
RS is by sample pairs
by
:Object of class "character"
a
charactere string indicating how the RS matrix is obtained.
Valid values include region, gene, or pair
signature(x = "RS")
: Calculates the sample wise
correlation coefficients using the Reduced Segment matix
signature(x = "RS")
: Calculates the distance
between samples contained in the Reduced Segment matrix
signature(expr = "RS")
: filters features
by calling the genefilter function
signature(object = "RS")
: filters features
by mean absolute deviation
signature(object = "RS")
: get method for the by
slot of an RS object
signature(object = "RS")
: assignment method for
the rs slot
signature(object = "RS")
: get method for the by
slot of an RS object
signature(object = "RS")
: show method for an RS
object
Jianhua Zhang
data("sampleData") # take a subset of the data for speed seg <- CNSeg(sampleData[which(is.element(sampleData[, "ID"], sample(unique(sampleData[, "ID"]), 20))), ]) rsByregion <- getRS(seg, by = "region", imput = TRUE, XY = FALSE, what = "median") rsByregion
data("sampleData") # take a subset of the data for speed seg <- CNSeg(sampleData[which(is.element(sampleData[, "ID"], sample(unique(sampleData[, "ID"]), 20))), ]) rsByregion <- getRS(seg, by = "region", imput = TRUE, XY = FALSE, what = "median") rsByregion