## ----风格,echo = false,结果='Asis'----------------------------------- Biocstyle :: Markdown(CSS.Files = C('custom.css'))## ---- echo = false ---------------------------------------------------- uppressPackageStartUpMessages({库(rnamodr)})## ---- eval = false -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SetClass(class =“examplesequencessataframe”,包含=“SequenceFrame”)exceplesequencessataframe < - 函数(DF,范围,序列,复制,条件,Bamfiles,SeqInfo){rnamodr :::。SequenceAtaframe(“示例”,df,范围,序列,复制,条件,bamfiles,seqinfo)} setClass(class =“examplesequenceSata”,包含=“sequenceData”,slots = c(Unlistdata =“examplesequenceAtchataframe”),prototype = list(UnlistData = examplesequencessquencessquencessquencessquencess,Unlymartype =“examplesequencesataframe”,Minquality = 5L,DatadeCriction =“示例数据”))考试eSequencesata < - 函数(Bamfiles,Annotation,Sequences,SeqInfo,...){rnamodr ::: sequenceata(“示例”,Bamfiles = Bamfiles,Annotation = Annotation,Sequences =序列,SEQINFO = SEQINFO,...)}##--------------------------------------------------------------------------------- setMethod(“getdata”,signature = c(x =“examplesequenceata”,bamfiles =“bamfilelist”,grl =“grangeslist”,序列=“xstringeet”,param =“scanbamparam”),定义=函数(x,bamfiles,grl,序列,param,args){###})## --------------------------------------------------------------------------------------------- setMethod(“aggregateData”,签名= C(x =“examplesequenceAta”),功能(x,条件= c(“两个”,“治疗“,”,“控制”)){###})## --------------------------------------------------------------------------------------- setClass("ModExample", contains = c("RNAModifier"), prototype = list(mod = "X", score = "score", dataType = "ExampleSequenceData")) ModExample <- function(x, annotation, sequences, seqinfo, ...){ RNAmodR:::Modifier("ModExample", x = x, annotation = annotation, sequences = sequences, seqinfo = seqinfo, ...) } ## ----------------------------------------------------------------------------- setReplaceMethod(f = "settings", signature = signature(x = "ModExample"), definition = function(x, value){ x <- callNextMethod() # validate special setting here x@settings[names(value)] <- unname(.norm_example_args(value)) x }) ## ----------------------------------------------------------------------------- setMethod(f = "aggregateData", signature = signature(x = "ModExample"), definition = function(x, force = FALSE){ # Some data with element per transcript } ) ## ----------------------------------------------------------------------------- setMethod("findMod", signature = c(x = "ModExample"), function(x){ # an element per modification found. } ) ## ----------------------------------------------------------------------------- setClass("ModSetExample", contains = "ModifierSet", prototype = list(elementType = "ModExample")) ModSetExample <- function(x, annotation, sequences, seqinfo, ...){ RNAmodR:::ModifierSet("ModExample", x = x, annotation = annotation, sequences = sequences, seqinfo = seqinfo, ...) } ## ----------------------------------------------------------------------------- setMethod( f = "getDataTrack", signature = signature(x = "ExampleSequenceData"), definition = function(x, name, ...) { ### } ) setMethod( f = "getDataTrack", signature = signature(x = "ModExample"), definition = function(x, name, type, ...) { } ) setMethod( f = "plotDataByCoord", signature = signature(x = "ModExample", coord = "GRanges"), definition = function(x, coord, type = "score", window.size = 15L, ...) { } ) setMethod( f = "plotData", signature = signature(x = "ModExample"), definition = function(x, name, from, to, type = "score", ...) { } ) setMethod( f = "plotDataByCoord", signature = signature(x = "ModSetExample", coord = "GRanges"), definition = function(x, coord, type = "score", window.size = 15L, ...) { } ) setMethod( f = "plotData", signature = signature(x = "ModSetExample"), definition = function(x, name, from, to, type = "score", ...) { } ) ## ----------------------------------------------------------------------------- sessionInfo()