mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 02:37:25 +01:00
Use ensembl database server instead of biomart
This commit is contained in:
parent
948cb337db
commit
795fe99003
16 changed files with 373 additions and 452 deletions
19
R/data.R
19
R/data.R
|
|
@ -2,13 +2,26 @@
|
|||
#'
|
||||
#' @format A [data.table] with the following columns:
|
||||
#' \describe{
|
||||
#' \item{id}{Unique species ID}
|
||||
#' \item{id}{Unique species ID, these are NCBI taxon IDs}
|
||||
#' \item{name}{Human readable species name}
|
||||
#' \item{scientific_name}{Scientific name of the species}
|
||||
#' \item{table_name}{Table name within the Ensembl database}
|
||||
#' \item{n_chromosomes}{Number of chromosomes}
|
||||
#' \item{median_chromosome_length}{Median length of chromosomes}
|
||||
#' }
|
||||
"species"
|
||||
|
||||
#' Information on chromosomes for each included species.
|
||||
#'
|
||||
#' @format A [data.table] with the following columns:
|
||||
#' \describe{
|
||||
#' \item{species}{Species ID}
|
||||
#' \item{id}{Chromosome ID, theses are Ensembl sequence IDs}
|
||||
#' \item{name}{Chromosome name}
|
||||
#' \item{length}{Length in base pairs}
|
||||
#' }
|
||||
"chromosomes"
|
||||
|
||||
#' Information on human genes within the Ensembl database.
|
||||
#'
|
||||
#' This includes only genes on the primary suggested assembly of the human
|
||||
|
|
@ -18,7 +31,7 @@
|
|||
#' \describe{
|
||||
#' \item{id}{Ensembl gene ID}
|
||||
#' \item{name}{The gene's HGNC name (if available)}
|
||||
#' \item{chrosome}{The human chromosome the gene is located on}
|
||||
#' \item{chromosome}{The human chromosome the gene is located on}
|
||||
#' }
|
||||
"genes"
|
||||
|
||||
|
|
@ -31,7 +44,7 @@
|
|||
#' \describe{
|
||||
#' \item{species}{Species ID}
|
||||
#' \item{gene}{Gene ID}
|
||||
#' \item{chromosome_name}{Chromosome name from the specified species}
|
||||
#' \item{chromosome}{Chromosome ID}
|
||||
#' \item{start_position}{Start position in base pairs}
|
||||
#' \item{end_position}{End position in base pairs}
|
||||
#' \item{distance}{Computed distance to nearest telomere}
|
||||
|
|
|
|||
11
R/plots.R
11
R/plots.R
|
|
@ -561,13 +561,14 @@ plot_scores_by_position <- function(ranking,
|
|||
}
|
||||
|
||||
distance_data <- if (!is.null(chromosome_name)) {
|
||||
chromosome_name_ <- chromosome_name
|
||||
geposan::distances[
|
||||
species == "hsapiens" &
|
||||
chromosome_name == chromosome_name_
|
||||
chromosome_id <- geposan::chromosomes[
|
||||
species == "9606" & name == chromosome_name,
|
||||
id
|
||||
]
|
||||
|
||||
geposan::distances[species == "9606" & chromosome == chromosome_id]
|
||||
} else {
|
||||
geposan::distances[species == "hsapiens"]
|
||||
geposan::distances[species == "9606"]
|
||||
}
|
||||
|
||||
data <- merge(ranking, distance_data, by = "gene")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue