bowtie

Map short reads to reference sequence using Burrows-Wheeler transform

Description

example

bowtie(indexBaseName,reads,outputFileName) aligns the reads specified in reads to the indexed reference specified by indexBaseName, and writes the results to the BAM-formatted file outputFileName.

Note

bowtie runs on Mac and UNIX® platforms only.

bowtie(indexBaseName,reads,outputFileName,Name,Value) aligns reads using additional options specified by one or more name-value pair arguments.

Examples

collapse all

Download the E. coli genome from NCBI.

getgenbank('NC_008253','tofile','NC_008253.fna','SequenceOnly',true)

Built a Bowtie index with the base name ECOLI.

bowtiebuild('NC_008253.fna','ECOLI')

Find the path to the example FASTQ file ecoli100.fq, which has E. Coli short reads.

fastqfile = which('ecoli100.fq')

Align the short reads in ecoli100.fq to the built index with base name ECOLI.

bowtie('ECOLI',fastqfile,'ecoli100.bam')

Access the mapped reads using BioMap.

bm = BioMap('ecoli100.bam')

bm = 

BioMap with properties:

    SequenceDictionary: {'gi|110640213|ref|NC_008253.1|'}
             Reference: [73x1 File indexed property]
             Signature: [73x1 File indexed property]
                 Start: [73x1 File indexed property]
        MappingQuality: [73x1 File indexed property]
                  Flag: [73x1 File indexed property]
          MatePosition: [73x1 File indexed property]
               Quality: [73x1 File indexed property]
              Sequence: [73x1 File indexed property]
                Header: [73x1 File indexed property]
                 NSeqs: 73
                  Name: ''

Input Arguments

collapse all

Name of indexed reference file for short read alignment, specified as a character vector or string containing the path and base name of the Bowtie index file.

Short reads to align to the indexed reference, specified as a character vector, string, string vector, or cell array of character vectors indicating one or more FASTQ formatted files with the input reads.

Name for output file containing the results of the short read alignment, specified as a character vector or string. By default, the output file is BAM-formatted, and bowtie automatically adds the .bam extension if it is missing from the file name.

To specify a SAM-formatted output file, use the name-value pair argument BamFileOutput,false. In this case, bowtie automatically adds the .sam extension if it is missing from the file name.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'BamFileOutput',false,'Paired',true specifies the output file is SAM-formatted, and bowtie performs pair-read alignment.

Indicator for the output file format, specified as the comma-separated pair consisting of 'BamFileOutput' and either true or false.

  • If true (the default), then the output file is BAM-formatted, with a .bam extension.

  • If false, then the output file is SAM-formatted, with a .sam extension.

bowtie automatically adds the corresponding file extension if it is missing from the input argument outputFileName.

Example: 'BamFileOutput',false

Data Types: logical

Indicator for paired-read alignment performance, specified as the comma-separated pair consisting of 'Paired' and either true or false (the default). If false, then bowtie performs paired-read alignment using the odd elements in reads as the upstream mates and the even elements in reads as the downstream mates.

Example: 'Paired',true

Data Types: logical

Additional bowtie options, specified as a character vector or string for any valid bowtie options. Type bowtie('--help') for available options.

Example: 'BowtieOptions','-k 5 -m 4'

Tips

Introduced in R2012b