data: Remove absolute positions

This commit is contained in:
Elias Projahn 2021-12-13 10:36:44 +01:00
parent d98c70a205
commit 01ec301d6d
6 changed files with 6 additions and 10 deletions

View file

@ -1,6 +1,6 @@
#' Information on included species from the Ensembl database. #' 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{ #' \describe{
#' \item{id}{Unique species ID} #' \item{id}{Unique species ID}
#' \item{name}{Human readable species name} #' \item{name}{Human readable species name}
@ -12,7 +12,7 @@
#' This includes only genes on the primary suggested assembly of the human #' This includes only genes on the primary suggested assembly of the human
#' nuclear DNA. #' nuclear DNA.
#' #'
#' @format A [data.table] with 60568 rows and 3 variables: #' @format A [data.table] with the following columns:
#' \describe{ #' \describe{
#' \item{id}{Ensembl gene ID} #' \item{id}{Ensembl gene ID}
#' \item{name}{The gene's HGNC name} #' \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 #' This dataset contains each known value for a gene's distance to the telomeres
#' per species. The data is sourced from Ensembl. #' 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{ #' \describe{
#' \item{species}{Species ID} #' \item{species}{Species ID}
#' \item{gene}{Gene ID} #' \item{gene}{Gene ID}
#' \item{position}{Gene start position}
#' \item{distance}{Distance to nearest telomere} #' \item{distance}{Distance to nearest telomere}
#' } #' }
"distances" "distances"

Binary file not shown.

View file

@ -5,11 +5,10 @@
\alias{distances} \alias{distances}
\title{Information on gene positions across species.} \title{Information on gene positions across species.}
\format{ \format{
A \link{data.table} with 1506182 rows and 4 variables: A \link{data.table} with the following columns:
\describe{ \describe{
\item{species}{Species ID} \item{species}{Species ID}
\item{gene}{Gene ID} \item{gene}{Gene ID}
\item{position}{Gene start position}
\item{distance}{Distance to nearest telomere} \item{distance}{Distance to nearest telomere}
} }
} }

View file

@ -5,7 +5,7 @@
\alias{genes} \alias{genes}
\title{Information on human genes within the Ensembl database.} \title{Information on human genes within the Ensembl database.}
\format{ \format{
A \link{data.table} with 60568 rows and 3 variables: A \link{data.table} with the following columns:
\describe{ \describe{
\item{id}{Ensembl gene ID} \item{id}{Ensembl gene ID}
\item{name}{The gene's HGNC name} \item{name}{The gene's HGNC name}

View file

@ -5,7 +5,7 @@
\alias{species} \alias{species}
\title{Information on included species from the Ensembl database.} \title{Information on included species from the Ensembl database.}
\format{ \format{
A \link{data.table} with 99 rows and 2 variables: A \link{data.table} with the following columns:
\describe{ \describe{
\item{id}{Unique species ID} \item{id}{Unique species ID}
\item{name}{Human readable species name} \item{name}{Human readable species name}

View file

@ -333,7 +333,6 @@ human_data[, chromosome_length := max(end_position), by = chromosome_name]
distances <- human_data[, .( distances <- human_data[, .(
species = "hsapiens", species = "hsapiens",
gene = ensembl_gene_id, gene = ensembl_gene_id,
position = start_position,
distance = pmin( distance = pmin(
start_position, start_position,
chromosome_length - end_position chromosome_length - end_position
@ -405,7 +404,6 @@ for (species_id in species[!id == "hsapiens", id]) {
species_distances <- species_distances[, .( species_distances <- species_distances[, .(
species = species_id, species = species_id,
gene = hsapiens_homolog_ensembl_gene, gene = hsapiens_homolog_ensembl_gene,
position = start_position,
distance = pmin( distance = pmin(
start_position, start_position,
chromosome_length - end_position chromosome_length - end_position