Bio.Sequencing.Applications package

Module contents

Sequencing related command line application wrappers (OBSOLETE).

We have decided to remove this module in future, and instead recommend building your command and invoking it via the subprocess module directly.

class Bio.Sequencing.Applications.BwaIndexCommandline(cmd='bwa', **kwargs)

Bases: AbstractCommandline

Command line wrapper for Burrows Wheeler Aligner (BWA) index.

Index database sequences in the FASTA format, equivalent to:

$ bwa index [-p prefix] [-a algoType] [-c] <in.db.fasta>

See http://bio-bwa.sourceforge.net/bwa.shtml for details.

Examples

>>> from Bio.Sequencing.Applications import BwaIndexCommandline
>>> reference_genome = "/path/to/reference_genome.fasta"
>>> index_cmd = BwaIndexCommandline(infile=reference_genome, algorithm="bwtsw")
>>> print(index_cmd)
bwa index -a bwtsw /path/to/reference_genome.fasta

You would typically run the command using index_cmd() or via the Python subprocess module, as described in the Biopython tutorial.

__init__(cmd='bwa', **kwargs)

Initialize the class.

property algorithm

Algorithm for constructing BWT index.

Available options are:
  • is: IS linear-time algorithm for constructing suffix array. It requires 5.37N memory where N is the size of the database. IS is moderately fast, but does not work with database larger than 2GB. IS is the default algorithm due to its simplicity.

  • bwtsw: Algorithm implemented in BWT-SW. This method works with the whole human genome, but it does not work with database smaller than 10MB and it is usually slower than IS.

This controls the addition of the -a parameter and its associated value. Set this property to the argument value required.

property c

Build color-space index. The input fasta should be in nucleotide space.

This property controls the addition of the -c switch, treat this property as a boolean.

property infile

Input file name

This controls the addition of the infile parameter and its associated value. Set this property to the argument value required.

property prefix

Prefix of the output database [same as db filename]

This controls the addition of the -p parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.BwaAlignCommandline(cmd='bwa', **kwargs)

Bases: AbstractCommandline

Command line wrapper for Burrows Wheeler Aligner (BWA) aln.

Run a BWA alignment, equivalent to:

$ bwa aln [...] <in.db.fasta> <in.query.fq> > <out.sai>

See http://bio-bwa.sourceforge.net/bwa.shtml for details.

Examples

>>> from Bio.Sequencing.Applications import BwaAlignCommandline
>>> reference_genome = "/path/to/reference_genome.fasta"
>>> read_file = "/path/to/read_1.fq"
>>> output_sai_file = "/path/to/read_1.sai"
>>> align_cmd = BwaAlignCommandline(reference=reference_genome, read_file=read_file)
>>> print(align_cmd)
bwa aln /path/to/reference_genome.fasta /path/to/read_1.fq

You would typically run the command line using align_cmd(stdout=output_sai_file) or via the Python subprocess module, as described in the Biopython tutorial.

__init__(cmd='bwa', **kwargs)

Initialize the class.

property B

Length of barcode starting from the 5-end. When INT is positive, the barcode of each read will be trimmed before mapping and will be written at the BC SAM tag. For paired-end reads, the barcode from both ends are concatenated. [0]

This controls the addition of the -B parameter and its associated value. Set this property to the argument value required.

property E

Gap extension penalty [4]

This controls the addition of the -E parameter and its associated value. Set this property to the argument value required.

property I

The input is in the Illumina 1.3+ read format (quality equals ASCII-64).

This property controls the addition of the -I switch, treat this property as a boolean.

property M

Mismatch penalty. BWA will not search for suboptimal hits with a score lower than (bestScore-misMsc). [3]

This controls the addition of the -M parameter and its associated value. Set this property to the argument value required.

property N

Disable iterative search. All hits with no more than maxDiff differences will be found. This mode is much slower than the default.

This property controls the addition of the -N switch, treat this property as a boolean.

property O

Gap open penalty [11]

This controls the addition of the -O parameter and its associated value. Set this property to the argument value required.

property R

Proceed with suboptimal alignments if there are no more than INT equally best hits.

This option only affects paired-end mapping. Increasing this threshold helps to improve the pairing accuracy at the cost of speed, especially for short reads (~32bp).

This controls the addition of the -R parameter and its associated value. Set this property to the argument value required.

property b

Specify the input read sequence file is the BAM format

This property controls the addition of the -b switch, treat this property as a boolean.

property b1

When -b is specified, only use the first read in a read pair in mapping (skip single-end reads and the second reads).

This property controls the addition of the -b1 switch, treat this property as a boolean.

property b2

When -b is specified, only use the second read in a read pair in mapping.

This property controls the addition of the -b2 switch, treat this property as a boolean.

property c

Reverse query but not complement it, which is required for alignment in the color space.

This property controls the addition of the -c switch, treat this property as a boolean.

property d

Disallow a long deletion within INT bp towards the 3-end [16]

This controls the addition of the -d parameter and its associated value. Set this property to the argument value required.

property e

Maximum number of gap extensions, -1 for k-difference mode (disallowing long gaps) [-1]

This controls the addition of the -e parameter and its associated value. Set this property to the argument value required.

property i

Disallow an indel within INT bp towards the ends [5]

This controls the addition of the -i parameter and its associated value. Set this property to the argument value required.

property k

Maximum edit distance in the seed [2]

This controls the addition of the -k parameter and its associated value. Set this property to the argument value required.

property l

Take the first INT subsequence as seed.

If INT is larger than the query sequence, seeding will be disabled. For long reads, this option is typically ranged from 25 to 35 for -k 2. [inf]

This controls the addition of the -l parameter and its associated value. Set this property to the argument value required.

property n

Maximum edit distance if the value is INT, or the fraction of missing alignments given 2% uniform base error rate if FLOAT. In the latter case, the maximum edit distance is automatically chosen for different read lengths. [0.04]

This controls the addition of the -n parameter and its associated value. Set this property to the argument value required.

property o

