【问题标题】:Error while making SummarizedExperiment进行 SummarizedExperiment 时出错
【发布时间】: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&lt;-(*tmp*, value = c("X", "SRR1554537", "SRR1554538", 中的错误: 无效的行名长度

你能解释一下错误吗?

【问题讨论】:

  • 我注意到您使用的是 Bioconductor 的 SummarizedExperiment 包。请注意您在问题中加载的包?

标签: r bioinformatics bioconductor


【解决方案1】:

我不明白你想用row_data 做什么,但它显然不起作用。您已经从计数表中获得了基因名称。为什么不这样做

Brain_Es <- SummarizedExperiment(assays = list(counts = count_feature), colData = col_data, rowData = rownames(count_feature));

查看?SummarizedExperiment,以及“构造SummarizedExperiment”部分中给出的here 示例。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-10-11
    • 2016-02-28
    • 1970-01-01
    • 1970-01-01
    • 2021-07-24
    • 2017-10-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多