首页 > 解决方案 > 绘制免疫表型图:暗示不同数量 rof 行错误的参数

问题描述

我遇到了一个错误:

Error in data.frame(start = c(0, 2.5, 5, 7.5, 10, 15, seq(20, 39), 0, :
 arguments imply differing number of rows: 31, 30, 36

当我试图绘制免疫表型图时。产生错误的代码如下。请帮忙!

data_a <- data.frame(
  start = c(0, 2.5, 5, 7.5, 10, 15, seq(20, 39), 0, 5, 10, 15, 20),
  end = c(2.5, 5, 7.5, 10, 15, seq(20, 40), 0, 5, 10, 15, 20),
  y1 = c(rep(2.6, 26), rep(0.4, 4)),
  y2 = c(rep(5.6, 26), rep(2.2, 4)),
  z = c(MIG[c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)],
        Activated_B_cell, Active_CD4_T_cell, Active_CD8_T_cell,
        Effector_Memory_CD4_T_cell, Effector_Memory_CD8_T_cell, MDSC,
        Natural_Killer_cell, Neutrophil, Regulatory_T_cell, MHC,
        Immune_Checkpoint, Angiogenesis_Avastin_drug_response_marker,
        Catalytic_Activity, Hypoxia_monitor, Immune_Response_Signature,
        Stimulatory_dentritic_cell_regulation, Tumor_Secretory_Cytokines,
        Wnt_signaling),
  vcol = c(unlist(lapply(MIG[c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)],
                         mapcolors)),
           unlist(lapply(c(
             Activated_B_cell, Active_CD4_T_cell, Active_CD8_T_cell,
             Effector_Memory_CD4_T_cell, Effector_Memory_CD8_T_cell, MDSC,
             Natural_Killer_cell, Neutrophil, Regulatory_T_cell, MHC,
             Immune_Checkpoint, Angiogenesis_Avastin_drug_response_marker,
             Catalytic_Activity, Hypoxia_monitor, Immune_Response_Signature,
             Stimulatory_dentritic_cell_regulation, Tumor_Secretory_Cytokines,
             Wnt_signaling),
             mapbw))),
  label = c(unique_ips_genes[c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)],
            "Activated B cell", "Active CD4 T cell", "Active CD8 T cell",
            "Effector Memory CD4 T cell", "Effector Memory CD8 T cell", "MDSC",
            "Natural Killer cell", "Neutrophil", "Regulatory T cell", "MHC",
            "Immune Checkpoint", "Angiogenesis - Avastin drug response marker",
            "Catalytic Activity", "Hypoxia monitor", "Immune Response Signature",
            "Stimulatory dentritic cell regulation", "Tumor Secretory Cytokines",
            "Wnt signaling")
)

标签: r

解决方案


推荐阅读