【发布时间】:2016-06-18 12:33:39
【问题描述】:
我正在编写一个名为 Expression 的 S4 类,并希望包含一个 S4 对象 DESeq2 = "DESeqDataSet" 作为插槽:
setClass(
Class = "Expression",
representation = representation (
species = "character",
edgeR = "DGEList",
DESeq2 = "DESeqDataSet",
lengths = "matrix",
individuals = "vector",
treatments = "vector",
id = "vector",
samples = "vector",
sample_prep = "vector",
genome_type = "vector",
molecule_type = "vector",
blast_hit = "vector",
rRNA = "vector",
protein = "vector"
))
但是,当我检查包裹时,我收到以下警告:
Found the following significant warnings:
Warning: undefined slot classes in definition of "Expression": DESeq2(class "DESeqDataSet")
该类工作正常(即,现在有错误),但我想修复我们代码中的所有警告。
带有DESeqDataSet 对象(DESeq2,也是我们给插槽的名称)的包被导入包DESCRIPTION 文件中。我是否需要做其他事情才能使其内容可在插槽中使用?例如,我使用setOldClass() 使 S3 类可用于 S4 插槽。
这是一个引发警告的 travis-ci 构建示例 - https://travis-ci.org/caseywdunn/agalmar/builds/138564256
【问题讨论】: