File: EnsDb-sequences.Rd

package info (click to toggle)
r-bioc-ensembldb 2.6.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,720 kB
  • sloc: perl: 326; makefile: 5
file content (117 lines) | stat: -rw-r--r-- 3,611 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
\name{getGenomeFaFile}
\Rdversion{1.1}
%\alias{extractTranscriptSeqs}
%\alias{extractTranscriptSeqs,ANY-method}
%\alias{extractTranscriptSeqs,ANY,ANY}
%\alias{extractTranscriptSeqs,ANY,EnsDb-method}
\alias{getGenomeFaFile}
\alias{getGenomeFaFile,EnsDb-method}

\title{Functionality related to DNA/RNA sequences}
\description{
  Utility functions related to RNA/DNA sequences, such as extracting
  RNA/DNA sequences for features defined in \code{Ensb}.
}
\usage{

\S4method{getGenomeFaFile}{EnsDb}(x, pattern="dna.toplevel.fa")

%\S4method{extractTranscriptSeqs}{ANY,EnsDb}(x, transcripts, filter)

}
\arguments{

  (In alphabetic order)

  %% \item{filter}{
  %%   A filter object extending \code{\linkS4class{BasicFilter}} or a list
  %%   of such object(s) to select specific entries from the database (see
  %%   examples below).
  %% }

  \item{pattern}{
    For method \code{getGenomeFaFile}: the pattern to be used to
    identify the fasta file representing genomic DNA sequence.
  }

  %% \item{transcripts}{
  %%   For \code{extractTranscriptSeqs}: the \code{EnsDb} object from which
  %%   the transcript definitions should be extracted.
  %% }

  \item{x}{
    %% For \code{extractTranscriptSeqs}: An object representing a single
    %% chromosome or a collection of chromosomes. Refer to the help of the
    %% \code{\link[GenomicFeatures]{extractTranscriptSeqs}} method in
    %% \code{GenomicFeatures} package for more information.
    For all other methods an \code{EnsDb} instance.
  }

}
\section{Methods and Functions}{
  \describe{
    %% \item{extractTranscriptSeqs}{
    %%   Extract transcript sequences. This method adapts the
    %%   \code{\link[GenomicFeatures]{extractTranscriptSeqs}} from the
    %%   \code{GenomicFeatures} package to allow the usage of filters to
    %%   specify the transcripts from which the sequence should be
    %%   extracted.
    %% }

    \item{getGenomeFaFile}{
      Returns a \code{\link[Rsamtools]{FaFile-class}} (defined in
      \code{Rsamtools}) with the genomic sequence of the genome build
      matching the Ensembl version of the \code{EnsDb} object.
      The file is retrieved using the \code{AnnotationHub} package,
      thus, at least for the first invocation, an internet connection is
      required to locate and download the file; subsequent calls will
      load the cached file instead.
      If no fasta file for the actual Ensembl version is available the
      function tries to identify a file matchint the species and genome
      build version of the closest Ensembl release and returns that
      instead.
      See the vignette for an example to work with such files.
    }

  }
}

\value{
  For \code{getGenomeFaFile}: a \code{\link[Rsamtools]{FaFile-class}}
  object with the genomic DNA sequence.

  %% For \code{extractTranscriptSeqs}: A \code{DNAStringSet} object
  %% parallel to \code{transcripts} (i.e. the i-th element in it is the
  %% sequence of the i-th transcript in \code{transcripts}).
}
\author{
  Johannes Rainer
}
\seealso{
  \code{\link{transcripts}}
  \code{\link{exonsBy}}
}
\examples{

## Loading an EnsDb for Ensembl version 86 (genome GRCh38):
library(EnsDb.Hsapiens.v86)
edb <- EnsDb.Hsapiens.v86

\dontrun{
    ## Retrieve a FaFile with the gneomic DNA sequence matching the organism,
    ## genome release version and, if possible, the Ensembl version of the
    ## EnsDb object.
    Dna <- getGenomeFaFile(edb)
    ## Extract the transcript sequence for all transcripts encoded on chromosome
    ## Y.
    ##extractTranscriptSeqs(Dna, edb, filter=SeqNameFilter("Y"))

}

}
\keyword{classes}