View source: R/keepBSgenomeSequences.R
keepBSgenomeSequences | R Documentation |
Create a BSgenome object with some sequences (chromosomes) removed. This is useful when wanting to work without mitochondria or unplaced chromosomes. This function was posted by Hervé Pagès on the [bioconductor support pages around 2016](https://support.bioconductor.org/p/83588/) but I cannot find a version within his BSgenome package.
keepBSgenomeSequences(genome, seqnames)
genome |
a BSgenome object |
seqnames |
names of chromosomes to keep |
"genome"
library(BSgenome.Scerevisiae.UCSC.sacCer3)
genome <- BSgenome.Scerevisiae.UCSC.sacCer3
seqinfo(genome)
seqnames(genome)
sequences_to_keep <- setdiff(seqnames(genome), "chrM") # nuclear chroms only
genomeNuc <- keepBSgenomeSequences(genome, sequences_to_keep)
seqinfo(genomeNuc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.