globalSeg {GeneR} | R Documentation |
We made a set of tools manipulation segments
The aim of this class is to describe regions on chromosomes that are discontinuous segments on a line like:
1 10 25 40 Region A: ########## ####### Region B: #### #### ############# Region C: ###### ####
We made two kind of class
segSet
: segments set, is a matrix nx2 composed of a
column of "from", and a column of "to". Used to describe a region like
'A' or 'B' in our example. (A matrix 3x2 to describe region 'B').
globalSeg
: a list of segSet
. It allows the
notion of list of discontinuous segments (our use: a list of gene's
models as a gene's model is stored as a list of its exons). In our
sample, globalSeg will be the list of the 3 regions A,B and C. Note
that it store more information than just a matrix with 2 columns
containing all segments
of theses 3 regions.
For a better comprehension of other man pages, we introduce this notation:
a segment is just a part of a line determined by two values (from and to)
an object of class segSet is a set of n
segments,
determined by a matrix n
x2
an object of class globalSeg is a set of segSets, determined by a list of matrix.
Epissage group at CGM.
See also as.segSet
, as.globalSeg
,
unionSeg
a = list( matrix( c( 1, 15, 17, 5, 45, 38),ncol=2), matrix( c( 100 , 120),ncol=2), matrix( c( 130, 135, 140, 145),ncol=2), matrix( c( 142 , 160),ncol=2)) b = list( matrix( c(15, 28, 18, 45),ncol=2), matrix( c(1, 15, 25, 10, 20, 40),ncol=2), matrix( c(17, 35, 23, 38),ncol=2), matrix( c(100, 110, 105, 120),ncol=2)) a = as.globalSeg(a) b = as.globalSeg(b) par(mar=c(1,0,1,0)) par(mfrow=c(8,1)) plot(a,xlim=c(1,160),main="A") plot(b,xlim=c(1,160),main="B") plot(and(b),xlim=c(1,160),main="and(B)") plot(or(b),xlim=c(1,160),main="or(B)") plot(Xor(b),xlim=c(1,160),main="Xor(B)") plot(a&b,xlim=c(1,160),main="A&B") plot(a|b,xlim=c(1,160),main="A|B") plot(Xor(a,b),xlim=c(1,160),main="Xor(A,B)")