检查数据是否正确

代码:

multiExpr=read.csv("5000.csv",header=T,comment.char = "",check.names=F)
datTraits=read.csv("Trait1.csv",row.names=1,header=T,comment.char = "",check.names=F)
allowWGCNAThreads()
ALLOW_WGCNA_THREADS=4
memory.limit(size = 20000)
# 检查数据是否正确:
exprSize = checkSets(multiExpr)
# 统计样本数量和基因数量

运行结果:

> multiExpr=read.csv("5000.csv",header=T,comment.char = "",check.names=F)
> datTraits=read.csv("Trait1.csv",row.names=1,header=T,comment.char = "",check.names=F)
> allowWGCNAThreads()
Allowing multi-threading with up to 8 threads.
> ALLOW_WGCNA_THREADS=4
> memory.limit(size = 20000)
[1] 32457
Warning message:
In memory.limit(size = 20000) : cannot decrease memory limit: ignored
> # 查看部分样本数据和性状数据:
> # 查看部分样本数据和性状数据:
> multiExpr[[1]]$data[1:5,1:5]
Error in multiExpr[[1]]$data : $ operator is invalid for atomic vectors
> #2. 查看样本数据是否完整:
> # 检查数据是否正确:
> exprSize = checkSets(multiExpr)
Error in checkSets(multiExpr) : 
  data does not appear to have the correct format. Consider using fixDataStructureor setting checkStructure = TRUE when calling this function.
读入数据后,我的基因只有5000个,上面
> memory.limit(size = 20000)
[1] 32457    这里怎么是32457

检查数据是否正确时 出现以下错误:
> exprSize = checkSets(multiExpr)
Error in checkSets(multiExpr) : 
  data does not appear to have the correct format. Consider using fixDataStructureor setting checkStructure = TRUE when calling this function.






请先 登录 后评论

1 个回答

Daitoue

checkSets设置一下参数(checkStructure=T)

请先 登录 后评论

相似问题