Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/available.genomes.R
available.genomes
gets the list of BSgenome data packages that
are available in the Bioconductor repositories for your version of
R/Bioconductor.
installed.genomes
gets the list of BSgenome data packages that
are currently installed on your system.
getBSgenome
searchs the installed BSgenome data packages for the
specified genome and returns it as a BSgenome object.
1 2 3 4 5 | available.genomes(splitNameParts=FALSE, type=getOption("pkgType"))
installed.genomes(splitNameParts=FALSE)
getBSgenome(genome, masked=FALSE, load.only=FALSE)
|
splitNameParts |
Whether to split or not the package names in parts. In that case the result is returned in a data frame with 5 columns. |
type |
Character string indicating the type of package ( |
genome |
A BSgenome object, or the full name of an installed BSgenome
data package, or a short string specifying the name of an NCBI assembly
(e.g. |
masked |
|
load.only |
|
A BSgenome data package contains the full genome sequences for a given organism.
Its name typically has 4 parts (5 parts if it's a masked BSgenome
data package i.e. if it contains masked sequences) separated by a dot
e.g. BSgenome.Mmusculus.UCSC.mm10
or
BSgenome.Mmusculus.UCSC.mm10.masked
:
The 1st part is always BSgenome
.
The 2nd part is the name of the organism in abbreviated form e.g.
Mmusculus
, Hsapiens
, Celegans
,
Scerevisiae
, Ecoli
, etc...
The 3rd part is the name of the organisation who provided the
genome sequences. We formally refer to it as the provider
of the genome. E.g. UCSC
, NCBI
, TAIR
, etc...
The 4th part is a short string specifying the name of an NCBI
assembly (e.g. GRCh38
, TAIR10.1
, etc...) or UCSC
genome (e.g. hg38
, mm10
, susScr11
,
bosTau9
, galGal6
, ce11
, etc...).
If the package contains masked sequences, its name has the
.masked
suffix added to it, which is typically the 5th part.
A BSgenome data package contains a single top-level object (a BSgenome object) named like the package itself that can be used to access the genome sequences.
For available.genomes
and installed.genomes
: by default
(i.e. if splitNameParts=FALSE
), a character vector containing
the names of the BSgenome data packages that are available (for
available.genomes
) or currently installed (for
installed.genomes
). If splitNameParts=TRUE
, the list of
packages is returned in a data frame with one row per package and the
following columns: pkgname
(character), organism
(factor),
provider
(factor), genome
(character), and
masked
(logical).
For getBSgenome
: the BSgenome object containing the sequences
for the specified genome. Or an error if the object cannot be found in the
BSgenome data packages currently installed.
H. Pag<c3><a8>s
BSgenome objects.
available.packages
.
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 | ## ---------------------------------------------------------------------
## available.genomes() and installed.genomes()
## ---------------------------------------------------------------------
# What genomes are currently installed:
installed.genomes()
# What genomes are available:
available.genomes()
# Split the package names in parts:
av_gen <- available.genomes(splitNameParts=TRUE)
table(av_gen$organism)
table(av_gen$provider)
# Make your choice and install with:
if (interactive()) {
if (!require("BiocManager"))
install.packages("BiocManager")
BiocManager::install("BSgenome.Scerevisiae.UCSC.sacCer1")
}
# Have a coffee 8-)
# Load the package and display the index of sequences for this genome:
library(BSgenome.Scerevisiae.UCSC.sacCer1)
Scerevisiae # same as BSgenome.Scerevisiae.UCSC.sacCer1
## ---------------------------------------------------------------------
## getBSgenome()
## ---------------------------------------------------------------------
## Specify the full name of an installed BSgenome data package:
genome <- getBSgenome("BSgenome.Celegans.UCSC.ce2")
genome
## Specify a UCSC genome:
genome <- getBSgenome("hg38")
class(genome) # BSgenome object
seqinfo(genome)
genome$chrM
genome <- getBSgenome("hg38", masked=TRUE)
class(genome) # MaskedBSgenome object
seqinfo(genome)
genome$chr22
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.