Learn R Programming

R453Plus1Toolbox (version 1.22.0)

alignShortReads: 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.

Value

AlignedRead or a AVASet instance.

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.

See Also

matchPDict, DNAStringSet, AlignedRead, AVASet

Examples

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

Run the code above in your browser using DataLab