Maximum edit distance if the value is INT, or the fraction of missing alignments given 2% uniform base error rate if FLOAT. In the latter case, the maximum edit distance is automatically chosen for different read lengths. [0.04]

This controls the addition of the -o parameter and its associated value. Set this property to the argument value required.

property q

Parameter for read trimming [0].

BWA trims a read down to argmax_x{sum_{i=x+1}^l(INT-q_i)} if q_l<INT where l is the original read length.

This controls the addition of the -q parameter and its associated value. Set this property to the argument value required.

property read_file

Read file name

This controls the addition of the read_file parameter and its associated value. Set this property to the argument value required.

property reference

Reference file name

This controls the addition of the reference parameter and its associated value. Set this property to the argument value required.

property t

Number of threads (multi-threading mode) [1]

This controls the addition of the -t parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.BwaSamseCommandline(cmd='bwa', **kwargs)

Bases: AbstractCommandline

Command line wrapper for Burrows Wheeler Aligner (BWA) samse.

Generate alignments in the SAM format given single-end reads. Equvialent to:

$ bwa samse [-n maxOcc] <in.db.fasta> <in.sai> <in.fq> > <out.sam>

See http://bio-bwa.sourceforge.net/bwa.shtml for details.

Examples

>>> from Bio.Sequencing.Applications import BwaSamseCommandline
>>> reference_genome = "/path/to/reference_genome.fasta"
>>> read_file = "/path/to/read_1.fq"
>>> sai_file = "/path/to/read_1.sai"
>>> output_sam_file = "/path/to/read_1.sam"
>>> samse_cmd = BwaSamseCommandline(reference=reference_genome,
...                                 read_file=read_file, sai_file=sai_file)
>>> print(samse_cmd)
bwa samse /path/to/reference_genome.fasta /path/to/read_1.sai /path/to/read_1.fq

You would typically run the command line using samse_cmd(stdout=output_sam_file) or via the Python subprocess module, as described in the Biopython tutorial.

__init__(cmd='bwa', **kwargs)

Initialize the class.

property n

Maximum number of alignments to output in the XA tag for reads paired properly.

If a read has more than INT hits, the XA tag will not be written. [3]

This controls the addition of the -n parameter and its associated value. Set this property to the argument value required.

property r

Specify the read group in a format like @RG ID:foo SM:bar’. [null]

This controls the addition of the -r parameter and its associated value. Set this property to the argument value required.

property read_file

Read file name

This controls the addition of the read_file parameter and its associated value. Set this property to the argument value required.

property reference

Reference file name

This controls the addition of the reference parameter and its associated value. Set this property to the argument value required.

property sai_file

Sai file name

This controls the addition of the sai_file parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.BwaSampeCommandline(cmd='bwa', **kwargs)

Bases: AbstractCommandline

Command line wrapper for Burrows Wheeler Aligner (BWA) sampe.

Generate alignments in the SAM format given paired-end reads. Equivalent to:

$ bwa sampe [...] <in.db.fasta> <in1.sai> <in2.sai> <in1.fq> <in2.fq> > <out.sam>

See http://bio-bwa.sourceforge.net/bwa.shtml for details.

Examples

>>> from Bio.Sequencing.Applications import BwaSampeCommandline
>>> reference_genome = "/path/to/reference_genome.fasta"
>>> read_file1 = "/path/to/read_1.fq"
>>> read_file2 = "/path/to/read_2.fq"
>>> sai_file1 = "/path/to/read_1.sai"
>>> sai_file2 = "/path/to/read_2.sai"
>>> output_sam_file = "/path/to/output.sam"
>>> read_group = r"@RG\tID:foo\tSM:bar"  # BWA will turn backslash-t into tab
>>> sampe_cmd = BwaSampeCommandline(reference=reference_genome,
...                                 sai_file1=sai_file1, sai_file2=sai_file2,
...                                 read_file1=read_file1, read_file2=read_file2,
...                                 r=read_group)
>>> print(sampe_cmd)
bwa sampe /path/to/reference_genome.fasta /path/to/read_1.sai /path/to/read_2.sai /path/to/read_1.fq /path/to/read_2.fq -r @RG\tID:foo\tSM:bar

You would typically run the command line using sampe_cmd(stdout=output_sam_file) or via the Python subprocess module, as described in the Biopython tutorial.

__init__(cmd='bwa', **kwargs)

Initialize the class.

property N

Maximum number of alignments to output in the XA tag for disconcordant read pairs (excluding singletons) [10].

If a read has more than INT hits, the XA tag will not be written.

This controls the addition of the -N parameter and its associated value. Set this property to the argument value required.

property a

Maximum insert size for a read pair to be considered being mapped properly [500].

Since 0.4.5, this option is only used when there are not enough good alignments to infer the distribution of insert sizes.

This controls the addition of the -a parameter and its associated value. Set this property to the argument value required.

property n

Maximum number of alignments to output in the XA tag for reads paired properly [3].

If a read has more than INT hits, the XA tag will not be written.

This controls the addition of the -n parameter and its associated value. Set this property to the argument value required.

property o

Maximum occurrences of a read for pairing [100000].

A read with more occurrences will be treated as a single-end read. Reducing this parameter helps faster pairing.

This controls the addition of the -o parameter and its associated value. Set this property to the argument value required.

property r

Specify the read group in a format like @RG ID:foo SM:bar’. [null]

This controls the addition of the -r parameter and its associated value. Set this property to the argument value required.

property read_file1

Read file 1

This controls the addition of the read_file1 parameter and its associated value. Set this property to the argument value required.

property read_file2

Read file 2

This controls the addition of the read_file2 parameter and its associated value. Set this property to the argument value required.

property reference

Reference file name

This controls the addition of the reference parameter and its associated value. Set this property to the argument value required.

property sai_file1

Sai file 1

This controls the addition of the sai_file1 parameter and its associated value. Set this property to the argument value required.

property sai_file2

Sai file 2

This controls the addition of the sai_file2 parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.BwaBwaswCommandline(cmd='bwa', **kwargs)

Bases: AbstractCommandline

Command line wrapper for Burrows Wheeler Aligner (BWA) bwasw.

