【发布时间】:2016-10-04 08:30:12
【问题描述】:
我想做一个 SummarizedExperiment, 我在 FeatureCount.txt 中有这种格式的计数表
SRR1554537 SRR1554538 SRR1554541 SRR1554535 SRR1554536 SRR1554539
1/2-SBSRNA4 39 66 72 23 16 7
A1BG 221 113 226 146 36 126
A1BG-AS1 393 296 527 276 39 258
A1CF 8 7 5 1 0 4
A2LD1 97 208 171 181 72 110
我有这种格式的表型数据:
SampleName RUN Age sex tissue disease
SRR1554537 R3452_DLPFC_polyA_RNAseq_total SRR1554537 -0.384 female DLPFC control
SRR1554538 R3462_DLPFC_polyA_RNAseq_total SRR1554538 -0.4027 female DLPFC control
SRR1554541 R3485_DLPFC_polyA_RNAseq_total SRR1554541 -0.3836 male DLPFC control
SRR1554535 R2869_DLPFC_polyA_RNAseq_total SRR1554535 41.58 male DLPFC control
SRR1554536 R3098_DLPFC_polyA_RNAseq_total SRR1554536 44.17 female DLPFC control
SRR1554539 R3467_DLPFC_polyA_RNAseq_total SRR1554539 36.5 female DLPFC control
这是我的代码:
count_feature <- as.matrix(read.table("featureCount.txt", header = TRUE, stringsAsFactors = FALSE))
phenoData <- read.csv("Pheno_Data.csv", header = TRUE)
col_data <- DataFrame(phenoData)
row_data <- relist(GRanges(), vector("list", length= nrow(count_feature)))
mcols(row_data) <- rownames(count_feature)
Brain_Es <- SummarizedExperiment( assays = list(feature_Count= feature_Count), rowRanges = row_data, colData = col_data)
rownames<-(*tmp*, value = c("X", "SRR1554537", "SRR1554538", 中的错误: 无效的行名长度
你能解释一下错误吗?
【问题讨论】:
-
我注意到您使用的是 Bioconductor 的
SummarizedExperiment包。请注意您在问题中加载的包?
标签: r bioinformatics bioconductor