gc_ms.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:edd 作者: JBEI 项目源码 文件源码
def find_peaks_automatically_and_export (self,
      n_expected=None,
      include_headers=False) :
    err = StringIO()
    peak_times, bandwidth = self.find_consensus_peaks(
      n_expected=n_expected, err=err)
    table, errors = self.extract_peak_areas(peak_times, bandwidth, err=err)
    if include_headers :
      table.insert(0, ["Sample ID"] +
                      ["Peak %d" % (i+1) for i in range(len(peak_times)) ])
      table.insert(1, [None] + ["%.4fm" % x for x in peak_times])
    return {
      "data_type" : "gc_ms",
      "auto_peak" : True,
      "bandwidth" : bandwidth,
      "bandwidth_auto" : True, #bandwidth_auto,
      "peak_times" : peak_times,
      "sample_data" : table,
      "errors" : errors,
      "samples" : jsonpickle.encode(self.samples),
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号