Align query sequences from FASTQ files. Equivalent to:

$ bwa bwasw [...] <in.db.fasta> <in.fq>

See http://bio-bwa.sourceforge.net/bwa.shtml for details.

Examples

>>> from Bio.Sequencing.Applications import BwaBwaswCommandline
>>> reference_genome = "/path/to/reference_genome.fasta"
>>> read_file = "/path/to/read_1.fq"
>>> bwasw_cmd = BwaBwaswCommandline(reference=reference_genome, read_file=read_file)
>>> print(bwasw_cmd)
bwa bwasw /path/to/reference_genome.fasta /path/to/read_1.fq

You would typically run the command line using bwasw_cmd() or via the Python subprocess module, as described in the Biopython tutorial.

__init__(cmd='bwa', **kwargs)

Initialize the class.

property N

Minimum number of seeds supporting the resultant alignment to skip reverse alignment. [5]

This controls the addition of the -N parameter and its associated value. Set this property to the argument value required.

property T

Minimum score threshold divided by a [37]

This controls the addition of the -T parameter and its associated value. Set this property to the argument value required.

property a

Score of a match [1]

This controls the addition of the -a parameter and its associated value. Set this property to the argument value required.

property b

Mismatch penalty [3]

This controls the addition of the -b parameter and its associated value. Set this property to the argument value required.

property c

Coefficient for threshold adjustment according to query length [5.5].

Given an l-long query, the threshold for a hit to be retained is a*max{T,c*log(l)}.

This controls the addition of the -c parameter and its associated value. Set this property to the argument value required.

property mate_file

Mate file

This controls the addition of the mate_file parameter and its associated value. Set this property to the argument value required.

property q

Gap open penalty [5]

This controls the addition of the -q parameter and its associated value. Set this property to the argument value required.

property r

Gap extension penalty. The penalty for a contiguous gap of size k is q+k*r. [2]

This controls the addition of the -r parameter and its associated value. Set this property to the argument value required.

property read_file

Read file

This controls the addition of the read_file parameter and its associated value. Set this property to the argument value required.

property reference

Reference file name

This controls the addition of the reference parameter and its associated value. Set this property to the argument value required.

property s

Maximum SA interval size for initiating a seed [3].

Higher -s increases accuracy at the cost of speed.

This controls the addition of the -s parameter and its associated value. Set this property to the argument value required.

property t

Number of threads in the multi-threading mode [1]

This controls the addition of the -t parameter and its associated value. Set this property to the argument value required.

property w

Band width in the banded alignment [33]

This controls the addition of the -w parameter and its associated value. Set this property to the argument value required.

property z

Z-best heuristics. Higher -z increases accuracy at the cost of speed. [1]

This controls the addition of the -z parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.BwaMemCommandline(cmd='bwa', **kwargs)

Bases: AbstractCommandline

Command line wrapper for Burrows Wheeler Aligner (BWA) mem.

Run a BWA-MEM alignment, with single- or paired-end reads, equivalent to:

$ bwa mem [...] <in.db.fasta> <in1.fq> <in2.fq> > <out.sam>

See http://bio-bwa.sourceforge.net/bwa.shtml for details.

Examples

>>> from Bio.Sequencing.Applications import BwaMemCommandline
>>> reference_genome = "/path/to/reference_genome.fasta"
>>> read_file = "/path/to/read_1.fq"
>>> output_sam_file = "/path/to/output.sam"
>>> align_cmd = BwaMemCommandline(reference=reference_genome, read_file1=read_file)
>>> print(align_cmd)
bwa mem /path/to/reference_genome.fasta /path/to/read_1.fq

You would typically run the command line using align_cmd(stdout=output_sam_file) or via the Python subprocess module, as described in the Biopython tutorial.

__init__(cmd='bwa', **kwargs)

Initialize the class.

property A

Matching score. [1]

This controls the addition of the -A parameter and its associated value. Set this property to the argument value required.

property B

Mismatch penalty. The sequence error rate is approximately: {.75 * exp[-log(4) * B/A]}. [4]

This controls the addition of the -B parameter and its associated value. Set this property to the argument value required.

property C

Append FASTA/Q comment to SAM output. This option can be used to transfer read meta information (e.g. barcode) to the SAM output. Note that the FASTA/Q comment (the string after a space in the header line) must conform the SAM spec (e.g. BC:Z:CGTAC). Malformated comments lead to incorrect SAM output.

This property controls the addition of the -C switch, treat this property as a boolean.

property E

Gap extension penalty. A gap of length k costs O + k*E (i.e. -O is for opening a zero-length gap). [1]

This controls the addition of the -E parameter and its associated value. Set this property to the argument value required.

property H

Use hard clipping ‘H’ in the SAM output. This option may dramatically reduce the redundancy of output when mapping long contig or BAC sequences.

This property controls the addition of the -H switch, treat this property as a boolean.

property L

Clipping penalty. When performing SW extension, BWA-MEM keeps track of the best score reaching the end of query. If this score is larger than the best SW score minus the clipping penalty, clipping will not be applied. Note that in this case, the SAM AS tag reports the best SW score; clipping penalty is not deducted. [5]

This controls the addition of the -L parameter and its associated value. Set this property to the argument value required.

property M

Mark shorter split hits as secondary (for Picard compatibility).

This property controls the addition of the -M switch, treat this property as a boolean.

property O

Gap open penalty. [6]

This controls the addition of the -O parameter and its associated value. Set this property to the argument value required.

property P

In the paired-end mode, perform SW to rescue missing hits only but do not try to find hits that fit a proper pair.

This property controls the addition of the -P switch, treat this property as a boolean.

property R

Complete read group header line. ‘t’ can be used in STR and will be converted to a TAB in the output SAM. The read group ID will be attached to every read in the output. An example is @RG ID:foo SM:bar’. [null]

This controls the addition of the -R parameter and its associated value. Set this property to the argument value required.

property T

Don’t output alignment with score lower than INT. This option only affects output. [30]

This controls the addition of the -T parameter and its associated value. Set this property to the argument value required.

property U

