The segData class inherits from the
segClass class and contains data about potential
segments on the genome, together with counts for each of those segments.
Objects from the class
Objects can be created by calls of the form new("segData", ...,
seglens). However, more usually they will be created by calling the
processAD function.
Slots
coordinates:
A GRanges
object defining the coordinates of the segments.
replicates:
Object of class "factor". The
replicate structure for the samples.
locLikelihoods:
Object of class "DataFrame"
describing estimated likelihoods that each region defined in
‘coordinates’ is a locus in each replicate group.
data:
Object of class matrix. Contains the
number of counts observed for each sample in each potential
segment.
libsizes:
Object of class "numeric". The
library sizes for each sample.
Details
The @coordinates slot contains information on each of the potential
segments; specifically, chromosome, start and end of the segment,
together. Each row of the @coordinates slot should correspond to
the same row of the @data slot.
In almost all cases objects of this class should be produced by the
processAD function.
Methods
Methods 'new', 'dim', '[' and 'show' have been defined for this class.
Author(s)
Thomas J. Hardcastle
See Also
processAD, the function that will most often be used to
create objects of this class.
classifySeg, an empirical Bayesian method for defining a
segmentation based on a segData object.
Examples
# Define the chromosome lengths for the genome of interest.
chrlens <- c(2e6, 1e6)
# Define the files containing sample information.
datadir <- system.file("extdata", package = "segmentSeq")
libfiles <- c("SL9.txt", "SL10.txt", "SL26.txt", "SL32.txt")
# Establish the library names and replicate structure.
libnames <- c("SL9", "SL10", "SL26", "SL32")
replicates <- c(1,1,2,2)
# Process the files to produce an 'alignmentData' object.
alignData <- readGeneric(file = libfiles, dir = datadir, replicates =
replicates, libnames = libnames, chrs = c(">Chr1", ">Chr2"), chrlens =
chrlens)
# Process the alignmentData object to produce a 'segData' object.
sD <- processAD(alignData, gap = 100, cl = NULL)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(segmentSeq)
Loading required package: baySeq
Loading required package: GenomicRanges
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: abind
Loading required package: perm
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: Biostrings
Loading required package: XVector
Loading required package: Rsamtools
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/segmentSeq/segData-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: segData-class
> ### Title: Class "segData"
> ### Aliases: segData segData-class [,segData-method
> ### [,segData,ANY,ANY-method [,segData,ANY-method dim,segData-method
> ### initialize,segData-method show,segData-method
> ### Keywords: classes
>
> ### ** Examples
>
>
> # Define the chromosome lengths for the genome of interest.
>
> chrlens <- c(2e6, 1e6)
>
> # Define the files containing sample information.
>
> datadir <- system.file("extdata", package = "segmentSeq")
> libfiles <- c("SL9.txt", "SL10.txt", "SL26.txt", "SL32.txt")
>
> # Establish the library names and replicate structure.
>
> libnames <- c("SL9", "SL10", "SL26", "SL32")
> replicates <- c(1,1,2,2)
>
> # Process the files to produce an 'alignmentData' object.
>
> alignData <- readGeneric(file = libfiles, dir = datadir, replicates =
+ replicates, libnames = libnames, chrs = c(">Chr1", ">Chr2"), chrlens =
+ chrlens)
Reading files........done!
Analysing tags...........done!
>
> # Process the alignmentData object to produce a 'segData' object.
>
> sD <- processAD(alignData, gap = 100, cl = NULL)
Chromosome: >Chr1
Finding start-stop co-ordinates...done!
1292 candidate loci found.
Chromosome: >Chr2
Finding start-stop co-ordinates...done!
13099 candidate loci found.
>
>
>
>
>
>
> dev.off()
null device
1
>