orthologScale: Normalized orthologous genes and TEs between two species

View source: R/orthologScale.R

orthologScaleR Documentation

Normalized orthologous genes and TEs between two species

Description

Normalize orthologous genes and TEs between two species with a scaling factor using their expression level and gene lengths.

Usage

orthologScale(speciesRef, speciesCompare, geneCountRef, 
geneCountCompare, teCountRef, teCountCompare, rmsk)

Arguments

speciesRef

The scientific name for your reference species. i.e., hsapiens

speciesCompare

The scientific name for your species to compare. i.e., ptroglodytes

geneCountRef

Gene count from your reference species. First column should be Ensmebl gene ID.

geneCountCompare

Gene count from the species you want to compare. First column should be Ensembl gene ID.

teCountRef

TE count from your reference species. First column should be teName.

teCountCompare

TE count from the species you want to compare. First column should be teName.

rmsk

a repeatmasker table including 4 columns: (1) the name of TE (2) the class of TE (3) The average length of that TE from your reference species (4) The average length of that TE from the species you want to compare.

Value

a list of outputs: (1) orthologTable, orthology information (2) c_ortholog, scaling factor for orthologous genes (3) geneRef, gene count table for reference species (4) geneCompare, normalized gene count table for species compared (5) c_te, scaling factor for TEs (6) teRef, TE count table for reference species (7) teCompare, normalized TE count table for species compared.

Examples

data(speciesCounts)
data(hg38_panTro6_rmsk)
hmGene <- speciesCounts$hmGene
chimpGene <- speciesCounts$chimpGene
hmTE <- speciesCounts$hmTE
chimpTE <- speciesCounts$chimpTE

## For demonstration, here we only select 1000 rows to save time
set.seed(1234)
hmGeneSample <- hmGene[sample(nrow(hmGene), 1000), ]
chimpGeneSample <- chimpGene[sample(nrow(chimpGene), 1000), ]

fetchData <- orthologScale(
    speciesRef = "hsapiens",
    speciesCompare = "ptroglodytes",
    geneCountRef = hmGeneSample,
    geneCountCompare = chimpGeneSample,
    teCountRef = hmTE,
    teCountCompare = chimpTE,
    rmsk = hg38_panTro6_rmsk
)

ferygood/TEKRABber documentation built on Jan. 29, 2024, 6:34 p.m.