Penalty for an unpaired read pair. BWA-MEM scores an unpaired read pair as scoreRead1+scoreRead2-INT and scores a paired as scoreRead1+scoreRead2-insertPenalty. It compares these two scores to determine whether we should force pairing. [9]

This controls the addition of the -U parameter and its associated value. Set this property to the argument value required.

property a

Output all found alignments for single-end or unpaired paired-end reads. These alignments will be flagged as secondary alignments.

This property controls the addition of the -a switch, treat this property as a boolean.

property c

Discard a MEM if it has more than INT occurrence in the genome. This is an insensitive parameter. [10000]

This controls the addition of the -c parameter and its associated value. Set this property to the argument value required.

property d

Off-diagonal X-dropoff (Z-dropoff). Stop extension when the difference between the best and the current extension score is above |i-j|*A+INT, where i and j are the current positions of the query and reference, respectively, and A is the matching score. Z-dropoff is similar to BLAST’s X-dropoff except that it doesn’t penalize gaps in one of the sequences in the alignment. Z-dropoff not only avoids unnecessary extension, but also reduces poor alignments inside a long good alignment. [100]

This controls the addition of the -d parameter and its associated value. Set this property to the argument value required.

property k

Minimum seed length. Matches shorter than INT will be missed. The alignment speed is usually insensitive to this value unless it significantly deviates 20. [19]

This controls the addition of the -k parameter and its associated value. Set this property to the argument value required.

property p

Assume the first input query file is interleaved paired-end FASTA/Q. See the command description for details.

This property controls the addition of the -p switch, treat this property as a boolean.

property r

Trigger re-seeding for a MEM longer than minSeedLen*FLOAT. This is a key heuristic parameter for tuning the performance. Larger value yields fewer seeds, which leads to faster alignment speed but lower accuracy. [1.5]

This controls the addition of the -r parameter and its associated value. Set this property to the argument value required.

property read_file1

Read 1 file name

This controls the addition of the read_file1 parameter and its associated value. Set this property to the argument value required.

property read_file2

Read 2 file name

This controls the addition of the read_file2 parameter and its associated value. Set this property to the argument value required.

property reference

Reference file name

This controls the addition of the reference parameter and its associated value. Set this property to the argument value required.

property t

Number of threads [1]

This controls the addition of the -t parameter and its associated value. Set this property to the argument value required.

property v

Control the verbose level of the output. This option has not been fully supported throughout BWA. Ideally, a value 0 for disabling all the output to stderr; 1 for outputting errors only; 2 for warnings and errors; 3 for all normal messages; 4 or higher for debugging. When this option takes value 4, the output is not SAM. [3]

This controls the addition of the -v parameter and its associated value. Set this property to the argument value required.

property w

Band width. Essentially, gaps longer than INT will not be found. Note that the maximum gap length is also affected by the scoring matrix and the hit length, not solely determined by this option. [100]

This controls the addition of the -w parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.NovoalignCommandline(cmd='novoalign', **kwargs)

Bases: AbstractCommandline

Command line wrapper for novoalign by Novocraft.

See www.novocraft.com - novoalign is a short read alignment program.

Examples

>>> from Bio.Sequencing.Applications import NovoalignCommandline
>>> novoalign_cline = NovoalignCommandline(database='some_db',
...                                        readfile='some_seq.txt')
>>> print(novoalign_cline)
novoalign -d some_db -f some_seq.txt

As with all the Biopython application wrappers, you can also add or change options after creating the object:

>>> novoalign_cline.format = 'PRBnSEQ'
>>> novoalign_cline.r_method='0.99' # limited valid values
>>> novoalign_cline.fragment = '250 20' # must be given as a string
>>> novoalign_cline.miRNA = 100
>>> print(novoalign_cline)
novoalign -d some_db -f some_seq.txt -F PRBnSEQ -r 0.99 -i 250 20 -m 100

You would typically run the command line with novoalign_cline() or via the Python subprocess module, as described in the Biopython tutorial.

Last checked against version: 2.05.04

__init__(cmd='novoalign', **kwargs)

Initialize the class.

property adapter3

Strips a 3’ adapter sequence prior to alignment.

With paired ends two adapters can be specified

This controls the addition of the -a parameter and its associated value. Set this property to the argument value required.

property adapter5

Strips a 5’ adapter sequence.

Similar to -a (adaptor3), but on the 5’ end.

This controls the addition of the -5 parameter and its associated value. Set this property to the argument value required.

property cores

Number of threads, disabled on free versions [default: number of cores]

This controls the addition of the -c parameter and its associated value. Set this property to the argument value required.

property database

database filename

This controls the addition of the -d parameter and its associated value. Set this property to the argument value required.

property format

Format of read files.

Allowed values: FA, SLXFQ, STDFQ, ILMFQ, PRB, PRBnSEQ

This controls the addition of the -F parameter and its associated value. Set this property to the argument value required.

property fragment

Fragment length (2 reads + insert) and standard deviation [default: 250 30]

This controls the addition of the -i parameter and its associated value. Set this property to the argument value required.

property gap_extend

Gap extend penalty [default: 15]

This controls the addition of the -x parameter and its associated value. Set this property to the argument value required.

property gap_open

Gap opening penalty [default: 40]

This controls the addition of the -g parameter and its associated value. Set this property to the argument value required.

property good_bases

Minimum number of good quality bases [default: log(N_g, 4) + 5]

This controls the addition of the -l parameter and its associated value. Set this property to the argument value required.

property homopolymer

Homopolymer read filter [default: 20; disable: negative value]

This controls the addition of the -h parameter and its associated value. Set this property to the argument value required.

property miRNA

Sets miRNA mode and optionally sets a value for the region scanned [default: off]

This controls the addition of the -m parameter and its associated value. Set this property to the argument value required.

property qual_digits

Decimal digits for quality scores [default: 0]

This controls the addition of the -q parameter and its associated value. Set this property to the argument value required.

property quality

Lower threshold for an alignment to be reported [default: 0]

This controls the addition of the -Q parameter and its associated value. Set this property to the argument value required.

property r_method

