align.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def _index_reference(self, index_path, **kwargs):
        """
        Generates a bowtie2 index for the specified reference file.

        Args:
            index_path (str): path to index prefix
            **kwargs: Any additional arguments to bowtie2-build may be included. Flags may have value set to None. Values
                are not validated. Parameters with hypens in name should be defined using underscores in place of hypens.

        Notes:
            Bowtie2 generates temporary files for indexing as a side-effect.

        Examples:
            kwargs can be specified as such: myBowtie2._index_reference(index_path, large_index=None, bmax=4)

        """

        additional_arguments = cr_utils.kwargs_to_command_line_options(set(), replace_chars={'_': '-'}, **kwargs)

        command = 'bowtie2-build %s %s %s' % (additional_arguments, self.reference_fasta_path, index_path)
        subprocess.check_call(command, shell=True)

        self.index_path = index_path
        self.indexed = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号