reftools.py 文件源码

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

项目:XYalign 作者: WilsonSayresLab 项目源码 文件源码
def index_bwa(self):
        """
        Index reference using bwa

        Returns
        -------

        bool
            True if successful

        Raises
        ------

        RuntimeError
            If return code from external call is not 0

        """
        self.logger.info("Creating bwa indices for: {}".format(
            self.filepath))
        bwa_idx_start = time.time()
        rc = subprocess.call([self.bwa, "index", self.filepath])
        if rc == 0:
            self.logger.info(
                "BWA indexing complete. Elapsed time: {} seconds".format(
                    time.time() - bwa_idx_start))
            return True
        else:
            self.logger.error(
                "Unable to create bwa indices for {}. Exiting".format(
                    self.filepath))
            logging.shutdown()
            raise RuntimeError("Unable to create bwa indicies. Exiting")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号