Methods to report reads with multiple matches.

Allowed values: None, Random, All, Exhaustive, 0.99 ‘All’ and ‘Exhaustive’ accept limits.

This controls the addition of the -r parameter and its associated value. Set this property to the argument value required.

property read_cal

Read quality calibration from file (mismatch counts)

This controls the addition of the -k parameter and its associated value. Set this property to the argument value required.

property readfile

read file

This controls the addition of the -f parameter and its associated value. Set this property to the argument value required.

property recorded

Alignments recorded with score equal to the best.

Default: 1000 in default read method, otherwise no limit.

This controls the addition of the -e parameter and its associated value. Set this property to the argument value required.

property repeats

If score difference is higher, report repeats.

Otherwise -r read method applies [default: 5]

This controls the addition of the -R parameter and its associated value. Set this property to the argument value required.

property report

Specifies the report format.

Allowed values: Native, Pairwise, SAM Default: Native

This controls the addition of the -o parameter and its associated value. Set this property to the argument value required.

property threshold

Threshold for alignment score

This controls the addition of the -t parameter and its associated value. Set this property to the argument value required.

property trimming

If fail to align, trim by s bases until they map or become shorter than l.

Ddefault: 2

This controls the addition of the -s parameter and its associated value. Set this property to the argument value required.

property truncate

Truncate to specific length before alignment

This controls the addition of the -n parameter and its associated value. Set this property to the argument value required.

property unconverted

Experimental: unconverted cytosines penalty in bisulfite mode

Default: no penalty

This controls the addition of the -u parameter and its associated value. Set this property to the argument value required.

property variation

Structural variation penalty [default: 70]

This controls the addition of the -v parameter and its associated value. Set this property to the argument value required.

property write_cal

Accumulate mismatch counts and write to file

This controls the addition of the -K parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsViewCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools view.

Extract/print all or sub alignments in SAM or BAM format, equivalent to:

$ samtools view [-bchuHS] [-t in.refList] [-o output] [-f reqFlag]
                [-F skipFlag] [-q minMapQ] [-l library] [-r readGroup]
                [-R rgFile] <in.bam>|<in.sam> [region1 [...]]

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsViewCommandline
>>> input_file = "/path/to/sam_or_bam_file"
>>> samtools_view_cmd = SamtoolsViewCommandline(input_file=input_file)
>>> print(samtools_view_cmd)
samtools view /path/to/sam_or_bam_file
__init__(cmd='samtools', **kwargs)

Initialize the class.

property F

Skip alignments with bits present in INT

This controls the addition of the -F parameter and its associated value. Set this property to the argument value required.

property H

Output the header only

This property controls the addition of the -H switch, treat this property as a boolean.

property R

Output reads in read groups listed in FILE

This controls the addition of the -R parameter and its associated value. Set this property to the argument value required.

property S
Input is in SAM.

If @SQ header lines are absent, the ‘-t’ option is required.

This property controls the addition of the -S switch, treat this property as a boolean.

property b

Output in the BAM format

This property controls the addition of the -b switch, treat this property as a boolean.

property c
Instead of printing the alignments, only count them and

print the total number.

All filter options, such as ‘-f’, ‘-F’ and ‘-q’, are taken into account

This property controls the addition of the -c switch, treat this property as a boolean.

property f
Only output alignments with all bits in

INT present in the FLAG field

This controls the addition of the -f parameter and its associated value. Set this property to the argument value required.

property fast_bam

Use zlib compression level 1 to compress the output

This property controls the addition of the -1 switch, treat this property as a boolean.

property h

Include the header in the output

This property controls the addition of the -h switch, treat this property as a boolean.

property input_file

Input File Name

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

property l

Only output reads in library STR

This controls the addition of the -l parameter and its associated value. Set this property to the argument value required.

property o

Output file

This controls the addition of the -o parameter and its associated value. Set this property to the argument value required.

property q

Skip alignments with MAPQ smaller than INT

This controls the addition of the -q parameter and its associated value. Set this property to the argument value required.

property r

Only output reads in read group STR

This controls the addition of the -r parameter and its associated value. Set this property to the argument value required.

property region

Region

This controls the addition of the region parameter and its associated value. Set this property to the argument value required.

property t
This file is TAB-delimited.

Each line must contain the reference name and the length of the reference, one line for each distinct reference; additional fields are ignored.

This file also defines the order of the reference sequences in sorting. If you run ‘samtools faidx <ref.fa>’, the resultant index file <ref.fa>.fai can be used as this <in.ref_list> file.

This controls the addition of the -t parameter and its associated value. Set this property to the argument value required.

property u

Output uncompressed BAM.

This option saves time spent on compression/decompression and is thus preferred when the output is piped to another samtools command

This property controls the addition of the -u switch, treat this property as a boolean.

class Bio.Sequencing.Applications.SamtoolsCalmdCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools calmd.

Generate the MD tag, equivalent to:

$ samtools calmd [-EeubSr] [-C capQcoef] <aln.bam> <ref.fasta>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsCalmdCommandline
>>> input_bam = "/path/to/aln.bam"
>>> reference_fasta = "/path/to/reference.fasta"
>>> calmd_cmd = SamtoolsCalmdCommandline(input_bam=input_bam,
...                                      reference=reference_fasta)
>>> print(calmd_cmd)
samtools calmd /path/to/aln.bam /path/to/reference.fasta
__init__(cmd='samtools', **kwargs)

Initialize the class.

property A
When used jointly with -r this option overwrites

the original base quality

This property controls the addition of the -A switch, treat this property as a boolean.

property C
Coefficient to cap mapping quality

of poorly mapped reads.

See the pileup command for details.

This controls the addition of the -C parameter and its associated value. Set this property to the argument value required.

property E
Extended BAQ calculation.

This option trades specificity for sensitivity, though the effect is minor.

This property controls the addition of the -E switch, treat this property as a boolean.

property S

The input is SAM with header lines

This property controls the addition of the -S switch, treat this property as a boolean.

property b

Output compressed BAM

This property controls the addition of the -b switch, treat this property as a boolean.

