-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathprepare_quantile_groups.Rd
79 lines (72 loc) · 2.76 KB
/
prepare_quantile_groups.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prepare_quantile_groups.r
\name{prepare_quantile_groups}
\alias{prepare_quantile_groups}
\title{Prepare quantile groups for each celltype based on specificity}
\usage{
prepare_quantile_groups(
ctd,
standardise = TRUE,
non121_strategy = "drop_both_species",
input_species = "mouse",
output_species = "human",
numberOfBins = 40,
verbose = TRUE,
...
)
}
\arguments{
\item{ctd}{Input CellTypeData.}
\item{standardise}{Whether to run \link[EWCE]{standardise_ctd} first.
Provides gene ortholog conversion.}
\item{non121_strategy}{How to handle genes that don't have
1:1 mappings between \code{input_species}:\code{output_species}.
Options include:\cr
\itemize{
\item{\code{"drop_both_species" or "dbs" or 1} : \cr}{
Drop genes that have duplicate
mappings in either the \code{input_species} or \code{output_species} \cr
(\emph{DEFAULT}).}
\item{\code{"drop_input_species" or "dis" or 2} : \cr}{
Only drop genes that have duplicate
mappings in the \code{input_species}.}
\item{\code{"drop_output_species" or "dos" or 3} : \cr}{
Only drop genes that have duplicate
mappings in the \code{output_species}.}
\item{\code{"keep_both_species" or "kbs" or 4} : \cr}{
Keep all genes regardless of whether
they have duplicate mappings in either species.}
\item{\code{"keep_popular" or "kp" or 5} : \cr}{
Return only the most "popular" interspecies ortholog mappings.
This procedure tends to yield a greater number of returned genes
but at the cost of many of them not being true biological 1:1 orthologs.}
\item{\code{"sum","mean","median","min" or "max"} : \cr}{
When \code{gene_df} is a matrix and \code{gene_output="rownames"},
these options will aggregate many-to-one gene mappings
(\code{input_species}-to-\code{output_species})
after dropping any duplicate genes in the \code{output_species}.
}
}}
\item{input_species}{Which species the gene names in \code{exp} come from.
See \link[EWCE]{list_species} for all available species.}
\item{output_species}{Which species' genes names to convert \code{exp} to.
See \link[EWCE]{list_species} for all available species.}
\item{numberOfBins}{Number of non-zero quantile bins.}
\item{verbose}{Print messages.
Set \code{verbose=2} if you want to print all messages
from internal functions as well.}
\item{...}{Additional arguments passed to \link[EWCE]{standardise_ctd}.}
}
\value{
The ctd converted to \code{output_species} gene symbols
with additional quantiles matrix.
}
\description{
Quantile groups are stored in an extra matrix ('quantiles')
in the returned CTD. This function also removes any genes
from the CTD data which are not 1:1 orthologs with the GWAS species.
}
\examples{
ctd_orig <- ewceData::ctd()
ctd <- MAGMA.Celltyping::prepare_quantile_groups(ctd = ctd_orig)
}