Skip to main content

Sensospot 数据解析器

项目描述

Sensospot 数据解析器

解析SensoSpot微阵列分析的数值输出。

SensoSpot阵列分析仪是一种自动荧光显微镜,带有用于检测和测量微阵列的图像分析软件。该产品的最初名称是 Sensovation 公司的“​​FLAIR”,后来被美天旎收购。

我与 Sensovation 或美天旎没有任何隶属关系,我只是使用该产品,需要一种方法来使数据可用于进一步分析。

例子:

    import sensospot_parser

    # read the raw data of a folder
    raw_data = sensospot_parser.parse_folder(<path to results directory>)

    sorted(raw_data.columns) == [
        'Analysis.Name', 
        'Bkg.Area', 'Bkg.Mean', 'Bkg.Median', 'Bkg.StdDev', 'Bkg.Sum', 
        'Exposure.Id', 
        'Parameters.Channel', 'Parameters.Time', 
        'Pos.Id', 'Pos.Nom.X', 'Pos.Nom.Y', 'Pos.X', 'Pos.Y', 
        'Spot.Area', 'Spot.Diameter', 'Spot.Found', 'Spot.Mean', 'Spot.Median', 
        'Spot.Saturation', 'Spot.StdDev', 'Spot.Sum', 
        'Well.Column', 'Well.Name', 'Well.Row'
    ]

常数

有一个columns可用的模块,提供定义列名的常量。

    import sensospot_parser

    sensospot_parser.columns.ANALYSIS_NAME == "Analysis.Name"

可用的公共功能:

  • parse_folder(path_to_folder) 在文件夹中搜索可解析的 Sensospot .csv 文件,将它们解析为一个大的 pandas 数据框,并从参数文件夹中添加额外的元数据(如果存在)。
  • parse_file(path_to_csv_file) 将 Sensospot csv 文件解析为 pandas 数据框,并从文件名中添加一些额外的元数据。在内部也被parse_folder()

命令行界面

对于(可能)最重要的功能,甚至还有一个 cli 命令

Usage: sensospot_parse [OPTIONS] SOURCE

Arguments:
  SOURCE:             Folder with Sensospot measurement

Options:
  -o, --outfile TEXT  Output file name, use a dash '-' for stdout, default:
                      'collected_data.csv'
  -q, --quiet         Ignore Sanity Check
  -r, --recurse       Recurse into folders one level down
  --help              Show this message and exit.

发展

要安装 Sensovation Data Parser 的开发版本:

git clone https://git.cpi.imtek.uni-freiburg.de/holgi/sensospot_data.git

# create a virtual environment and install all required dev dependencies
cd sensospot_data
make devenv

要运行测试,请使用make tests(第一个错误时失败)或make coverage获取完整报告。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

sensospot_parser-0.8.1.tar.gz (2.3 MB 查看哈希

已上传 source

内置分布

sensospot_parser-0.8.1-py3-none-any.whl (9.0 kB 查看哈希

已上传 py3