Skip to content

Commit

Permalink
Minor documentation updates
Browse files Browse the repository at this point in the history
- Bioconductor 3.9
- New function: add_cellAnnotation for looms
  • Loading branch information
s-aibar committed May 31, 2019
1 parent 3d6f53a commit 0a4c96e
Show file tree
Hide file tree
Showing 17 changed files with 414 additions and 701 deletions.
12 changes: 11 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@
^\.Rproj\.user$
.gitignore
.Rhistory
.Rbuildignore
.DS_Store
.DS_Store?
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
packrat/lib*/
packrat/src/
z_*
vignettes/SCENIC_MouseBrain
vignettes/pySCENIC_tutorial
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SCENIC.Rproj
.gitignore
.Rproj.user
.Rhistory
.Rbuildignore
.Rprofile
.RData
.Ruserdata
Expand All @@ -15,4 +15,6 @@ Thumbs.db
packrat/lib*/
packrat/src/
z_*
vignettes/SCENIC_MouseBrain/
vignettes/SCENIC_MouseBrain
vignettes/pySCENIC_tutorial
SCENIC.Rproj
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: SCENIC
Type: Package
Title: SCENIC (Single Cell rEgulatory Network Inference and Clustering)
Version: 1.1.1-10
Date: 2019-04-22
Version: 1.1.2-01
Date: 2019-05-31
Author: Sara Aibar, Carmen Bravo, Stein Aerts.
Laboratory of Computational Biology, KU Leuven Center for Human Genetics.
Leuven, Belgium.
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ exportMethods(getSettings)
exportMethods(loadFile)
exportMethods(loadInt)
import(AUCell)
import(SingleCellExperiment)
import(data.table)
importFrom(R.utils,capitalize)
41 changes: 41 additions & 0 deletions R/add_cellAnnotation.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

#' @import SingleCellExperiment
#' @import SingleCellExperiment
load_as_sce <- function(loomPath)
{
loom <- open_loom(loomPath, mode="r")
dgem <- get_dgem(loom)
cellAnnot <- get_cellAnnotation(loom)
embeddings <- get_embeddings(loom)
close_loom(loom)

sce <- SingleCellExperiment::SingleCellExperiment(assays=list(counts=dgem),
colData=data.frame(cellAnnot[colnames(dgem),, drop=FALSE]),
reducedDims=S4Vectors::SimpleList(embeddings))

return(sce)
}


add_cellAnnotation <- function(loom, cellAnnotation)
{
cellAnnotation <- data.frame(cellAnnotation)
if(any(c("nGene", "nUMI") %in% colnames(cellAnnotation)))
{
warning("Columns 'nGene' and 'nUMI' will not be added as annotations to the loom file.")
cellAnnotation <- cellAnnotation[,colnames(cellAnnotation) != "nGene", drop=FALSE]
cellAnnotation <- cellAnnotation[,colnames(cellAnnotation) != "nUMI", drop=FALSE]
}

if(ncol(cellAnnotation)<=0) stop("The cell annotation contains no columns")
if(!all(get_cell_ids(loom) %in% rownames(cellAnnotation))) stop("Cell IDs are missing in the annotation")

cellAnnotation <- cellAnnotation[get_cell_ids(loom),,drop=FALSE]
# Add annotation
for(cn in colnames(cellAnnotation))
{
add_col_attr(loom=loom, key=cn, value=cellAnnotation[,cn])
}

invisible(loom)
}
6 changes: 6 additions & 0 deletions R/aux_export2scope.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ export2scope <- function(scenicOptions, dgem, hierarchy=c("SCENIC", "", ""), add
motifEnrichment <- loadInt(scenicOptions, "motifEnrichment_selfMotifs_wGenes")
motifEnrichment <- motifEnrichment[grep("transfac_pro__", motifEnrichment[["motif"]], invert = T),] #TODO
regulonThresholds <- loadInt(scenicOptions, "aucell_thresholds")
if(!"aucThr" %in% names(regulonThresholds[[1]]))
{
# regulonThresholds <- lapply(regulonThresholds, function(x) list(selected=x))
warning("The binarized regulon activity will not been added to the loom.")
regulonThresholds <- NULL
}
add_scenic_regulons(loom=loom
, regulons=regulons
, regulon.threshold.assignments=regulonThresholds # Optional
Expand Down
176 changes: 60 additions & 116 deletions inst/doc/SCENIC_Running.html

Large diffs are not rendered by default.

230 changes: 113 additions & 117 deletions inst/doc/SCENIC_Setup.html

Large diffs are not rendered by default.

70 changes: 4 additions & 66 deletions inst/doc/detailedStep_0_geneFilter.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@



<meta name="date" content="2019-05-31" />

<title>Code of geneFiltering()</title>

Expand Down Expand Up @@ -93,81 +94,17 @@
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>



<div class="container-fluid main-container">

<!-- tabsets -->

<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs > li.active {
display: block;
}

.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}

.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>

<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});

$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>

<!-- code folding -->
Expand All @@ -176,15 +113,16 @@




<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Code of geneFiltering()</h1>
<h3 class="subtitle"><em>Workflow run by geneFiltering()</em></h3>
<h4 class="date"><em>7 February 2019</em></h4>
<h4 class="date"><em>31 May 2019</em></h4>
<h4 class="package">Package</h4>
<p>SCENIC 1.1.1.9</p>
<p>SCENIC 1.1.2.1</p>

</div>

Expand Down
70 changes: 4 additions & 66 deletions inst/doc/detailedStep_1_coexNetwork2modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@



<meta name="date" content="2019-05-31" />

<title>Code of runSCENIC_1_coexNetwork2modules()</title>

Expand Down Expand Up @@ -93,81 +94,17 @@
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>



<div class="container-fluid main-container">

<!-- tabsets -->

<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs > li.active {
display: block;
}

.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}

.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>

<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});

$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>

<!-- code folding -->
Expand All @@ -176,15 +113,16 @@




<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Code of runSCENIC_1_coexNetwork2modules()</h1>
<h3 class="subtitle"><em>Workflow run by runSCENIC_1_coexNetwork2modules()</em></h3>
<h4 class="date"><em>7 February 2019</em></h4>
<h4 class="date"><em>31 May 2019</em></h4>
<h4 class="package">Package</h4>
<p>SCENIC 1.1.1.9</p>
<p>SCENIC 1.1.2.1</p>

</div>

Expand Down
Loading

0 comments on commit 0a4c96e

Please sign in to comment.