我有一个输入文件,它试图匹配包(为MWE修剪(给出的示例
数据
structure(list(ID_1 = 1:4, ID_2 = c("MZGVVGDE", "MZDBADNE", "ZBAZDCC",
"ZBCBEAAZ"), event = c(0L, 0L, 0L, 0L), age = c(44L, 62L, 67L,
58L), age_diagnosis = c(40L, 57L, 54L, 5L)), class = "data.frame", row.names = c(NA,
-4L))
ID_1 ID_2 event age age_diagnosis
1 MZGVVGDE 0 44 40
2 MZDBADNE 0 62 57
3 ZBAZDCC 0 67 54
4 ZBCBEAAZ 0 58 5
和R代码(针对MWE进行微调(
michiganCoxSurv(vcf.file=vcf.file,
covariate.file=pheno.file,
id.column="ID_2",
sample.ids=sample.ids,
time.to.event="time",
event="event",
covariates=c("age_diagnosis"),
inter.term=NULL,
print.covs="only",
out.file="michigan_only",
r2.filter=0.3,
maf.filter=0.005,
chunk.size=100,
verbose=TRUE,
clusterObj=NULL)
产生输出:
Analysis started on 2020-08-11 at 15:10:18
Covariates included in the models are: age_diabetes_diagnosis
Error in `[.data.frame`(pheno.file, , c(id.column, time.to.event, event, :
undefined columns selected
Calls: michiganCoxSurv -> coxPheno -> [ -> [.data.frame
Execution halted
如何修复此错误?
您得到了time.to.event="time"
。在你的表型文件中没有命名为时间的列。