alignShortReads {R453Plus1Toolbox} | R Documentation

## Exact alignment of DNA sequences against a reference

### Description

This method aligns given sequences against a given reference genome using the `matchPDict` method. Only exact (no errors) and unique matches are returned.

### Usage

    alignShortReads(object, bsGenome, seqNames, ensemblNotation)

### Arguments

`object` | The reads that should be aligned agiven either as a `DNAStringSet` or a `AVASet` instance. In the latter case the reference sequences are extracted and aligned.
`bsGenome` | A `bsGenome` instance providing the reference sequences.
`seqNames` | The names of the sequences in `bsGenome` that should be used. If omitted, all reference sequences are used.
`ensemblNotation` | If set to TRUE, “chr” is removed from the reference sequences' names in the returned alignment. Default value is FALSE.

### Details

All reads are aligned against the reference and its reverse complement. If the reads are not in 5' to 3' orientation, they should be reversed before. Note that only exact and unique alignments are reported. Use `matchPDict` directly for more flexibility.

### Value

An object of class `AlignedRead` or a `AVASet` instance.

### Author(s)

Hans-Ulrich Klein

### See Also

`matchPDict`, `DNAStringSet`, `AlignedRead`, `AVASet`

### Examples

    library("BSgenome.Scerevisiae.UCSC.sacCer2")
    reads = DNAStringSet(c(
      "CCGTTCAAAGAGCCCTTGGCCCATAATCCACCGGTT",
      "ATCCTGCCACAGGAGTCCATGGAGGTTTCGCCA"))
    alignShortReads(reads, Scerevisiae, seqNames="chrIII")

[Package R453Plus1Toolbox version 1.40.0 Index]