property e
Convert the read base to = if it is

identical to the aligned reference base.

Indel caller does not support the = bases at the moment.

This property controls the addition of the -e switch, treat this property as a boolean.

property input_bam

Input BAM

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

property r
Compute the BQ tag (without -A)

or cap base quality by BAQ (with -A).

This property controls the addition of the -r switch, treat this property as a boolean.

property ref

Reference FASTA to be indexed

This controls the addition of the reference parameter and its associated value. Set this property to the argument value required.

property u

Output uncompressed BAM

This property controls the addition of the -u switch, treat this property as a boolean.

class Bio.Sequencing.Applications.SamtoolsCatCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools cat.

Concatenate BAMs, equivalent to:

$ samtools cat [-h header.sam] [-o out.bam] <in1.bam> <in2.bam> [ ... ]

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsCatCommandline
>>> input_bam1 = "/path/to/input_bam1"
>>> input_bam2 = "/path/to/input_bam2"
>>> input_bams = [input_bam1, input_bam2]
>>> samtools_cat_cmd = SamtoolsCatCommandline(input_bam=input_bams)
>>> print(samtools_cat_cmd)
samtools cat /path/to/input_bam1 /path/to/input_bam2
__init__(cmd='samtools', **kwargs)

Initialize the class.

property bams

Input BAM files

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

property h

Header SAM file

This controls the addition of the -h parameter and its associated value. Set this property to the argument value required.

property o

Output SAM file

This controls the addition of the -o parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsFaidxCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools faidx.

Retrieve and print stats in the index file, equivalent to:

$ samtools faidx <ref.fasta> [region1 [...]]

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsFaidxCommandline
>>> reference = "/path/to/reference.fasta"
>>> samtools_faidx_cmd = SamtoolsFaidxCommandline(reference=reference)
>>> print(samtools_faidx_cmd)
samtools faidx /path/to/reference.fasta
__init__(cmd='samtools', **kwargs)

Initialize the class.

property ref

Reference FASTA to be indexed

This controls the addition of the reference parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsFixmateCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools fixmate.

Fill in mate coordinates, ISIZE and mate related flags from a name-sorted alignment, equivalent to:

$ samtools fixmate <in.nameSrt.bam> <out.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsFixmateCommandline
>>> in_bam = "/path/to/in.nameSrt.bam"
>>> out_bam = "/path/to/out.bam"
>>> fixmate_cmd = SamtoolsFixmateCommandline(input_bam=in_bam,
...                                          out_bam=out_bam)
>>> print(fixmate_cmd)
samtools fixmate /path/to/in.nameSrt.bam /path/to/out.bam
__init__(cmd='samtools', **kwargs)

Initialize the class.

property input_file

Name Sorted Alignment File

This controls the addition of the in_bam parameter and its associated value. Set this property to the argument value required.

property output_file

Output file

This controls the addition of the out_bam parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsIdxstatsCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools idxstats.

Retrieve and print stats in the index file, equivalent to:

$ samtools idxstats <aln.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsIdxstatsCommandline
>>> input = "/path/to/aln_bam"
>>> samtools_idxstats_cmd = SamtoolsIdxstatsCommandline(input_bam=input)
>>> print(samtools_idxstats_cmd)
samtools idxstats /path/to/aln_bam
__init__(cmd='samtools', **kwargs)

Initialize the class.

property input_bam

BAM file to be indexed

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsIndexCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools index.

Index sorted alignment for fast random access, equivalent to:

$ samtools index <aln.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsIndexCommandline
>>> input = "/path/to/aln_bam"
>>> samtools_index_cmd = SamtoolsIndexCommandline(input_bam=input)
>>> print(samtools_index_cmd)
samtools index /path/to/aln_bam
__init__(cmd='samtools', **kwargs)

Initialize the class.

property input_bam

BAM file to be indexed

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsMergeCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools merge.

Merge multiple sorted alignments, equivalent to:

$ samtools merge [-nur1f] [-h inh.sam] [-R reg]
                 <out.bam> <in1.bam> <in2.bam> [...]

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsMergeCommandline
>>> out_bam = "/path/to/out_bam"
>>> in_bam = ["/path/to/input_bam1", "/path/to/input_bam2"]
>>> merge_cmd = SamtoolsMergeCommandline(out_bam=out_bam,
...                                      input_bam=in_bam)
>>> print(merge_cmd)
samtools merge /path/to/out_bam /path/to/input_bam1 /path/to/input_bam2
__init__(cmd='samtools', **kwargs)

Initialize the class.

property R

Merge files in the specified region indicated by STR

This controls the addition of the -R parameter and its associated value. Set this property to the argument value required.

property bam

Input BAM

This controls the addition of the input_bam parameter and its associated value. Set this property to the argument value required.

property f
Force to overwrite the

output file if present

This property controls the addition of the -f switch, treat this property as a boolean.

property fast_bam
Use zlib compression level 1

to compress the output

This property controls the addition of the -1 switch, treat this property as a boolean.

property h
Use the lines of FILE as ‘@’

headers to be copied to out.bam

This controls the addition of the -h parameter and its associated value. Set this property to the argument value required.

property n
The input alignments are sorted by read names

rather than by chromosomal coordinates

This property controls the addition of the -n switch, treat this property as a boolean.

property output

Output BAM file

This controls the addition of the output_bam parameter and its associated value. Set this property to the argument value required.

property r
Attach an RG tag to each alignment.

The tag value is inferred from file names

This property controls the addition of the -r switch, treat this property as a boolean.

property u

Uncompressed BAM output

This property controls the addition of the -u switch, treat this property as a boolean.

class Bio.Sequencing.Applications.SamtoolsMpileupCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools mpileup.

Generate BCF or pileup for one or multiple BAM files, equivalent to:

$ samtools mpileup [-EBug] [-C capQcoef] [-r reg] [-f in.fa]
                   [-l list] [-M capMapQ] [-Q minBaseQ]
                   [-q minMapQ] in.bam [in2.bam [...]]

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsMpileupCommandline
>>> input = ["/path/to/sam_or_bam_file"]
>>> samtools_mpileup_cmd = SamtoolsMpileupCommandline(input_file=input)
>>> print(samtools_mpileup_cmd)
samtools mpileup /path/to/sam_or_bam_file
__init__(cmd='samtools', **kwargs)

