【问题标题】:Is there an R function to convert 'flowFrame' structure of 'flowCore' package to a 'data.frame'?是否有 R 函数将“flowCore”包的“flowFrame”结构转换为“data.frame”?
【发布时间】:2022-02-03 04:46:46
【问题描述】:

目标:使用 R 语言将 .fcs 数据作为数据框查看。

流式细胞仪数据采用 .fcs 文件格式。使用flowCore包的读取功能在flowFrame结构生产者中读取文件。我想在 R 中阅读它。如何将其转换为 data.frame 结构?

数据如下:-

【问题讨论】:

  • 请包含此类对象的最小示例

标签: r dataframe type-conversion


【解决方案1】:

使用 __ 包的 exprs 函数。 虽然它的documentation 没有明确说明这个用例,但它对我有用。

df = fcs@exprs

在哪里,

fcs  =read.FCS("File_lcoation", truncate_max_range = FALSE)

要求:-

  1. flowCore (read.FCS)-代码:

    if (!require("BiocManager", quiet = TRUE))

    install.packages("BiocManager")

    BiocManager::install("flowCore")

  2. MetaCyto (exprs)-代码: if (!require("BiocManager", quiet = TRUE))
    install.packages("BiocManager")

    BiocManager::install("MetaCyto")

【讨论】:

    猜你喜欢
    • 2015-12-30
    • 2011-04-01
    • 2019-09-16
    • 2013-02-28
    • 2020-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-12
    相关资源
    最近更新 更多