9 |
10 | FigR uses independently or concomitantly-profiled single-cell ATAC-seq (scATAC-seq) and scRNA-seq, to
11 | i) computationally-pair scATAC-seq and scRNA-seq datasets (if needed), ii) infers cis-regulatory interactions, and iii) defines a TF-gene gene regulatory network (GRN)
12 |
13 |
14 | # Installation
15 |
16 | `devtools::install_github("buenrostrolab/FigR")`
17 |
18 | # Quickstart
19 |
20 | ### DORC calling
21 |
22 | If you have a `SummarizedExperiment` object of the scATAC-seq reads in peaks counts (peaks x cells), as well as a `sparseMatrix` object of the scRNA-seq gene counts (genes x cells) that are paired (either computationally or true multi-modal), you can determine *cis*-regulatory associations (gene-peak correlations) as follows
23 |
24 | ```
25 | # Run using multiple cores if parallel support
26 | cisCor <- runGenePeakcorr(ATAC.se = ATAC.SE,
27 | RNAmat = rnaMat,
28 | genome = "hg19", # Also supports mm10 and hg38
29 | nCores = 4,
30 | p.cut=NULL)
31 |
32 | # Filter peak-gene correlations by p-value
33 | cisCor.filt <- cisCor %>% filter(pvalZ <= 0.05)
34 |
35 | # Determine DORC genes
36 | dorcGenes <- cisCor.filt %>% dorcJPlot(cutoff=7, # Default
37 | returnGeneList = TRUE)
38 |
39 | # Get DORC scores
40 | dorcMat <- getDORCScores(ATAC.SE,dorcTab=cisCor.filt,geneList=dorcGenes,nCores=4)
41 |
42 | # Smooth DORC scores (using cell KNNs)
43 | dorcMat.smooth <- smoothScoresNN(NNmat=cellKNN.mat,mat=dorcMat,nCores=4)
44 |
45 | ```
46 |
47 | *Cis*-regulatory correlation analysis framework to identify gene-peak (chromatin accessibility peak) significant associations and deduce key genes that are domains of such regulatory activity (DORCs)
48 |
49 | ### FigR
50 |
51 | Once you have your DORC definitions, you can use this, along with the paired RNA data, to run the core FigR function. This returns a table of regulations cores between each DORC gene and a TF in the reference database, which we can filter on and visualize (see section below)
52 |
53 | ```
54 | # Run FigR
55 | fig.d <- runFigRGRN(ATAC.se=,ATAC.SE,
56 | rnaMat=rnaMat.smooth, # Smoothed RNA matrix using paired cell kNNs
57 | dorcMat=dorcMat.smooth,
58 | dorcTab=cisCor.filt,
59 | genome="hg19",
60 | dorcGenes=dorcGenes,
61 | nCores=4)
62 |
63 | ```
64 |
65 | ### Visualizing FigR results
66 |
67 | ```
68 |
69 | # Visualize all TF-DORC regulation scores (Scatter plot)
70 | require(ggplot2)
71 | require(ggrastr)
72 | require(BuenColors) # https://github.com/caleblareau/BuenColors
73 |
74 | fig.d %>% ggplot(aes(Corr.log10P,Enrichment.log10P,color=Score)) +
75 | geom_point_rast(size=0.01,shape=16) +
76 | theme_classic() +
77 | scale_color_gradientn(colours = jdb_palette("solar_extra"),limits=c(-4,4),oob = scales::squish)
78 |
79 |
80 | ```
81 |
82 | ### What reference genomes does FigR currently support?
83 |
84 | FigR currently has built in support for human reference genomes hg19 and hg38, and mouse reference genome mm10. We will soon provide support for user-defined input genome objects (has to be supported by the `BSgenome` suite of packages) as well as objects with TSS coordinates per gene (of class `GRanges`). Users are responsible for ensuring the right reference genome object is paired with the appropriate TSS gene object, if specified
85 |
86 | # About
87 |
88 | We are actively updating this package to help with user requests!
89 |
90 | Please visit our [documentation website](https://buenrostrolab.github.io/FigR/) for more details on examples and functions that the FigR package supports.
91 |
92 | You may also directly check out our walk-throughs on applying the FigR framework to multi-modal and independently derived scATAC-seq / scRNA-seq data by clicking on the links below:
93 |
94 |
MIT License
57 |
58 | Copyright (c) 2021 Buenrostro Lab
59 |
60 | Permission is hereby granted, free of charge, to any person obtaining a copy
61 | of this software and associated documentation files (the "Software"), to deal
62 | in the Software without restriction, including without limitation the rights
63 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
64 | copies of the Software, and to permit persons to whom the Software is
65 | furnished to do so, subject to the following conditions:
66 |
67 | The above copyright notice and this permission notice shall be included in all
68 | copies or substantial portions of the Software.
69 |
70 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
75 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
76 | SOFTWARE.
77 |
78 |
79 |
80 |
81 |
82 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/crosstalk-1.1.1/css/crosstalk.css:
--------------------------------------------------------------------------------
1 | /* Adjust margins outwards, so column contents line up with the edges of the
2 | parent of container-fluid. */
3 | .container-fluid.crosstalk-bscols {
4 | margin-left: -30px;
5 | margin-right: -30px;
6 | white-space: normal;
7 | }
8 |
9 | /* But don't adjust the margins outwards if we're directly under the body,
10 | i.e. we were the top-level of something at the console. */
11 | body > .container-fluid.crosstalk-bscols {
12 | margin-left: auto;
13 | margin-right: auto;
14 | }
15 |
16 | .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column {
17 | display: inline-block;
18 | padding-right: 12px;
19 | vertical-align: top;
20 | }
21 |
22 | @media only screen and (max-width:480px) {
23 | .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column {
24 | display: block;
25 | padding-right: inherit;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/d3-4.5.0/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2010-2016 Mike Bostock
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | * Neither the name of the author nor the names of contributors may be used to
15 | endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/firstUMAP-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/firstUMAP-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/getDORCs-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/getDORCs-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/plotDrivers-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/plotDrivers-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/plotHeat-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/plotHeat-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/plotHeat2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/plotHeat2-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/plotallFigR-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/plotallFigR-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/rankDrivers-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/rankDrivers-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/figure-html/visDORCs-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_shareseq_files/figure-html/visDORCs-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_shareseq_files/plotly-htmlwidgets-css-1.57.1/plotly-htmlwidgets.css:
--------------------------------------------------------------------------------
1 | /*
2 | just here so that plotly works
3 | correctly with ioslides.
4 | see https://github.com/ropensci/plotly/issues/463
5 | */
6 |
7 | slide:not(.current) .plotly.html-widget{
8 | display: none;
9 | }
10 |
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/crosstalk-1.1.1/css/crosstalk.css:
--------------------------------------------------------------------------------
1 | /* Adjust margins outwards, so column contents line up with the edges of the
2 | parent of container-fluid. */
3 | .container-fluid.crosstalk-bscols {
4 | margin-left: -30px;
5 | margin-right: -30px;
6 | white-space: normal;
7 | }
8 |
9 | /* But don't adjust the margins outwards if we're directly under the body,
10 | i.e. we were the top-level of something at the console. */
11 | body > .container-fluid.crosstalk-bscols {
12 | margin-left: auto;
13 | margin-right: auto;
14 | }
15 |
16 | .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column {
17 | display: inline-block;
18 | padding-right: 12px;
19 | vertical-align: top;
20 | }
21 |
22 | @media only screen and (max-width:480px) {
23 | .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column {
24 | display: block;
25 | padding-right: inherit;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/d3-4.5.0/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2010-2016 Mike Bostock
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | * Neither the name of the author nor the names of contributors may be used to
15 | endorse or promote products derived from this software without specific prior
16 | written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/CCAumap-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/CCAumap-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/getDORCs-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/getDORCs-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/plotATAC-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/plotATAC-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/plotHeat-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/plotHeat-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/plotPairs-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/plotPairs-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/plotallFigR-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/plotallFigR-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/rankDrivers-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/rankDrivers-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/figure-html/visDORCs-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/docs/articles/FigR_stim_files/figure-html/visDORCs-1.png
--------------------------------------------------------------------------------
/docs/articles/FigR_stim_files/plotly-htmlwidgets-css-1.57.1/plotly-htmlwidgets.css:
--------------------------------------------------------------------------------
1 | /*
2 | just here so that plotly works
3 | correctly with ioslides.
4 | see https://github.com/ropensci/plotly/issues/463
5 | */
6 |
7 | slide:not(.current) .plotly.html-widget{
8 | display: none;
9 | }
10 |
--------------------------------------------------------------------------------
/docs/articles/index.html:
--------------------------------------------------------------------------------
1 |
2 | Articles • FigR
6 | Skip to contents
7 |
8 |
9 |
boolean value whether or not to score cells in chunks (useful for large scATAC datasets of > 5,000 cells). If TRUE, cells are centered sequentially in chunks of size=1000 cells at a time to avoid memory limitations, and eventually merged (column-wise). Overriden and set to TRUE if > 10,000 cells in dataset
72 |
chunkSize
73 |
numeric specifying the number of cells to perform centering for at once, if running in chunks (to save memory). Default is 1000
Function to compute single cell DORC scores for each gene identified as a DORC (see runGenePeakcorr for determining DORCs through peak-gene correlations)
SummarizedExperiment object of the scATAC-seq reads in peak counts.
76 |
dorcTab
77 |
data.frame object containing significant peak-gene pairs using which DORC scores will be computed. Must be a filtered set returned from runGenePeakcorr. IMPORTANT: Make sure the exact same scATAC SE (peak set) was used when determining DORCs that is used here to get corresponding DORC peak counts
78 |
normalizeATACmat
79 |
boolean indicating whether or not to normalize the counts present in the ATAC.se object prior to summing peak counts per gene. Default is TRUE (i.e. assumes peak counts are raw).
80 |
geneList
81 |
character vector specifying a subset of genes to compute scores for. Useful if you already have a set list of DORCs and you only want to compute scores for those genes/peaks.
82 |
nCores
83 |
numeric indicating the number of cores to use if parallelizing tasks
84 |
85 |
86 |
Value
87 |
a Matrix object of scores pertaining to the sum of normalized scATAC peak counts per gene, as determined for significant gene-peak pairs when calling DORCs
Wrapper function to assess a specific set of peaks for enrichment with respect to TF binding motifs using a Z test after adjusting for GC bias and Tn5 accessibility
59 |
60 |
61 |
62 |
Usage
63 |
motifPeakZtest(peakSet, bgPeaks, tfMat)
64 |
65 |
66 |
67 |
Arguments
68 |
peakSet
69 |
vector of peak indices you wish to test for motif enrichment
70 |
bgPeaks
71 |
background peaks matrix returned by getBackgroundPeaks function in chromVAR
72 |
tfMat
73 |
binary match sparseMatrix object of (reference) peaks by TF motifs returned by matchMotifs function
74 |
75 |
76 |
Value
77 |
data frame of motif enrichment results rank sorted by significance and frequency of motifs in the peakset, respectively
78 |
79 |
80 |
Author
81 |
Vinay Kartha, Samuel Rose, and Jason D. Buenrostro
Wrapper function for running ATAC/RNA pairing in cell chunks using co-embedding components
59 |
60 |
61 |
62 |
Usage
63 |
pairCells(ATAC, RNA, keepUnique =FALSE, ...)
64 |
65 |
66 |
67 |
Arguments
68 |
ATAC
69 |
combined co-embedding components matrix of the ATAC cells (e.g. CCA). Must have valid ATAC cell barcode names as the rownames.
70 |
RNA
71 |
same as `ATAC`, but for RNA cells. Must have valid RNA cell barcode names as the rownames (unique from ATAC cell barcodes), and have the same number of components (columns) as the `ATAC` matrix
72 |
keepUnique
73 |
boolean indicating whether or not to remove any resulting many-to-many ATAC-RNA paired cells returned by the geodesic pairing method (depending on what the `max_multimatch` parameter is set to in FigR[cell_pairing], which defaults to 5). Default is FALSE, meaning in the returned pairing, there can a single cell in the larger dataset paired to upto `max_multimatch` cells in the smaller dataset. See FigR[cell_pairing] for more details. If set to TRUE, we further filter pairs and return for each cell in the larger dataset the best match in the smaller dataset (among the multiple options, if any) based on the min euclidean distances between pair options (in the supplied reduced dimension space). Useful for RNA to ATAC cell cluster label transfer (since each ATAC cell can only acquire a single cluster identity based on the best RNA cell match), but not required for downstream analyses (peak-gene correlations and TF-DORC associations)
74 |
...
75 |
additional parameters passed to cell_pairing. Useful parameters for enabling a search solution include `search_range` and `min_subgraph_size`, which dictates how cells are potentially excluded from being paired
Scatter plot visualization of filtered TF-DORC associations based on the enrichment of each motif among the queried DORC's peaks and the correlation of the TF RNA to the DORC accessibility score
character vector of the ATAC barcodes returned in the resulting pairing data frame returned by the cell_pairing function
70 |
RNA
71 |
character vector of the RNA barcodes returned in the resulting pairing data frame returned by the cell_pairing function
72 |
umap.df
73 |
data.frame that has the ATAC/RNA co-embedding UMAP 1/2 coordinates in the first and second columns, respectively. Must have valid ATAC and RNA barcodes as row names, which will be used to subset pairs
74 |
max.show
75 |
numeric specifying the maximum number of pairs to limit plotting to. Default is 300 (choose fewer for better visibility if the UMAP is crowded)
76 |
seed
77 |
numeric specifying a random seed to set for sampling pairs (for reproducibility). Default is 123
78 |
pairPointSize
79 |
scatter plot point size. Default is 1
80 |
81 |
82 |
Value
83 |
a ggplot scatter plot with user-provided coordinates, highlighting ATAC-RNA pairs
character specifying one of "meanScore" or "nTargets" to either rank TFs by the mean regulation score across all genes, or by the total number of inferred activated or repressed targets passing a specified (absolute) regulation score, respectively
78 |
myLabels
79 |
character vector specifying the subset of TFs to highlight on the plot, if rankBy is set to "meanScore". Useful if you want to see where your TFs of interest lie. If NULL (Default), we label the top and bottom 95 percentile TFs
80 |
score.cut
81 |
numeric specifying the absolute regulation score to threshold TF-DORC connections on, only if rankBy is set to "nTargets". Default is 1 if "nTargets" and no custom cut-off is specified
82 |
interactive
83 |
boolean indicating whether or not to allow interactive hover-over utility for more label information (useful if visualizing too many TFs and labels are hard to distinguish). Default is FALSE
84 |
85 |
86 |
Value
87 |
a ggplot2 object of the resulting plot
88 |
89 |
90 |
Author
91 |
Vinay Kartha
92 |
93 |
94 |
96 |
97 |
98 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/docs/sitemap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | https://buenrostrolab.github.io/FigR/404.html
5 |
6 |
7 | https://buenrostrolab.github.io/FigR/articles/FigR_shareseq.html
8 |
9 |
10 | https://buenrostrolab.github.io/FigR/articles/FigR_stim.html
11 |
12 |
13 | https://buenrostrolab.github.io/FigR/articles/index.html
14 |
15 |
16 | https://buenrostrolab.github.io/FigR/authors.html
17 |
18 |
19 | https://buenrostrolab.github.io/FigR/index.html
20 |
21 |
22 | https://buenrostrolab.github.io/FigR/LICENSE-text.html
23 |
24 |
25 | https://buenrostrolab.github.io/FigR/reference/cell_pairing.html
26 |
27 |
28 | https://buenrostrolab.github.io/FigR/reference/centerCounts.html
29 |
30 |
31 | https://buenrostrolab.github.io/FigR/reference/dorcJPlot.html
32 |
33 |
34 | https://buenrostrolab.github.io/FigR/reference/extractTFNames.html
35 |
36 |
37 | https://buenrostrolab.github.io/FigR/reference/getDORCScores.html
38 |
39 |
40 | https://buenrostrolab.github.io/FigR/reference/index.html
41 |
42 |
43 | https://buenrostrolab.github.io/FigR/reference/motifPeakZtest.html
44 |
45 |
46 | https://buenrostrolab.github.io/FigR/reference/pairCells.html
47 |
48 |
49 | https://buenrostrolab.github.io/FigR/reference/plotDrivers.html
50 |
51 |
52 | https://buenrostrolab.github.io/FigR/reference/plotfigRHeatmap.html
53 |
54 |
55 | https://buenrostrolab.github.io/FigR/reference/plotfigRNetwork.html
56 |
57 |
58 | https://buenrostrolab.github.io/FigR/reference/plotMarker2D.html
59 |
60 |
61 | https://buenrostrolab.github.io/FigR/reference/plotPairs.html
62 |
63 |
64 | https://buenrostrolab.github.io/FigR/reference/rankDrivers.html
65 |
66 |
67 | https://buenrostrolab.github.io/FigR/reference/runFigRGRN.html
68 |
69 |
70 | https://buenrostrolab.github.io/FigR/reference/runGenePeakcorr.html
71 |
72 |
73 | https://buenrostrolab.github.io/FigR/reference/smoothScoresNN.html
74 |
75 |
76 | https://buenrostrolab.github.io/FigR/reference/splitAndFetch.html
77 |
78 |
79 |
--------------------------------------------------------------------------------
/images/FigR.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/images/FigR.PNG
--------------------------------------------------------------------------------
/images/PBMCs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/images/PBMCs.png
--------------------------------------------------------------------------------
/images/skin.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/images/skin.PNG
--------------------------------------------------------------------------------
/images/skinv2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/images/skinv2.png
--------------------------------------------------------------------------------
/inst/CITATION:
--------------------------------------------------------------------------------
1 | citHeader("To cite FigR in publications please use:")
2 |
3 | citEntry(
4 | entry = "Article",
5 | title = "Functional Inference of Gene Regulation using Single-Cell Multi-Omics",
6 | author = "Vinay K. Kartha et al.",
7 | journal = "Cell Genomics",
8 | year = "2022",
9 | volume = "2",
10 | number = "9",
11 | pages = "100166",
12 | url = "https://www.sciencedirect.com/science/article/pii/S2666979X22001082",
13 | textVersion = paste(
14 | "Kartha, VK. et al. Functional Inference of Gene Regulation using Single-Cell Multi-Omics. Cell Genomics (2022)"
15 | )
16 | )
17 |
18 |
--------------------------------------------------------------------------------
/man/cell_pairing.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/cellPairing.R
3 | \name{cell_pairing}
4 | \alias{cell_pairing}
5 | \title{Pair cells}
6 | \usage{
7 | cell_pairing(
8 | ATACpcs,
9 | RNApcs,
10 | mode = "geodesic",
11 | tol = 1e-04,
12 | search_range = 0.2,
13 | max_multimatch = 5,
14 | umap_knn_k = 30,
15 | min_subgraph_size = 50,
16 | cca_umap_df = NULL,
17 | seed = 123
18 | )
19 | }
20 | \arguments{
21 | \item{ATACpcs}{combined co-embedding components matrix of the ATAC cells. Must have valid ATAC cell barcode names as the rownames.}
22 |
23 | \item{RNApcs}{combined co-embedding components matrix of the RNA cells. Must have valid RNA cell barcode names as the rownames (unique from ATAC cell barcodes), and have the same number of components (columns) as the `ATACpcs` matrix}
24 |
25 | \item{mode}{character specifying the pairing mode. Must be one of 'geodesic' (default) or 'greedy'.}
26 |
27 | \item{tol}{See \code{\link[optmatch]{fullmatch}} for more information on this parameter}
28 |
29 | \item{search_range}{This determines the size of the search knn window for allowed pairing. search_range * total number of cells = size of knn. Default is 0.2. Increasing this can take more time since we have to evaluate over more possible pairs}
30 |
31 | \item{max_multimatch}{Maximum number of cells in the larger dataset that is allowed to be matched to each cell in the smaller dataset (after up-sampling). Default is 5. This is only to allow for a solvable optmatch solution given geodesic constraints}
32 |
33 | \item{umap_knn_k}{Number of geodesic ATAC x RNA neighbors to consider in co-embedding graph}
34 |
35 | \item{min_subgraph_size}{Minimum number of cells (ATAC/RNA each) needed for pairing in a given subgraph. Will skip subgraphs with fewer than these cells.Default is 50 cells. Useful to set this to the smallest cell cluster size you might have in the data}
36 |
37 | \item{cca_umap_df}{optional umap of all ATAC+RNA cells to visualize UMAP of cells from each chunk being paired, colored by subgraph}
38 |
39 | \item{seed}{numeric specifying seed to use for subgraph UMAP and for down-sampling in case subgraphs are imbalanced}
40 | }
41 | \value{
42 | a data.frame object containing ATAC and RNA cell barcodes from the resulting pairing
43 | }
44 | \description{
45 | Perform geodesic pairing using ATAC/RNA co-embedding components
46 | }
47 | \author{
48 | Yan Hu, Vinay Kartha
49 | }
50 |
--------------------------------------------------------------------------------
/man/centerCounts.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/utils.R
3 | \name{centerCounts}
4 | \alias{centerCounts}
5 | \title{Center single-cell ATAC-seq count data}
6 | \usage{
7 | centerCounts(obj, doInChunks = TRUE, chunkSize = 1000)
8 | }
9 | \arguments{
10 | \item{obj}{Either a \code{\link[SummarizedExperiment]{RangedSummarizedExperiment-class}} or \code{\link[Matrix]{dgeMatrix-class}} object of the single-cell ATAC data (peaks x cells) to center raw data for}
11 |
12 | \item{doInChunks}{boolean value whether or not to score cells in chunks (useful for large scATAC datasets of > 5,000 cells). If TRUE, cells are centered sequentially in chunks of size=1000 cells at a time to avoid memory limitations, and eventually merged (column-wise). Overriden and set to TRUE if > 10,000 cells in dataset}
13 |
14 | \item{chunkSize}{numeric specifying the number of cells to perform centering for at once, if running in chunks (to save memory). Default is 1000}
15 | }
16 | \value{
17 | Either a \code{\link[SummarizedExperiment]{RangedSummarizedExperiment-class}} or \code{\link[Matrix]{dgeMatrix-class}} object with counts centered by mean reads in peaks per cell
18 | }
19 | \description{
20 | Function to center raw read counts for scATAC-seq data based on mean reads in features/rows (e.g. peaks) per cell
21 | }
22 | \author{
23 | Vinay Kartha
24 | }
25 |
--------------------------------------------------------------------------------
/man/dorcJPlot.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/DORCs.R
3 | \name{dorcJPlot}
4 | \alias{dorcJPlot}
5 | \title{DORC J scatter plot}
6 | \usage{
7 | dorcJPlot(
8 | dorcTab,
9 | cutoff = 7,
10 | labelTop = 25,
11 | returnGeneList = FALSE,
12 | cleanLabels = TRUE,
13 | labelSize = 4,
14 | ...
15 | )
16 | }
17 | \arguments{
18 | \item{dorcTab}{data.frame object containing significant peak-gene pairs using which DORC scores will be computed. Must be a filtered set returned from \code{\link[FigR]{runGenePeakcorr}}. IMPORTANT: Make sure the exact same scATAC SE (peak set) was used when determining DORCs that is used here to get corresponding DORC peak counts}
19 |
20 | \item{cutoff}{numeric indicating cut-off to use for number of significant peaks per gene to call it a DORC. Default is 7 significant peaks per gene.}
21 |
22 | \item{labelTop}{numeric indicating the number of top genes to add labels for. Setting this to a very high number can lead to plot rendering difficulties (since labels get crowded).}
23 |
24 | \item{returnGeneList}{boolean indicating whether to also return the DORCs passing the provided filter. Default is FALSE (will just plot and nothing else)}
25 |
26 | \item{cleanLabels}{boolean indicating whether or not to try to have cleaner DORC gene labels. If TRUE, uses \code{\link[ggrepel]{geom_text_repel}}, if FALSE, will use regular \code{\link[ggplot2]{geom_text}}}
27 |
28 | \item{labelSize}{numeric indicating what to set label size to. Default is 4.}
29 |
30 | \item{...}{additional parameters passed to either \code{\link[ggrepel]{geom_text_repel}} (if cleanLabels is set to TRUE) or \code{\link[ggplot2]{geom_text}}. For example, set size to control font size, or segment.length or segment.color to control call-out segment length and color etc.}
31 | }
32 | \value{
33 | a ggplot object of the DORC J plot. If returnGeneList is set to TRUE, then also returns the vector of DORC genes passing the specified threshold
34 | }
35 | \description{
36 | Function to visualize genes based on number of significant gene-peak correlations (per gene), used to define DORCs
37 | }
38 | \author{
39 | Vinay Kartha
40 | }
41 |
--------------------------------------------------------------------------------
/man/extractTFNames.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/utils.R
3 | \name{extractTFNames}
4 | \alias{extractTFNames}
5 | \title{Fetch TF names}
6 | \usage{
7 | extractTFNames(motifIDs)
8 | }
9 | \arguments{
10 | \item{motifIDs}{vector of full motif IDs that are part of the original human or mouse pwms matrix (see \url{https://github.com/GreenleafLab/chromVARmotifs})}
11 | }
12 | \value{
13 | a vector of TF names extracted from the full motif ID (if older format with '_'), or returned as is otherwise
14 | }
15 | \description{
16 | This function fetches TF names from full motif IDs (see \url{https://github.com/GreenleafLab/chromVARmotifs})
17 | }
18 | \author{
19 | Vinay Kartha
20 | }
21 |
--------------------------------------------------------------------------------
/man/figures/FigR.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/man/figures/FigR.PNG
--------------------------------------------------------------------------------
/man/figures/PBMCs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/man/figures/PBMCs.png
--------------------------------------------------------------------------------
/man/figures/skinv2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buenrostrolab/FigR/094f5aa036aa9dc09b85d60c13dd9ead7da416fd/man/figures/skinv2.png
--------------------------------------------------------------------------------
/man/getDORCScores.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/DORCs.R
3 | \name{getDORCScores}
4 | \alias{getDORCScores}
5 | \title{DORC scATAC-seq score summarization for single cells}
6 | \usage{
7 | getDORCScores(
8 | ATAC.se,
9 | dorcTab,
10 | normalizeATACmat = TRUE,
11 | geneList = NULL,
12 | nCores = 4
13 | )
14 | }
15 | \arguments{
16 | \item{ATAC.se}{SummarizedExperiment object of the scATAC-seq reads in peak counts.}
17 |
18 | \item{dorcTab}{data.frame object containing significant peak-gene pairs using which DORC scores will be computed. Must be a filtered set returned from \code{\link[FigR]{runGenePeakcorr}}. IMPORTANT: Make sure the exact same scATAC SE (peak set) was used when determining DORCs that is used here to get corresponding DORC peak counts}
19 |
20 | \item{normalizeATACmat}{boolean indicating whether or not to normalize the counts present in the ATAC.se object prior to summing peak counts per gene. Default is TRUE (i.e. assumes peak counts are raw).}
21 |
22 | \item{geneList}{character vector specifying a subset of genes to compute scores for. Useful if you already have a set list of DORCs and you only want to compute scores for those genes/peaks.}
23 |
24 | \item{nCores}{numeric indicating the number of cores to use if parallelizing tasks}
25 | }
26 | \value{
27 | a Matrix object of scores pertaining to the sum of normalized scATAC peak counts per gene, as determined for significant gene-peak pairs when calling DORCs
28 | }
29 | \description{
30 | Function to compute single cell DORC scores for each gene identified as a DORC (see \code{\link[FigR]{runGenePeakcorr}} for determining DORCs through peak-gene correlations)
31 | }
32 | \author{
33 | Vinay Kartha
34 | }
35 |
--------------------------------------------------------------------------------
/man/motifPeakZtest.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/utils.R
3 | \name{motifPeakZtest}
4 | \alias{motifPeakZtest}
5 | \title{Peak-based TF motif enrichment Z-test}
6 | \usage{
7 | motifPeakZtest(peakSet, bgPeaks, tfMat)
8 | }
9 | \arguments{
10 | \item{peakSet}{vector of peak indices you wish to test for motif enrichment}
11 |
12 | \item{bgPeaks}{background peaks matrix returned by \code{\link[chromVAR]{getBackgroundPeaks}} function in chromVAR}
13 |
14 | \item{tfMat}{binary match \code{\link[Matrix]{sparseMatrix}} object of (reference) peaks by TF motifs returned by \code{\link[motifmatchr]{matchMotifs}} function}
15 | }
16 | \value{
17 | data frame of motif enrichment results rank sorted by significance and frequency of motifs in the peakset, respectively
18 | }
19 | \description{
20 | Wrapper function to assess a specific set of peaks for enrichment with respect to TF binding motifs using a Z test after adjusting for GC bias and Tn5 accessibility
21 | }
22 | \author{
23 | Vinay Kartha, Samuel Rose, and Jason D. Buenrostro
24 | }
25 |
--------------------------------------------------------------------------------
/man/pairCells.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/cellPairing.R
3 | \name{pairCells}
4 | \alias{pairCells}
5 | \title{Pair cells}
6 | \usage{
7 | pairCells(ATAC, RNA, keepUnique = FALSE, ...)
8 | }
9 | \arguments{
10 | \item{ATAC}{combined co-embedding components matrix of the ATAC cells (e.g. CCA). Must have valid ATAC cell barcode names as the rownames.}
11 |
12 | \item{RNA}{same as `ATAC`, but for RNA cells. Must have valid RNA cell barcode names as the rownames (unique from ATAC cell barcodes), and have the same number of components (columns) as the `ATAC` matrix}
13 |
14 | \item{keepUnique}{boolean indicating whether or not to remove any resulting many-to-many ATAC-RNA paired cells returned by the geodesic pairing method (depending on what the `max_multimatch` parameter is set to in {FigR}[cell_pairing], which defaults to 5). Default is FALSE, meaning in the returned pairing, there can a single cell in the larger dataset paired to upto `max_multimatch` cells in the smaller dataset. See {FigR}[cell_pairing] for more details. If set to TRUE, we further filter pairs and return for each cell in the larger dataset the best match in the smaller dataset (among the multiple options, if any) based on the min euclidean distances between pair options (in the supplied reduced dimension space). Useful for RNA to ATAC cell cluster label transfer (since each ATAC cell can only acquire a single cluster identity based on the best RNA cell match), but not required for downstream analyses (peak-gene correlations and TF-DORC associations)}
15 |
16 | \item{...}{additional parameters passed to \code{\link[FigR]{cell_pairing}}. Useful parameters for enabling a search solution include `search_range` and `min_subgraph_size`, which dictates how cells are potentially excluded from being paired}
17 | }
18 | \value{
19 |
20 | }
21 | \description{
22 | Wrapper function for running ATAC/RNA pairing in cell chunks using co-embedding components
23 | }
24 | \author{
25 | Vinay Kartha Yan Hu
26 | }
27 |
--------------------------------------------------------------------------------
/man/plotDrivers.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/FigR.R
3 | \name{plotDrivers}
4 | \alias{plotDrivers}
5 | \title{Plot FigR scatter profile}
6 | \usage{
7 | plotDrivers(figR.d, marker, score.cut = 1, label = TRUE)
8 | }
9 | \arguments{
10 | \item{figR.d}{data.frame of results returned by \code{\link[FigR]{runFigRGRN}})}
11 |
12 | \item{marker}{character specifying a valid DORC gene to restrict TF drivers for}
13 |
14 | \item{score.cut}{numeric specifying the absolute regulation score to threshold TF-DORC connections on. Default is 1}
15 |
16 | \item{label}{boolean indicating whether or not to add text labels for TF drivers passing score filter}
17 | }
18 | \value{
19 | a ggplot2 object of the scatter plot of predicted TF drivers for the specified DORC
20 | }
21 | \description{
22 | Scatter plot visualization of filtered TF-DORC associations based on the enrichment of each motif among the queried DORC's peaks and the correlation of the TF RNA to the DORC accessibility score
23 | }
24 | \author{
25 | Vinay Kartha
26 | }
27 |
--------------------------------------------------------------------------------
/man/plotMarker2D.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/utils.R
3 | \name{plotMarker2D}
4 | \alias{plotMarker2D}
5 | \title{Plot marker scores on single cell scatter plots}
6 | \usage{
7 | plotMarker2D(
8 | df,
9 | markers,
10 | markerMat,
11 | pointSize = 0.5,
12 | plotClean = TRUE,
13 | rasteRize = TRUE,
14 | splitBy = NULL,
15 | minCutoff = NULL,
16 | maxCutoff = NULL,
17 | colorPalette = "solar_extra",
18 | legend.position = "bottom",
19 | showDataRange = TRUE,
20 | combine = TRUE,
21 | ...
22 | )
23 | }
24 | \arguments{
25 | \item{df}{data.frame object of 2-D coordinates, where each row is a cell and the first two columns corresponds to the first (x-axis) and second (y-axis) dimensions to use for the plot (e.g. UMAP coordinates). Can have additional cell metadata columns used for splitting (see splitBy parameter)}
26 |
27 | \item{markers}{character vector of markers to visualize (can list multiple). Must be one of the rownames in markerMat}
28 |
29 | \item{markerMat}{matrix of scores containing markers to visualize. Can be a sparse matrix. Must have rownames}
30 |
31 | \item{pointSize}{integer specifying point size to use for ggplot (passed to the geom_point() layer in ggplot). Default is 0.5}
32 |
33 | \item{plotClean}{boolean indicating whether or not to return a 'clean' plot without any axes}
34 |
35 | \item{rasteRize}{boolean indicating whether to use raster point rendering (to avoid giant file sizes and too many point layers in PDFs). Requires ggrastr package if set to TRUE (Default)}
36 |
37 | \item{splitBy}{character indicating a single variable to split cells by using facets when visualizing. Must be a valid column name in df}
38 |
39 | \item{minCutoff}{cut off to use for capping minimum values prior to visualization. Can either be a raw numeric value, a percentile value cut-off (0-1) or the number of standard deviations below the mean, used to set the minimum value in the dataset prior to plotting. For percentiles, must be a character with 'q' before the percentile cut-off value (e.g. 'q0.1' for 10\%ile minimum). For standard deviation-based capping, must be a character with 'sd' before the cut-off value (e.g. 'sd2' for using 2 standard deviations below the mean as the minimum value displayed)}
40 |
41 | \item{maxCutoff}{cut off to use for capping maximum values prior to visualization. Can either be a raw numeric value, a percentile value cut-off (0-1) or the number of standard deviations above the mean, used to set the minimum value in the dataset prior to plotting. For percentiles, must be a character with 'q' before the percentile cut-off value (e.g. 'q0.9' for 90\%ile maximum). For standard deviation-based capping, must be a character with 'sd' before the cut-off value (e.g. 'sd2' for using 2 standard deviations above the mean as the maximum value displayed)}
42 |
43 | \item{colorPalette}{color palette name specification to use for coloring points. Default is "solar_extra". See \href{https://github.com/caleblareau/BuenColors}{BuenColors} package developed by Caleb Lareau for more palette options}
44 |
45 | \item{legend.position}{character specifying where to place the legend. Valid options are "top", "bottom", "left", "right", or "none" (to remove the legend completely). Default is bottom}
46 |
47 | \item{showDataRange}{boolean indicating whether or not to show the data numeric range in the legends (only applies if legends are being displayed). Default is TRUE. If set to FALSE, just shows as min and max}
48 |
49 | \item{combine}{boolean indicating whether or not to merge plots and display as grid.Default is TRUE}
50 |
51 | \item{...}{extra parameters passed to cowplot's \code{\link[cowplot]{plot_grid}} function to control organization of plot grids. Useful parameters include nrow and ncol that control the number of rows and columns in the layout, respectively}
52 | }
53 | \value{
54 | If a single marker is queried, or combine is set to TRUE for multiple markers, a ggplot object will be printed to graphics window unless assigned to variable. If combine is set to FALSE, then a list object of individual plots per marker is returned
55 | }
56 | \description{
57 | Function to plot variable of interest (e.g. scATAC-seq gene score, motif score, scRNA-seq expression etc.) onto existing tSNE/UMAP coordinates of single cell clusters
58 | }
59 | \author{
60 | Vinay Kartha
61 | }
62 |
--------------------------------------------------------------------------------
/man/plotPairs.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/cellPairing.R
3 | \name{plotPairs}
4 | \alias{plotPairs}
5 | \title{Plot ATAC-RNA scOptMatch pairs}
6 | \usage{
7 | plotPairs(ATAC, RNA, umap.df, max.show = 300, seed = 123, pairPointSize = 1)
8 | }
9 | \arguments{
10 | \item{ATAC}{character vector of the ATAC barcodes returned in the resulting pairing data frame returned by the \code{\link[FigR]{cell_pairing}} function}
11 |
12 | \item{RNA}{character vector of the RNA barcodes returned in the resulting pairing data frame returned by the \code{\link[FigR]{cell_pairing}} function}
13 |
14 | \item{umap.df}{data.frame that has the ATAC/RNA co-embedding UMAP 1/2 coordinates in the first and second columns, respectively. Must have valid ATAC and RNA barcodes as row names, which will be used to subset pairs}
15 |
16 | \item{max.show}{numeric specifying the maximum number of pairs to limit plotting to. Default is 300 (choose fewer for better visibility if the UMAP is crowded)}
17 |
18 | \item{seed}{numeric specifying a random seed to set for sampling pairs (for reproducibility). Default is 123}
19 |
20 | \item{pairPointSize}{scatter plot point size. Default is 1}
21 | }
22 | \value{
23 | a ggplot scatter plot with user-provided coordinates, highlighting ATAC-RNA pairs
24 | }
25 | \description{
26 | Function to plot ATAC-RNA pairs in a joint embedding space (.e.g 2D UMAP of both ATAC and RNA cells)
27 | }
28 | \author{
29 | Vinay Kartha
30 | }
31 |
--------------------------------------------------------------------------------
/man/plotfigRHeatmap.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/FigR.R
3 | \name{plotfigRHeatmap}
4 | \alias{plotfigRHeatmap}
5 | \title{Plot FigR heatmap}
6 | \usage{
7 | plotfigRHeatmap(figR.d, score.cut = 1, DORCs = NULL, TFs = NULL, ...)
8 | }
9 | \arguments{
10 | \item{figR.d}{data.frame of results returned by \code{\link[FigR]{runFigRGRN}}).}
11 |
12 | \item{score.cut}{numeric specifying the absolute regulation score to threshold TF-DORC connections on. Default is 1}
13 |
14 | \item{DORCs}{character specifying valid DORC gene symbols to subset heatmap to. Default is NULL (no subsetting)}
15 |
16 | \item{TFs}{character specifying valid TF gene symbols to subset heatmap to. Default is NULL (no subsetting)}
17 |
18 | \item{...}{additional parameters passed to the \code{\link[ComplexHeatmap]{Heatmap}})}
19 | }
20 | \value{
21 | a TF-DORC filtered Heatmap generatd using \code{\link[ComplexHeatmap]{Heatmap}})
22 | }
23 | \description{
24 | Heatmap visualization of TF-DORC associations based on the regulation scores inferred by FigR
25 | }
26 | \author{
27 | Vinay Kartha
28 | }
29 |
--------------------------------------------------------------------------------
/man/plotfigRNetwork.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/FigR.R
3 | \name{plotfigRNetwork}
4 | \alias{plotfigRNetwork}
5 | \title{Plot FigR Network}
6 | \usage{
7 | plotfigRNetwork(
8 | figR.d,
9 | score.cut = 1,
10 | DORCs = NULL,
11 | TFs = NULL,
12 | weight.edges = FALSE,
13 | TFnodecol = "Tomato",
14 | DORCnodecol = "Sky Blue",
15 | posEdgecol = "Forest Green",
16 | negEdgecol = "Purple",
17 | labelSize = 13,
18 | showLegend = TRUE
19 | )
20 | }
21 | \arguments{
22 | \item{figR.d}{data.frame of results returned by \code{\link[FigR]{runFigRGRN}})}
23 |
24 | \item{score.cut}{numeric specifying the absolute regulation score to threshold TF-DORC connections on. Default is 1}
25 |
26 | \item{DORCs}{character specifying valid DORC gene symbols to subset heatmap to. Default is NULL (no subsetting)}
27 |
28 | \item{TFs}{character specifying valid TF gene symbols to subset heatmap to. Default is NULL (no subsetting)}
29 |
30 | \item{TFnodecol}{character specifying valid color name to use for TF nodes. Default is Tomato}
31 |
32 | \item{DORCnodecol}{character specifying valid color name to use for DORC nodes. Default is Sky Blue}
33 |
34 | \item{posEdgecol}{character specifying valid color name to use for Activating edges between TFs and DORCs. Default is Forest Green}
35 |
36 | \item{negEdgecol}{character specifying valid color name to use for Repressive edges between TFs and DORCs. Default is Purple}
37 |
38 | \item{labelSize}{numeric specifying font size to use for all labels. Default is 13}
39 |
40 | \item{showLegend}{boolean indicating whether to show color legend. Default is TRUE}
41 |
42 | \item{weight.edge}{boolean specifying whether or not to weight edges by FigR regulation score. Default is FALSE}
43 | }
44 | \value{
45 | a network plot of the resulting filtered TF-DORC associations
46 | }
47 | \description{
48 | Network visualization of TF-DORC associations based on the regulation scores inferred by FigR
49 | }
50 | \author{
51 | Vinay Kartha
52 | }
53 |
--------------------------------------------------------------------------------
/man/rankDrivers.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/FigR.R
3 | \name{rankDrivers}
4 | \alias{rankDrivers}
5 | \title{Rank TF drivers}
6 | \usage{
7 | rankDrivers(
8 | figR.d,
9 | rankBy = c("meanScore", "nTargets"),
10 | myLabels = NULL,
11 | score.cut = NULL,
12 | interactive = FALSE
13 | )
14 | }
15 | \arguments{
16 | \item{figR.d}{data.frame of results returned by \code{\link[FigR]{runFigRGRN}})}
17 |
18 | \item{rankBy}{character specifying one of "meanScore" or "nTargets" to either rank TFs by the mean regulation score across all genes, or by the total number of inferred activated or repressed targets passing a specified (absolute) regulation score, respectively}
19 |
20 | \item{myLabels}{character vector specifying the subset of TFs to highlight on the plot, if rankBy is set to "meanScore". Useful if you want to see where your TFs of interest lie. If NULL (Default), we label the top and bottom 95 percentile TFs}
21 |
22 | \item{score.cut}{numeric specifying the absolute regulation score to threshold TF-DORC connections on, only if rankBy is set to "nTargets". Default is 1 if "nTargets" and no custom cut-off is specified}
23 |
24 | \item{interactive}{boolean indicating whether or not to allow interactive hover-over utility for more label information (useful if visualizing too many TFs and labels are hard to distinguish). Default is FALSE}
25 | }
26 | \value{
27 | a ggplot2 object of the resulting plot
28 | }
29 | \description{
30 | Ranked plot of TF activators and repressors based on their inferred regulation score
31 | }
32 | \author{
33 | Vinay Kartha
34 | }
35 |
--------------------------------------------------------------------------------
/man/runFigRGRN.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/FigR.R
3 | \name{runFigRGRN}
4 | \alias{runFigRGRN}
5 | \title{Infer FigR TF-DORC associations}
6 | \usage{
7 | runFigRGRN(
8 | ATAC.se,
9 | dorcK = 30,
10 | dorcTab,
11 | n_bg = 50,
12 | genome,
13 | dorcMat,
14 | rnaMat,
15 | dorcGenes = NULL,
16 | nCores = 1
17 | )
18 | }
19 | \arguments{
20 | \item{ATAC.se}{SummarizedExperiment object of peak x cell scATAC-seq data, the same as used to compute DORCs using \code{\link[FigR]{runGenePeakcorr}}}
21 |
22 | \item{dorcK}{numeric specifying the number of dorc nearest-neighbors to pool peaks from for the motif enrichment per DORC. Default is 30, i.e. set to ~3 percent of total DORCs determined}
23 |
24 | \item{dorcTab}{data.frame object containing significant peak-gene pairs using which DORC scores will be computed. Must be a filtered set returned from \code{\link[FigR]{runGenePeakcorr}}. IMPORTANT: Make sure the exact same scATAC SE peak set was used when determining DORCs that is used here to get corresponding DORC peak counts}
25 |
26 | \item{n_bg}{number of background peaks to use for}
27 |
28 | \item{genome}{character specifying a valid genome assembly to use for peak GC content estimation and background peak determination. Must be one of "hg19","hg38", or "mm10", and requires the corresponding genomes package e.g. \code{\link[BSgenome.Hsapiens.UCSC.hg19]{BSgenome.Hsapiens.UCSC.hg19}} for hg19}
29 |
30 | \item{dorcMat}{Matrix object of smoothed single-cell DORC accessibility scores}
31 |
32 | \item{rnaMat}{Matrix object of smoothed single-cell RNA expression values}
33 |
34 | \item{dorcGenes}{character vector specifying the subset of DORCs to test, if not running on everything. Note: We still use the entire list of DORCs found in dorcMat to determine dorc KNNs from, but will only test and include results for these specified genes (also must exist in the provided RNA matrix rnaMat as rownames)}
35 |
36 | \item{nCores}{numeric specifying the number of cores to run DORCs in parallel. Default is 1, i.e. don't use parallel backend}
37 | }
38 | \value{
39 | a data.frame with all TF-DORC motif enrichment and correlation associations, and the corresponding FigR regulation score for each association
40 | }
41 | \description{
42 | Function to run TF motif-to-gene associations using reference DORC peak-gene mappings and TF RNA expression levels
43 | }
44 | \author{
45 | Vinay Kartha
46 | }
47 |
--------------------------------------------------------------------------------
/man/runGenePeakcorr.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/DORCs.R
3 | \name{runGenePeakcorr}
4 | \alias{runGenePeakcorr}
5 | \title{Gene-Peak correlations used for calling domains of regulatory chromatin (DORCs)}
6 | \usage{
7 | runGenePeakcorr(
8 | ATAC.se,
9 | RNAmat,
10 | genome,
11 | geneList = NULL,
12 | windowPadSize = 50000,
13 | normalizeATACmat = TRUE,
14 | nCores = 4,
15 | keepPosCorOnly = TRUE,
16 | keepMultiMappingPeaks = FALSE,
17 | n_bg = 100,
18 | p.cut = NULL
19 | )
20 | }
21 | \arguments{
22 | \item{ATAC.se}{SummarizedExperiment object of the scATAC-seq reads in peak counts.}
23 |
24 | \item{RNAmat}{Matrix object of the normalized scRNA-seq counts. For example, this will be the normalized count data housed within the `@assays$RNA@data` field if processed using Seurat. Must have same number of cells (i.e. matched) with the scATAC-seq data}
25 |
26 | \item{genome}{character specifying the reference genome build to use. Must be one of "hg19", "hg38" or "mm10", with no default}
27 |
28 | \item{normalizeATACmat}{boolean indicating whether or not to normalize the counts present in the ATAC.se object prior to computing correlations. Default is TRUE (i.e. assumes peak counts in ATAC.se are raw)}
29 |
30 | \item{nCores}{numeric indicating the number of cores to use if parallelizing tasks}
31 |
32 | \item{keepPosCorOnly}{boolean indicating whether to only filter for positively correlated gene-peak associations (and hence assumes performing a right-tailed Z-test with permuted correlations). Default is TRUE (only keep positively correlated associations)}
33 |
34 | \item{keepMultiMappingPeaks}{boolean indicating whether or not to keep peaks mapping to more than 1 gene. Default is FALSE (i.e. force 1-1 mapping for peak-gene, keeping peak with higher correlation if mapping to more than one gene)}
35 |
36 | \item{n_bg}{numeric indicating the number of background correlations to compute per gene-peak pair. Default is 100 (increasing this can significantly increase run time)}
37 |
38 | \item{p.cut}{numeric indicating p-value cut-off to apply to gene-peak correlations. Default is NULL (i.e. don't apply any filtering of results). Good option is to set to 0.05}
39 |
40 | \item{TSSwindow}{numeric specifying the window size (in base pairs) to pad around either side of each TSS, to fetch overlapping peaks. Default is 50 kb (so 100 kb window is drawn arund each TSS)}
41 | }
42 | \value{
43 | a data.frame of correlations for each gene-peak overlap pair, with the observed correlation level and significance p-value based on background correlations per pair
44 | }
45 | \description{
46 | Function to compute correlation between RNA expression and peak accessibility for peaks falling within a window around each gene, across single cells, using background peak correlations for significance testing
47 | }
48 | \author{
49 | Vinay Kartha
50 | }
51 |
--------------------------------------------------------------------------------
/man/smoothScoresNN.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/utils.R
3 | \name{smoothScoresNN}
4 | \alias{smoothScoresNN}
5 | \title{Smooth single cell matrix using cell kNNs}
6 | \usage{
7 | smoothScoresNN(NNmat, mat, geneList = NULL, barcodesList = NULL, nCores = 1)
8 | }
9 | \arguments{
10 | \item{NNmat}{matrix of K Nearest neighbor indices for each cell (row), where each column is one of K nearest neighbors per cell. See the \code{\link[FNN]{knn.index}} function for obtaining these K nearest neighbor maps. Rownames must be valid cell IDs.}
11 |
12 | \item{mat}{matrix of single cell scores. Rownames must be valid gene symbols, and column names must be valid cell IDs matching the rownames in the cell NN matrix.}
13 |
14 | \item{geneList}{vector of valid gene names to compute smoothed TSS accessibility scores for. If geneList is NULL, all genes (rows) in the TSS matrix are used}
15 |
16 | \item{barcodesList}{vector of valid barcode IDs to subset data using and compute smoothed TSS accessibility scores for. If barcodesList is NULL, all cell barcodes (columns) in the TSS matrix are used}
17 |
18 | \item{nCores}{integer specifying the number of cores to use, if running in parallel. Default is 1 (i.e. no parallelization)}
19 | }
20 | \value{
21 | a matrix of scores for each gene TSS and each cell, smoothed over its K nearest neighbors
22 | }
23 | \description{
24 | Method to smooth sparse scores (e.g. RNA expression, ATAC gene scores, or DORC scores) per cell per feature using cell K nearest neighbors (NNs). Useful for visualizing scores in single cells for tSNE and UMAP plots.
25 | }
26 | \author{
27 | Vinay Kartha
28 | }
29 |
--------------------------------------------------------------------------------
/man/splitAndFetch.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/utils.R
3 | \name{splitAndFetch}
4 | \alias{splitAndFetch}
5 | \title{Split and fetch string subparts}
6 | \usage{
7 | splitAndFetch(vec, delim, part)
8 | }
9 | \arguments{
10 | \item{vec}{character vector to apply splitting to}
11 |
12 | \item{delim}{character specifying the delimitor to separate string by}
13 |
14 | \item{part}{integer specifying the part to fetch after splitting}
15 | }
16 | \value{
17 | substring based on splitting criteria
18 | }
19 | \description{
20 | Function to split and fetch string components based on a specific delimiter
21 | }
22 | \examples{
23 | my_string <- c("This_is_random_string.111","Yes_it_is.222")
24 | # Get first part splitting on _
25 | splitAndFetch(vec=my_string,delim="_",part=1)
26 | # Get first two parts splitting on _
27 | splitAndFetch(vec=my_string,delim="_",part=1:2)
28 | # Get second part splitting on .
29 | splitAndFetch(vec=my_string,delim=".",part=2)
30 | }
31 | \author{
32 | Vinay Kartha
33 | }
34 |
--------------------------------------------------------------------------------