Initialize the class.

property A

Do not skip anomalous read pairs in variant calling.

This property controls the addition of the -A switch, treat this property as a boolean.

property B
Disable probabilistic realignment for the

computation of base alignment quality (BAQ).

BAQ is the Phred-scaled probability of a read base being misaligned. Applying this option greatly helps to reduce false SNPs caused by misalignments

This property controls the addition of the -B switch, treat this property as a boolean.

property C
Coefficient for downgrading mapping quality for

reads containing excessive mismatches.

Given a read with a phred-scaled probability q of being generated from the mapped position, the new mapping quality is about sqrt((INT-q)/INT)*INT. A zero value disables this functionality; if enabled, the recommended value for BWA is 50

This controls the addition of the -C parameter and its associated value. Set this property to the argument value required.

property D

Output per-sample read depth

This property controls the addition of the -D switch, treat this property as a boolean.

property E
Extended BAQ computation.

This option helps sensitivity especially for MNPs, but may hurt specificity a little bit

This property controls the addition of the -E switch, treat this property as a boolean.

property I

Do not perform INDEL calling

This property controls the addition of the -I switch, treat this property as a boolean.

property L
Skip INDEL calling if the average per-sample

depth is above INT

This controls the addition of the -L parameter and its associated value. Set this property to the argument value required.

property M

Cap Mapping Quality at M

This controls the addition of the -M parameter and its associated value. Set this property to the argument value required.

property Q

Minimum base quality for a base to be considered

This controls the addition of the -Q parameter and its associated value. Set this property to the argument value required.

property S
Output per-sample Phred-scaled

strand bias P-value

This property controls the addition of the -S switch, treat this property as a boolean.

property b

List of input BAM files, one file per line

This controls the addition of the -b parameter and its associated value. Set this property to the argument value required.

property d

At a position, read maximally INT reads per input BAM

This controls the addition of the -d parameter and its associated value. Set this property to the argument value required.

property e

Phred-scaled gap extension sequencing error probability.

Reducing INT leads to longer indels

This controls the addition of the -e parameter and its associated value. Set this property to the argument value required.

property f

The faidx-indexed reference file in the FASTA format.

The file can be optionally compressed by razip

This controls the addition of the -f parameter and its associated value. Set this property to the argument value required.

property g
Compute genotype likelihoods and output them in the

binary call format (BCF)

This property controls the addition of the -g switch, treat this property as a boolean.

property h

Coefficient for modeling homopolymer errors.

Given an l-long homopolymer run, the sequencing error of an indel of size s is modeled as INT*s/l

This controls the addition of the -h parameter and its associated value. Set this property to the argument value required.

property illumina_13

Assume the quality is in the Illumina 1.3+ encoding

This property controls the addition of the -6 switch, treat this property as a boolean.

property input_file

Input File for generating mpileup

This controls the addition of the input_file parameter and its associated value. Set this property to the argument value required.

property l
BED or position list file containing a list of regions

or sites where pileup or BCF should be generated

This controls the addition of the -l parameter and its associated value. Set this property to the argument value required.

property o

Phred-scaled gap open sequencing error probability.

Reducing INT leads to more indel calls.

This controls the addition of the -o parameter and its associated value. Set this property to the argument value required.

property p
Comma delimited list of platforms (determined by @RG-PL)

from which indel candidates are obtained.

It is recommended to collect indel candidates from sequencing technologies that have low indel error rate such as ILLUMINA

This controls the addition of the -p parameter and its associated value. Set this property to the argument value required.

property q

Minimum mapping quality for an alignment to be used

This controls the addition of the -q parameter and its associated value. Set this property to the argument value required.

property r

Only generate pileup in region STR

This controls the addition of the -r parameter and its associated value. Set this property to the argument value required.

property u
Similar to -g except that the output is

uncompressed BCF, which is preferred for piping

This property controls the addition of the -u switch, treat this property as a boolean.

class Bio.Sequencing.Applications.SamtoolsPhaseCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools phase.

Call and phase heterozygous SNPs, equivalent to:

$ samtools phase [-AF] [-k len] [-b prefix]
                 [-q minLOD] [-Q minBaseQ] <in.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsPhaseCommandline
>>> input_bam = "/path/to/in.bam"
>>> samtools_phase_cmd = SamtoolsPhaseCommandline(input_bam=input_bam)
>>> print(samtools_phase_cmd)
samtools phase /path/to/in.bam
__init__(cmd='samtools', **kwargs)

Initialize the class.

property A

Drop reads with ambiguous phase

This property controls the addition of the -A switch, treat this property as a boolean.

property F

Do not attempt to fix chimeric reads

This property controls the addition of the -F switch, treat this property as a boolean.

property Q
Minimum base quality to be

used in het calling

This controls the addition of the -Q parameter and its associated value. Set this property to the argument value required.

property b

Prefix of BAM output

This controls the addition of the -b parameter and its associated value. Set this property to the argument value required.

property in_bam

Input file

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

property k

Maximum length for local phasing

This controls the addition of the -k parameter and its associated value. Set this property to the argument value required.

property q
Minimum Phred-scaled LOD to

call a heterozygote

This controls the addition of the -q parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsReheaderCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools reheader.

Replace the header in in.bam with the header in in.header.sam, equivalent to:

$ samtools reheader <in.header.sam> <in.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsReheaderCommandline
>>> input_header = "/path/to/header_sam_file"
>>> input_bam = "/path/to/input_bam_file"
>>> reheader_cmd = SamtoolsReheaderCommandline(input_header=input_header,
...                                            input_bam=input_bam)
>>> print(reheader_cmd)
samtools reheader /path/to/header_sam_file /path/to/input_bam_file
__init__(cmd='samtools', **kwargs)

Initialize the class.

property bam_file

BAM file for writing header to

