diff --git a/R/data.R b/R/data.R index 09f8af6..9ce0db8 100644 --- a/R/data.R +++ b/R/data.R @@ -1,6 +1,6 @@ #' Information on included species from the Ensembl database. #' -#' @format A [data.table] with 99 rows and 2 variables: +#' @format A [data.table] with the following columns: #' \describe{ #' \item{id}{Unique species ID} #' \item{name}{Human readable species name} @@ -12,7 +12,7 @@ #' This includes only genes on the primary suggested assembly of the human #' nuclear DNA. #' -#' @format A [data.table] with 60568 rows and 3 variables: +#' @format A [data.table] with the following columns: #' \describe{ #' \item{id}{Ensembl gene ID} #' \item{name}{The gene's HGNC name} @@ -25,11 +25,10 @@ #' This dataset contains each known value for a gene's distance to the telomeres #' per species. The data is sourced from Ensembl. #' -#' @format A [data.table] with 1506182 rows and 4 variables: +#' @format A [data.table] with the following columns: #' \describe{ #' \item{species}{Species ID} #' \item{gene}{Gene ID} -#' \item{position}{Gene start position} #' \item{distance}{Distance to nearest telomere} #' } "distances" diff --git a/data/distances.rda b/data/distances.rda index 52a94f2..c62b964 100644 Binary files a/data/distances.rda and b/data/distances.rda differ diff --git a/man/distances.Rd b/man/distances.Rd index 284b4ef..66ccf83 100644 --- a/man/distances.Rd +++ b/man/distances.Rd @@ -5,11 +5,10 @@ \alias{distances} \title{Information on gene positions across species.} \format{ -A \link{data.table} with 1506182 rows and 4 variables: +A \link{data.table} with the following columns: \describe{ \item{species}{Species ID} \item{gene}{Gene ID} -\item{position}{Gene start position} \item{distance}{Distance to nearest telomere} } } diff --git a/man/genes.Rd b/man/genes.Rd index 7ec959d..8b6671a 100644 --- a/man/genes.Rd +++ b/man/genes.Rd @@ -5,7 +5,7 @@ \alias{genes} \title{Information on human genes within the Ensembl database.} \format{ -A \link{data.table} with 60568 rows and 3 variables: +A \link{data.table} with the following columns: \describe{ \item{id}{Ensembl gene ID} \item{name}{The gene's HGNC name} diff --git a/man/species.Rd b/man/species.Rd index 8185473..4b11b6b 100644 --- a/man/species.Rd +++ b/man/species.Rd @@ -5,7 +5,7 @@ \alias{species} \title{Information on included species from the Ensembl database.} \format{ -A \link{data.table} with 99 rows and 2 variables: +A \link{data.table} with the following columns: \describe{ \item{id}{Unique species ID} \item{name}{Human readable species name} diff --git a/scripts/ensembl.R b/scripts/ensembl.R index e640a0b..83a4567 100644 --- a/scripts/ensembl.R +++ b/scripts/ensembl.R @@ -333,7 +333,6 @@ human_data[, chromosome_length := max(end_position), by = chromosome_name] distances <- human_data[, .( species = "hsapiens", gene = ensembl_gene_id, - position = start_position, distance = pmin( start_position, chromosome_length - end_position @@ -405,7 +404,6 @@ for (species_id in species[!id == "hsapiens", id]) { species_distances <- species_distances[, .( species = species_id, gene = hsapiens_homolog_ensembl_gene, - position = start_position, distance = pmin( start_position, chromosome_length - end_position