Contents

1 History

2 High-throughput sequence work flow

3 DNA Sequences

library(Biostrings)

dna <- DNAStringSet(c("AAACTG", "CCCTTCAAC", "TACGAA"))
dna
##   A DNAStringSet instance of length 3
##     width seq
## [1]     6 AAACTG
## [2]     9 CCCTTCAAC
## [3]     6 TACGAA
length(dna)
## [1] 3
dna[c(1, 3, 1)]
##   A DNAStringSet instance of length 3
##     width seq
## [1]     6 AAACTG
## [2]     6 TACGAA
## [3]     6 AAACTG
width(dna)
## [1] 6 9 6
reverseComplement(dna)
##   A DNAStringSet instance of length 3
##     width seq
## [1]     6 CAGTTT
## [2]     9 GTTGAAGGG
## [3]     6 TTCGTA

Biostrings themes

Help!

methods(class="DNAStringSet")
?"DNAStringSet"
browseVignettes(package="Biostrings")

4 Genomic Ranges

library(GenomicRanges)

gr <- GRanges(c("chr1:100-120", "chr1:115-130", "chr2:200-220"))
gr
## GRanges object with 3 ranges and 0 metadata columns:
##       seqnames     ranges strand
##          <Rle>  <IRanges>  <Rle>
##   [1]     chr1 [100, 120]      *
##   [2]     chr1 [115, 130]      *
##   [3]     chr2 [200, 220]      *
##   -------
##   seqinfo: 2 sequences from an unspecified genome; no seqlengths
shift(gr, 1)
## GRanges object with 3 ranges and 0 metadata columns:
##       seqnames     ranges strand
##          <Rle>  <IRanges>  <Rle>
##   [1]     chr1 [101, 121]      *
##   [2]     chr1 [116, 131]      *
##   [3]     chr2 [201, 221]      *
##   -------
##   seqinfo: 2 sequences from an unspecified genome; no seqlengths
reduce(gr)
## GRanges object with 2 ranges and 0 metadata columns:
##       seqnames     ranges strand
##          <Rle>  <IRanges>  <Rle>
##   [1]     chr1 [100, 130]      *
##   [2]     chr2 [200, 220]      *
##   -------
##   seqinfo: 2 sequences from an unspecified genome; no seqlengths
anno <- GRanges(c("chr1:110-150", "chr2:150-210"))
countOverlaps(anno, gr)
## [1] 2 1

GenomicRanges

Intra-range operations

Inter-range operations

Between-range operations

Help!

methods(class="GRanges")
methods(class="GRangesList")
?"GRanges"
?"GRangesList"
browseVignettes(package="GenomicRanges")

4.1 Lists of Genomic Ranges

  • e.g., exons-within-transcripts, alignments-within-reads

5 Summarized Experiments