phe.mapping.BWAMapper module

Implementation of the Mapper class using BWA (Heng Li) mapper.

Date:17 Sep, 2015
Author:Alex Jironkin
class BWAMapper(cmd_options=None)[source]

Bases: phe.mapping.Mapper

BWA mapper developed by Heng Li.

Methods

get_samtools_version() Get version of samtools used.
make_bam(*args, **kwargs) Make indexed BAM from reference, and fastq files.
validate() Validate itself, by checking appropriate commands can run.
create_aux_files  
get_info  
get_meta  
get_version  
make_sam  
create_aux_files(ref)[source]

Create required auxiliary files for ref.

Parameters:
ref: str

Path to the reference file.

Returns:
bool:

True if auxiliary files were created, False otherwise.

get_info(plain=False)[source]

Get information about the mapper.

get_version()[source]

Get the version of the underlying command used.

make_sam(*args, **kwargs)[source]

Make SAM from reference, and fastq files.

Parameters:
ref: str

Path to the reference file used for mapping.

R1: str

Path to the R1/Forward reads file in FastQ format.

R2: str:

Path to the R2/Reverse reads file in FastQ format.

out_file: str

Name of the output file where SAM data is written.

sample_name: str

Name of the sample to be included in the read group (RG) field.

make_aux: bool, optional

True/False to make auxilliary files (default: False).

Returns:
bool:

True iff mapping returns 0, False otherwise.

name = 'bwa'

Plain text name of the mapper.