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
评论列表
文章目录