auto_process_ngs.indexes
Provides a utility class IndexBuilder
with methods for building
indexes for various aligners:
bowtie
bowtie2
STAR
There are also functions for constructing Command instances to run the appropriate index building commands:
bowtie_build_cmd
bowtie2_build_cmd
star_genome_generate_cmd
- class auto_process_ngs.indexes.IndexBuilder(runner, use_conda=False, conda_env_dir=None)
Utility class for building aligner indexes
Provides the following methods:
bowtie
bowtie2
STAR
- Parameters:
runner (JobRunner) – JobRunner instance that will be used to run the index command
use_conda (bool) – if True then try to use Conda to resolve the dependencies for building the indexes
conda_env_dir (str) – explicitly specify the directory to look for/create Conda environments in
- STAR(fasta, annotation, out_dir, memory_limit=None, overhang=100, nthreads=None, star_version=None)
Build index for STAR
- Parameters:
fasta (str) – path to Fasta file
annotation (str) – path to annotation file
out_dir (str) – path to output directory for index files
memory_limit (int) – specify memory limit (optional; default: no limit specified)
overhang (int) – specify overhang (default: 100)
nthreads (int) – specify number of threads to use when making index (defaults to the number defined in the job runner)
star_version (str) – specify the version of STAR to use (only if conda dependency resolution being used)
- bowtie(fasta, out_dir, ebwt_basename=None, bowtie_version=None)
Build index for bowtie
- Parameters:
fasta (str) – path to Fasta file
out_dir (str) – path to output directory for index files
ebwt_basename (str) – optional base name for the output index (.ebwt) files
bowtie_version (str) – specify the version of Bowtie to use (only if conda dependency resolution being used)
- bowtie2(fasta, out_dir, bt2_basename=None, nthreads=None, bowtie2_version=None)
Build index for bowtie2
- Parameters:
fasta (str) – path to Fasta file
out_dir (str) – path to output directory for index files
bt2_basename (str) – optional base name for the output index (.bt2) files
nthreads (int) – specify number of threads to use when making index (defaults to the number defined in the job runner)
bowtie2_version (str) – specify the version of Bowtie2 to use (only if conda dependency resolution being used)
- auto_process_ngs.indexes.bowtie2_build_cmd(fasta, bt2_basename, nthreads=None)
Return command to run ‘bowtie2-build’
- Argument:
fasta (str): path to input Fasta file bt2_basename (str): basename for output
‘bt2’ index files (can include a leading path)
- nthreads (int): optional, specify the
number of threads to run ‘bowtie2-build’ with
- Returns:
- object with the ‘build2-bowtie’
command.
- Return type:
- auto_process_ngs.indexes.bowtie_build_cmd(fasta, ebwt_basename)
Return command to run ‘bowtie-build’
- Argument:
fasta (str): path to input Fasta file ebwt_basename (str): basename for output
‘ebwt’ index files (can include a leading path)
- Returns:
- object with the ‘build-bowtie’
command.
- Return type:
- auto_process_ngs.indexes.star_genome_generate_cmd(fasta, annotation, out_dir, overhang=None, nthreads=None, memory_limit=None)
Return command to run ‘STAR’ to build an index
- Argument:
fasta (str): path to input Fasta file annotation (str): path to input annotation file out_dir (str): path to directory to write index
files into
- overhang (int): optional, specify the overhang
value to use
- nthreads (int): optional, specify the
number of threads to run ‘STAR’ with
- memory_limit (int): optional, specify the memory
limit to run ‘STAR’ with
- Returns:
object with the ‘STAR’ command.
- Return type: