View source: R/cis.vs.trans.classification.R
| cis.vs.trans.classification | R Documentation |
Classify genetic association signals as cis or trans relative to the gene encoding the target protein.
cis.vs.trans.classification(
hits,
panel,
id = "uniprot",
radius = 1e+06,
verbose = TRUE
)
hits |
Data frame of association signals containing at least:
|
panel |
Annotation data frame containing:
|
id |
Join key (default: |
radius |
Cis window size in base pairs (default: |
verbose |
Logical; print summary if TRUE. |
A variant is classified as cis if it lies on the same chromosome as the gene and within a specified window around the gene boundaries.
A list containing:
data: annotated data frame with cis/trans classification
p.gene, p.chr, p.start, p.end
cis (logical)
cis.trans ("cis" / "trans")
cis.start, cis.end
table: gene × cis/trans contingency table
total: named vector of total cis and trans counts
#----------------------------------------------------------
# minimal reproducible example
#----------------------------------------------------------
hits <- data.frame(
uniprot = c("P1", "P2", "P3", "P1"),
Chr = c("1", "1", "2", "1"),
bp = c(100000, 2000000, 500000, 105000)
)
panel <- data.frame(
uniprot = c("P1", "P2", "P3"),
gene = c("G1", "G2", "G3"),
chr = c("1", "1", "2"),
start = c(90000, 1500000, 400000),
end = c(110000, 2500000, 600000)
)
ct <- cis.vs.trans.classification(hits, panel)
ct$total
head(ct$data)
with(ct$data, table(p.gene, cis.trans))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.