knitr::opts_chunk$set(collapse = T, comment = "#>") options(tibble.print_min = 4L, tibble.print_max = 4L) library(infercna) set.seed(1014)
Different scRNA-seq datasets are built using different genome references, namely different species and different genome versions. infercna comes with a number of inbuilt genomes that can be configured to work with the package. See below for more information.
Note: Additional genomes / genome versions will be added in future releases of infercna.
availableGenomes()
Find out which genomes are available in infercna.
availableGenomes()
currentGenome()
Note that the default genome that infercna is built to use is genome hg19
. This is the penultimate release version of the H. sapiens genome. You can always check which genome is configured with infercna::currentGenome()
.
currentGenome()
useGenome()
You can configure infercna to work with one of the inbuilt genomes. Currently built-in genomes are the two latest versions of H. sapiens, hg38
and hg19
and the latest version of the M. musculus, mm10
.
useGenome('mm10') currentGenome()
retrieveGenome()
You can also get the genome data (in dataframe form). By default retrieveGenome
will return the current genome in use, but you can instead specify a different genome in the function call.
retrieveGenome() retrieveGenome(name = 'hg19') retrieveGenome(name = 'hg38')
The default genomes available in infercna have the following columns.
symbol
: gene namechromosome_name
: chromosome namearm
: chromosome armchromosome_name
in genome mm10
start_position
: of each geneend_position
: of each gene band
: chromosome bandstrand
: chromosome strandensembl_gene_id
Note: Only the first four columns amongst these are required if you intend to add your genome (discussed below in more detail).
addGenome()
In some cases you may need to configure infercna with your own genome, either because it is not built-in with infercna, or because it is a genome that you built yourself, tailored to your purposes.
Using infercna::addGenome
, it is possible to configure infercna to use the genome of your choosing, so long as it meets the following requirements.
Note: addGenome
will return an error if any of these requirements are not met.
Be a dataframe
Contain the following columns
symbol
: gene name
SOX11, BRAF, TP53
chromosome_name
: chromosome name
levels(data$chromosome_name) == c(1:22, "X", "Y")
arm
: chromosome arm name
levels(data$arm) == c('1p', '1q', ..., 'Yp', 'Yq')
arm
as a duplicate of chromosome_name
.start_position
: of each gene
Columns chromosome_name
and arm
are factor columns (see above)
Note: You can add a genome with as many additional columns as you like. For example, you may want to have end_position
and band
columns in addition to those listed above.
Data = data.frame(symbol = letters, chromosome_name = factor(LETTERS), arm = factor(LETTERS), start_position = seq(1, length(letters)*2, by = 2), end_position = seq(2, length(letters)*2, by = 2)) tibble::as_tibble(Data)
The default columns are those that are required for one or more of the following:
Order the genes by their genomic position: chromosome_name
, start_position
+ Note that the input ordering of symbol
column does not matter.
Split the genes by their chromosomal position: chromosome_name
, arm
+ Note that you can additionally split genes by additional columns that you might add, such as band
.
addGenome(genome = Data, name = 'dummyAlphabetGenome')
```r currentGenome() ````
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.