cRanges-class {spliceSites} | R Documentation |
"cRanges"
: Centered ranges."cRanges"
Objects that contain centered genomic ranges. The center position marks a prominent position inside the range, generally an exon-intron junction. Position values represent the 0-based position of last exon nucleotide.
Objects can be created by calls of the form new("cRanges", seqnames, start, end, width, strand, position, id)
.
dt
:Object of class "data.frame"
. The data.frame contains the columns id, seqnames, start, end, width, strand and position. Each row contains data for one centered range.
signature(x = "cRanges")
: Returns a copy of the contained data inside a data.frame
object.
signature(x = "cRanges")
: Generic combining for cRanges
objects.
signature(x = "cRanges")
: Returns the number of contained ranges (number of rows).
signature(x = "cRanges")
: Returns the dim of the contained data.frame.
signature(x = "cRanges", dnaset="DNAStringSet",useStrand="logical",removeUnknownStrand=logical)
: Takes a cRanges
object and a DNAStringSet
(a reference sequence) and adds the appropriate DNA sequence to the genomic ranges. Returns a cdRanges
object.
signature(x = "cRanges")
: Returns end
column of data.
signature(x = "cRanges",n="numeric",digits="numeric")
: Returns first n (default: n=6) lines of contained data.frame.
signature(x = "cRanges")
: Returns id column from contained data.frame.
signature(.Object = "cRanges")
: Generic class initialisation method.
signature(x = "cRanges",frame="numeric", keepStrand="logical")
: Returns cRanges object which represents ranges truncated to codon size. When 'keepStrand' is set to FALSE, strand is set to '+'. The intention is that appended DNA sequences which then can be translated into amino acids.
signature(x = "cRanges",frame="numeric", keepStrand="logical")
: Returns cRanges object which represents ranges truncated to codon size. When 'keepStrand' is set to FALSE, strand is set to '+'. The intention is that appended DNA sequences which then can be translated into amino acids.
signature(x = "cRanges")
: Returns vector with seqid's.
signature(object = "cRanges")
: Generic print function.
signature(x="cRanges")
: Sort contained tables by seqid
,lend
and rstart
.
signature(x = "cRanges")
: Returns start column from contained data.frame.
signature(x = "cRanges")
: Returns strand column from contained data.frame.
signature(x = "cRanges")
: Returns width of contained ranges (=end-start+1).
Wolfgang Kaisers
gapRanges
# A) Create cRanges object from scratch sq<-factor(c(1,1,2,2,3,3),labels=c("chr1","chr2","chr3")) st<-c(100,200,100,300,100,400) en<-c(120,210,110,310,110,410) pos<-c(2,3,4,5,6,7) cr<-new("cRanges",seqid=sq,start=st,end=en,position=pos) cr seqid(cr) start(cr) end(cr) width(cr) strand(cr) id(cr) lCodons(cr,frame=1,keepStrand=TRUE) lCodons(cr,frame=1,keepStrand=FALSE) lCodons(cr,frame=2,keepStrand=TRUE) rCodons(cr,frame=1,keepStrand=FALSE) # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # # B) Intended way to create a cRanges object from BAM data bam<-system.file("extdata","rna_fem.bam",package="spliceSites") reader<-bamReader(bam,idx=TRUE) ga<-alignGapList(reader) bamClose(reader) ga lj<-lJunc(ga,featlen=3,gaplen=6,strand='+') lj # C) ... table(strand(lj))