我寫信叫Expression
一個S4級,並希望包括S4對象,DESeq2 = "DESeqDataSet"
作爲插槽中的S4對象:包括從現有的包作爲一個新的S4類別的插槽
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插槽。
這裏是一個特拉維斯-CI構建拋出警告的一個例子 - https://travis-ci.org/caseywdunn/agalmar/builds/138564256
令人難以置信的幫助 - 謝謝。我將roxygen2行添加到我的類文檔中,警告消失了。非常感激。 –