This controls the addition of the input_bam parameter and its associated value. Set this property to the argument value required.

property sam_file

Sam file with header

This controls the addition of the input_header parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsRmdupCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools rmdup.

Remove potential PCR duplicates, equivalent to:

$ samtools rmdup [-sS] <input.srt.bam> <out.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsRmdupCommandline
>>> input_sorted_bam = "/path/to/input.srt.bam"
>>> out_bam = "/path/to/out.bam"
>>> rmdup_cmd = SamtoolsRmdupCommandline(input_bam=input_sorted_bam,
...                                      out_bam=out_bam)
>>> print(rmdup_cmd)
samtools rmdup /path/to/input.srt.bam /path/to/out.bam
__init__(cmd='samtools', **kwargs)

Initialize the class.

property S
Treat paired-end reads

as single-end reads

This property controls the addition of the -S switch, treat this property as a boolean.

property input_file

Name Sorted Alignment File

This controls the addition of the in_bam parameter and its associated value. Set this property to the argument value required.

property output_file

Output file

This controls the addition of the out_bam parameter and its associated value. Set this property to the argument value required.

property s

Remove duplicates for single-end reads.

By default, the command works for paired-end reads only

This property controls the addition of the -s switch, treat this property as a boolean.

Bio.Sequencing.Applications.SamtoolsSortCommandline

alias of SamtoolsVersion0xSortCommandline

class Bio.Sequencing.Applications.SamtoolsVersion0xSortCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools version 0.1.x sort.

Concatenate BAMs, equivalent to:

$ samtools sort [-no] [-m maxMem] <in.bam> <out.prefix>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsVersion0xSortCommandline
>>> input_bam = "/path/to/input_bam"
>>> out_prefix = "/path/to/out_prefix"
>>> samtools_sort_cmd = SamtoolsVersion0xSortCommandline(input=input_bam, out_prefix=out_prefix)
>>> print(samtools_sort_cmd)
samtools sort /path/to/input_bam /path/to/out_prefix
__init__(cmd='samtools', **kwargs)

Initialize the class.

property input

Input BAM file

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

property m

Approximately the maximum required memory

This controls the addition of the -m parameter and its associated value. Set this property to the argument value required.

property n
Sort by read names rather

than by chromosomal coordinates

This property controls the addition of the -n switch, treat this property as a boolean.

property o
Output the final alignment

to the standard output

This property controls the addition of the -o switch, treat this property as a boolean.

property out_prefix

Output prefix

This controls the addition of the out_prefix parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsVersion1xSortCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools version 1.3.x sort.

Concatenate BAMs, equivalent to:

$ samtools sort [-n] [-T FREFIX] [-o file] [-I INT] [-m maxMem] <in.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsVersion1xSortCommandline
>>> input_bam = "/path/to/input_bam"
>>> FREFIX = "/path/to/out_prefix"
>>> file_name = "/path/to/out_file"
>>> samtools_sort_cmd = SamtoolsVersion1xSortCommandline(input=input_bam, T=FREFIX, o=file_name)
>>> print(samtools_sort_cmd)
samtools sort -o /path/to/out_file -T /path/to/out_prefix /path/to/input_bam
__init__(cmd='samtools', **kwargs)

Initialize the class.

property I
(INT) Set the desired compression level for the final output file,

ranging from 0 (uncompressed) or 1 (fastest but minimal compression) to 9 (best compression but slowest to write), similarly to gzip(1)’s compression level setting.

This controls the addition of the -I parameter and its associated value. Set this property to the argument value required.

property O

(FORMAT) Write the final output as sam, bam, or cram

This controls the addition of the -O parameter and its associated value. Set this property to the argument value required.

property T
(PREFIX) Write temporary files to PREFIX.nnnn.bam, or if the specified PREFIX

is an existing directory, to PREFIX/samtools.mmm.mmm.tmp.nnnn.bam, where mmm is unique to this invocation of the sort command

This controls the addition of the -T parameter and its associated value. Set this property to the argument value required.

property input

Input SAM/BAM/CRAM file

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.

property m

Approximately the maximum required memory

This controls the addition of the -m parameter and its associated value. Set this property to the argument value required.

property n
Sort by read names rather

than by chromosomal coordinates

This property controls the addition of the -n switch, treat this property as a boolean.

property o
(file) Write the final sorted output to FILE,

rather than to standard output

This controls the addition of the -o parameter and its associated value. Set this property to the argument value required.

class Bio.Sequencing.Applications.SamtoolsTargetcutCommandline(cmd='samtools', **kwargs)

Bases: AbstractCommandline

Command line wrapper for samtools targetcut.

This command identifies target regions by examining the continuity of read depth, computes haploid consensus sequences of targets and outputs a SAM with each sequence corresponding to a target, equivalent to:

$ samtools targetcut [-Q minBaseQ] [-i inPenalty] [-0 em0]
                     [-1 em1] [-2 em2] [-f ref] <in.bam>

See http://samtools.sourceforge.net/samtools.shtml for more details

Examples

>>> from Bio.Sequencing.Applications import SamtoolsTargetcutCommandline
>>> input_bam = "/path/to/aln.bam"
>>> samtools_targetcut_cmd = SamtoolsTargetcutCommandline(input_bam=input_bam)
>>> print(samtools_targetcut_cmd)
samtools targetcut /path/to/aln.bam
__init__(cmd='samtools', **kwargs)

Initialize the class.

property Q

Minimum Base Quality

This controls the addition of the -Q parameter and its associated value. Set this property to the argument value required.

property em0

This controls the addition of the -0 parameter and its associated value. Set this property to the argument value required.

property em1

This controls the addition of the -1 parameter and its associated value. Set this property to the argument value required.

property em2

This controls the addition of the -2 parameter and its associated value. Set this property to the argument value required.

property f

Reference Filename

This controls the addition of the -f parameter and its associated value. Set this property to the argument value required.

property i

Insertion Penalty

This controls the addition of the -i parameter and its associated value. Set this property to the argument value required.

property in_bam

Input file

This controls the addition of the input parameter and its associated value. Set this property to the argument value required.