... | ... |
@@ -10,12 +10,11 @@ export(deconvolution.results.plots) |
10 | 10 |
export(deconvolution.results.plots.permutations) |
11 | 11 |
export(deconvolution.results.table) |
12 | 12 |
export(epicParam) |
13 |
-export(get_filter_group_markers) |
|
13 |
+export(get_csf_reference) |
|
14 | 14 |
export(independentbulkParam) |
15 | 15 |
export(lute) |
16 | 16 |
export(lute_supported_deconvolution_algorithms) |
17 | 17 |
export(make_lpv) |
18 |
-export(marker_overlaps) |
|
19 | 18 |
export(markers_by_group) |
20 | 19 |
export(meanratiosParam) |
21 | 20 |
export(music2Param) |
... | ... |
@@ -8,7 +8,7 @@ |
8 | 8 |
# this is the main task for parallel selection of group markers |
9 | 9 |
.get.group.markers.iter <- function(task.iter, sce, assay.name, |
10 | 10 |
celltype.variable, markers.per.type, |
11 |
- downsample.within.group){ |
|
11 |
+ downsample.within.group, verbose = F){ |
|
12 | 12 |
|
13 | 13 |
if(verbose){message("Getting markers for group id: ", task.iter, "...")} |
14 | 14 |
filter <- sce[[group.variable]] == task.iter; sce.filter <- sce[,filter] |
15 | 15 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,35 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/lute_cellScaleFactors.R |
|
3 |
+\name{get_csf_reference} |
|
4 |
+\alias{get_csf_reference} |
|
5 |
+\title{get_csf_reference} |
|
6 |
+\usage{ |
|
7 |
+get_csf_reference(user.celltypes.vector = NULL, prefer.orthogonal = TRUE) |
|
8 |
+} |
|
9 |
+\arguments{ |
|
10 |
+\item{user.celltypes.vector}{Vector of user-specified cell types.} |
|
11 |
+ |
|
12 |
+\item{prefer.orthogonal}{Whether to prefer expression-orthogonal values (if |
|
13 |
+TRUE, removes expression-based values).} |
|
14 |
+} |
|
15 |
+\value{ |
|
16 |
+Table of type "data.frame" or "tibble". |
|
17 |
+} |
|
18 |
+\description{ |
|
19 |
+Retrieves the cell scale factors (csf) reference from the cellScaleFactors package. |
|
20 |
+} |
|
21 |
+\details{ |
|
22 |
+Returns a table of cell scale factors from various data sources. The |
|
23 |
+cell scale factors reference table has the following columns: |
|
24 |
+ |
|
25 |
+1. cell_type : Label of the cell type for the scale factor (e.g. neuron, T cell, etc.) |
|
26 |
+2. tissue : Label of the tissue of origin (e.g. brain, blood, etc.) |
|
27 |
+3. scale.factor.value : Point scale factor value prior to additional normalization |
|
28 |
+4. scale.factor.type : Label for scale factor type (e.g. cell or nuclear area, etc.) |
|
29 |
+5. scale.factor.data.source : Label for scale factor source (e.g. osmFISH, |
|
30 |
+housekeeping gene expression, etc.) |
|
31 |
+6. citation.s : Citations of source studies from which original measures or |
|
32 |
+measure summaries were made. |
|
33 |
+ |
|
34 |
+Details about the reference table can be found in the cellScaleFactors package. |
|
35 |
+} |
0 | 36 |
deleted file mode 100644 |
... | ... |
@@ -1,50 +0,0 @@ |
1 |
-% Generated by roxygen2: do not edit by hand |
|
2 |
-% Please edit documentation in R/lute_typemarker-selection.R |
|
3 |
-\name{get_filter_group_markers} |
|
4 |
-\alias{get_filter_group_markers} |
|
5 |
-\title{get_filter_group_markers} |
|
6 |
-\usage{ |
|
7 |
-get_filter_group_markers( |
|
8 |
- group.markers, |
|
9 |
- minimum.group.overlap.rate = 0.5, |
|
10 |
- verbose = TRUE |
|
11 |
-) |
|
12 |
-} |
|
13 |
-\arguments{ |
|
14 |
-\item{minimum.group.overlap.rate}{Minimum amount of overlap by group. Should be a |
|
15 |
-fraction of the total groups in the data (e.g. 0.2 means the marker is |
|
16 |
-overlapping in 20% of groups).} |
|
17 |
- |
|
18 |
-\item{verbose}{Whether to show verbose status messages.} |
|
19 |
- |
|
20 |
-\item{markers.list}{List of gene markers, organized by groups studied (e.g. |
|
21 |
-returned from calling \code{marker_overlaps()} (see \code{?marker_overlaps} |
|
22 |
-for details).} |
|
23 |
-} |
|
24 |
-\value{ |
|
25 |
-List containing markers for removal/filtering, with metadata about the |
|
26 |
-different filter parameters and type marker selection results. |
|
27 |
-} |
|
28 |
-\description{ |
|
29 |
-Get concordant, overlapping markers from a list of markers by group. |
|
30 |
-} |
|
31 |
-\details{ |
|
32 |
-Performs the following marker filter steps: |
|
33 |
-* Uniqueness: Removes duplicate markers across type lists. |
|
34 |
-* Concordance: Removes markers which aren't specific to the same type across |
|
35 |
-groups. |
|
36 |
-* Overlap: Removes markers below an overlap rate, defined using the |
|
37 |
-\code{min.group.overlap.rate} argument. |
|
38 |
-} |
|
39 |
-\examples{ |
|
40 |
-set.seed(0) |
|
41 |
-sce.example <- random_sce(num.cells = 100, num.genes = 1000) |
|
42 |
-sce.example[["sample_id"]] <- c(rep("sample1", 50), rep("sample2", 50)) |
|
43 |
-group.markers <- markers_by_group(sce.example, markers.per.type = 5) |
|
44 |
-markers.filter.vector <- get_filter_group_markers(group.markers) |
|
45 |
-length(markers.filter.vector) |
|
46 |
- |
|
47 |
-} |
|
48 |
-\seealso{ |
|
49 |
-\code{markers_by_group}, \code{marker_overlaps} |
|
50 |
-} |
51 | 0 |
deleted file mode 100644 |
... | ... |
@@ -1,28 +0,0 @@ |
1 |
-% Generated by roxygen2: do not edit by hand |
|
2 |
-% Please edit documentation in R/lute_typemarker-selection.R |
|
3 |
-\name{marker_overlaps} |
|
4 |
-\alias{marker_overlaps} |
|
5 |
-\title{marker_overlaps} |
|
6 |
-\usage{ |
|
7 |
-marker_overlaps(group.markers, marker.filter.vector = NULL) |
|
8 |
-} |
|
9 |
-\arguments{ |
|
10 |
-\item{group.markers}{Group-specific markers list returned from |
|
11 |
-\code{markers_by_group} (see \code{?markers_by_group} for details).} |
|
12 |
- |
|
13 |
-\item{marker.filter.vector}{Vector of markers to compare (exclude all |
|
14 |
-additional markers).} |
|
15 |
-} |
|
16 |
-\value{ |
|
17 |
-Table containing marker overlap info. |
|
18 |
-} |
|
19 |
-\description{ |
|
20 |
-Gets marker overlap info among groups. |
|
21 |
-} |
|
22 |
-\examples{ |
|
23 |
-sce.example <- random_sce(num.cells = 100, num.genes = 100) |
|
24 |
-sce.example[["sample_id"]] <- c(rep("sample1", 20), rep("sample2", 80)) |
|
25 |
-group.markers <- markers_by_group(sce.example) |
|
26 |
-group.overlaps <- marker_overlaps(group.markers) |
|
27 |
- |
|
28 |
-} |
... | ... |
@@ -9,9 +9,11 @@ markers_by_group( |
9 | 9 |
group.variable = "sample_id", |
10 | 10 |
celltype.variable = "celltype", |
11 | 11 |
assay.name = "counts", |
12 |
- markers.per.type = 20, |
|
12 |
+ markers.per.type = 100, |
|
13 | 13 |
typemarker.algorithm = "meanratios", |
14 | 14 |
return.type = "list", |
15 |
+ downsample.within.group = T, |
|
16 |
+ parallelize = T, |
|
15 | 17 |
verbose = FALSE |
16 | 18 |
) |
17 | 19 |
} |
... | ... |
@@ -34,6 +36,12 @@ for marker selection.} |
34 | 36 |
|
35 | 37 |
\item{return.type}{Format of return data, either "list" or "table".} |
36 | 38 |
|
39 |
+\item{downsample.within.group}{Whether to downsample on cell types prior to |
|
40 |
+marker selection (performed *within* groups)} |
|
41 |
+ |
|
42 |
+\item{parallelize}{Whether to use parallelization (mclapply) when getting |
|
43 |
+markers by group. Otherwise uses lapply.} |
|
44 |
+ |
|
37 | 45 |
\item{verbose}{Whether to show verbose status messages.} |
38 | 46 |
} |
39 | 47 |
\value{ |
... | ... |
@@ -44,14 +52,15 @@ organized by group IDs. |
44 | 52 |
Get gene markers organized by groups. |
45 | 53 |
} |
46 | 54 |
\details{ |
47 |
-Gets the group markers for all individual specified groups, where |
|
48 |
-"group" here means donor, batch, or some other set of cells over which we |
|
49 |
-may be concerned about marker consistency. |
|
55 |
+Gets the within-group cell type markers. |
|
50 | 56 |
} |
51 | 57 |
\examples{ |
52 | 58 |
sce.example <- random_sce(num.cells = 100, num.genes = 100) |
53 | 59 |
sce.example[["sample_id"]] <- c(rep("sample1", 10), rep("sample2", 80), rep("sample1", 10)) |
54 | 60 |
group.markers <- markers_by_group(sce.example) |
61 |
+ |
|
62 |
+ |
|
63 |
+ |
|
55 | 64 |
} |
56 | 65 |
\seealso{ |
57 | 66 |
\code{filter_group_markers} |