visualize.py 文件源码

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

项目:mbin 作者: fanglab 项目源码 文件源码
def parse_fields( self ):
        """
        Read in the fields contained in the output files from methylprofiles.
        """
        m = np.loadtxt(self.mfn, dtype="str", skiprows=1)
        o = np.loadtxt(self.ofn, dtype="str", skiprows=1)

        # Optional flags
        m = self.length_filter(m)
        o = self.length_filter(o)
        if self.opts.n_seqs!=None:
            m = self.subsample_seqs( m )
            o = self.subsample_seqs( o )

        # Pull out values
        self.ids     = m[:,0].astype("str")
        self.lens    = m[:,1].astype("int")
        self.mscores = m[:,2:].astype("float")
        if self.opts.seq_type=="contig":
            self.covs     = o[:,2].astype("float")
            self.covcomps = o[:,2:].astype("float")
            self.comps    = o[:,3:].astype("float")
        else:
            self.comps    = o[:,2:].astype("float")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号