R/SequenceData-protected-end-pos.R
ProtectedEndSequenceData-class.Rd
ProtectedEndSequenceData
implements
SequenceData
to contain and aggregate the
start and ends of reads per position along a transcript.
ProtectedEndSequenceData
offsets the start position by -1 to align the
information on the 5'-3'-phosphate bonds to one position. The
ProtectedEndSequenceData
class is implemented specifically as required
for the RiboMethSeq
method.
The objects of type ProtectedEndSequenceData
contain three columns per
data file named using the following naming convention
protectedend.condition.replicate
.
aggregate
calculates the mean and sd for samples in the control
and treated
condition separatly.
ProtectedEndSequenceDataFrame(
df,
ranges,
sequence,
replicate,
condition,
bamfiles,
seqinfo
)
ProtectedEndSequenceData(bamfiles, annotation, sequences, seqinfo, ...)
# S4 method for ProtectedEndSequenceData,BamFileList,GRangesList,XStringSet,ScanBamParam
getData(x, bamfiles, grl, sequences, param, args)
# S4 method for ProtectedEndSequenceData
aggregateData(x, condition = c("Both", "Treated", "Control"))
# S4 method for ProtectedEndSequenceData
getDataTrack(x, name, ...)
inputs for creating a
SequenceDataFrame
. See
SequenceDataFrame
.
For aggregate
: condition for which the data
should be aggregated.
See
SequenceData
and
SequenceData-functions
a ProtectedEndSequenceData
For getDataTrack
: a valid
transcript name. Must be a name of ranges(x)
a ProtectedEndSequenceData
object
# Construction of a ProtectedEndSequenceData object
library(RNAmodR.Data)
library(rtracklayer)
annotation <- GFF3File(RNAmodR.Data.example.man.gff3())
#> see ?RNAmodR.Data and browseVignettes('RNAmodR.Data') for documentation
#> loading from cache
sequences <- RNAmodR.Data.example.man.fasta()
#> see ?RNAmodR.Data and browseVignettes('RNAmodR.Data') for documentation
#> loading from cache
files <- c(treated = RNAmodR.Data.example.wt.1())
#> see ?RNAmodR.Data and browseVignettes('RNAmodR.Data') for documentation
#> loading from cache
pesd <- ProtectedEndSequenceData(files, annotation = annotation,
sequences = sequences)
#> Import genomic features from the file as a GRanges object ...
#> OK
#> Prepare the 'metadata' data frame ...
#> OK
#> Make the TxDb object ...
#> OK
#> Loading protected end data from BAM files ...
#> OK