python - 如何使用 Fragman 输出具有拟合 x 轴值的原始数据
问题描述
Fragman 包读取 .fsa 文件,其中包含一些峰的数据。每个文件包含 5 个通道或颜色的峰值。x 轴是以秒为单位的时间,y 轴是峰高。一个通道是梯形图,其中包含以碱基对 (bp) 为单位的已知大小的峰。Fragman 使用此梯形通道将所有通道的 x 轴转换为 bp 单位。然后,它将图形绘制成图表,x 轴为 bp,y 轴为峰高。
我需要的是具有拟合 bp 值的原始数据,而不是绘制数据 - 每个 .fsa 文件最好是三列:1)峰值高度 2)以秒为单位的时间 3)以 bp 为单位的大小。
通过查看“overview2”函数 (Fragman:::overview2) 中的代码,该函数创建了我需要的数据,然后使用它进行绘图。但是,我在函数中看不到哪个对象是最好的尝试和返回。有人可以帮助我吗?
这是一个工作示例:
data(my.plants)
my.plants <- my.plants[1:2] #this is what the .fsa data looks like
plot(my.plants) #converts it to what the .fsa data looks like after the program's imported it.
my.ladder <- c(50, 75, 100, 125, 129, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375) #the size of the known peaks in the ladder channel
ladder.info.attach(stored=my.plants, ladder=my.ladder) #This function adds the known peak heights to the ladder channel.
overview2(my.inds=my.plants, channel = 2:3, ladder=my.ladder, init.thresh=5000) #This is the function that converts the x-axis from seconds to bp, but it then carries on and plots the data. I just want it to export a list or table for each file.
解决方案
推荐阅读
- python - 如何在 python 中使用 plotly 方法添加标题和副标题
- html - 链接下方显示的内容
- c# - 可以从我自己的 Xamerin Android 应用程序启动 Google 助理吗?
- angular - 无法通过自定义指令以编程方式启用和禁用 matTooltip
- matlab - 如何在小波变换中将比例转换为频率
- python-3.x - 我的主要 Python 应用程序如何在子包中运行脚本,该脚本读取子包中的文件
- sql-server - SQL Server - 具有未知数量的多个值的参数
- python - 如何转换excel文件的数据值
- php - 禁止访问 REST Web 服务
- node.js - 如何使用 node-cron node.js 每 21 天运行一次特定功能