首页 > 解决方案 > wgcna goodSamplesGenes 关于基因太少的错误

问题描述

我有三个处理 1、2 和 3。每个处理有三个重复,所以我对每个处理的所有重复进行了平均。总共有30,000个基因。对于这三种治疗方法,我也有 10 种表型。我正在尝试使用 WGCNA 来识别这三种治疗方法中至关重要的基因。我在用:

library(WGCNA)
allowWGCNAThreads() 
##Gene Expression
library(readr)
Expression_File <- read.csv("gene_expression.csv")
Expression_File <- select(Expression_File, Gene_ID, A1, B1, C1)
Expression_File[Expression_File == 0] <- NA
dim(Expression_File)
names(Expression_File)
GE.adjusted=Expression_File
rownames(GE.adjusted)=GE.adjusted[,1]
GE.adjusted=GE.adjusted[,-1]
GE.adjusted=t(GE.adjusted)

##Phenotype
Phenotype_File <- read.csv("phenotype.csv")
dim(Phenotype_File)
Phenotype_File[Phenotype_File == 0] <- NA
Phenotype <- Phenotype_File 
a=Phenotype[,1]
Phenotype=Phenotype[,-1]
Phenotype=t(Phenotype)
Phenotype=as.matrix(Phenotype,ncol=10)
colnames(Phenotype)=c("1","2","3","4","5","6","7","8","9","10")

##Checking data for excessive missing values and identification of outlier samples
gsg = goodSamplesGenes(GE.adjusted, verbose = 3)
gsg$allOK

但我得到一个错误:

Flagging genes and samples with too many missing values...
  ..step 1
Error in goodGenes(GE.adjusted, weights, goodSamples, goodGenes, minFraction = minFraction,  : 
  Too few genes with valid expression levels in the required number of samples.

我将不胜感激任何解决此错误的建议。谢谢!

标签: r

解决方案


推荐阅读