首页 > 解决方案 > 如何使用 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.

在此处输入图像描述

标签: pythonrdataframeplot

解决方案


推荐阅读