Commit 6823c587 authored by Christian Arnold's avatar Christian Arnold
Browse files

Updated to latest Bioc submission version

parent e4d20375
Pipeline #30515 passed with stage
in 37 seconds
......@@ -15,4 +15,3 @@ src/*.Rcheck
example/*/output/
*vignettes/*_files
*vignettes/*_cache
*vignettes/output
Package: GRaNIE
Title: GRaNIE: Reconstruction cell type specific gene regulatory networks including enhancers using chromatin accessibility and RNA-seq data
Version: 0.17.0
Version: 0.99.0
Encoding: UTF-8
Authors@R: c(person("Christian", "Arnold", email =
"chrarnold@web.de", role = c("cre","aut")),
......@@ -26,11 +26,10 @@ Imports:
GenomicRanges,
RColorBrewer,
colorspace,
pheatmap,
ComplexHeatmap,
limma,
DESeq2,
csaw,
circlize,
robust,
progress,
utils,
......@@ -51,7 +50,6 @@ Imports:
gridExtra,
limma,
purrr,
tibble,
tidyselect,
readr,
grid,
......@@ -61,7 +59,9 @@ Imports:
grDevices,
graphics,
magrittr,
tibble
tibble,
viridis,
BiocFileCache
Depends:
R (>= 4.1.0),
tidyverse,
......@@ -76,29 +76,19 @@ Suggests:
TxDb.Hsapiens.UCSC.hg38.knownGene,
TxDb.Mmusculus.UCSC.mm10.knownGene,
TxDb.Mmusculus.UCSC.mm9.knownGene,
org.Hs.eg.db,
org.Mm.eg.db,
IHW,
biomaRt,
clusterProfiler,
ReactomePA,
DOSE,
ChIPseeker,
testthat (>= 3.0.0)
testthat (>= 3.0.0),
BiocStyle
VignetteBuilder: knitr
biocViews:
Software,
GeneExpression,
GeneRegulation,
NetworkInference,
GeneSetEnrichment,
BiomedicalInformatics,
Genetics,
Transcriptomics,
ATACSeq,
RNASeq,
Network,
Transcription,
ChIPSeq
License: LGPL (>= 3)
biocViews: Software, GeneExpression, GeneRegulation, NetworkInference, GeneSetEnrichment, BiomedicalInformatics, Genetics, Transcriptomics, ATACSeq, RNASeq, GraphAndNetwork, Regression, Transcription, ChIPSeq
License: Artistic-2.0
LazyData: false
URL: https://grp-zaugg.embl-community.io/GRaNIE
BugReports: https://git.embl.de/grp-zaugg/GRaNIE/issues
......
......@@ -4,7 +4,6 @@ export(AR_classification_wrapper)
export(addConnections_TF_peak)
export(addConnections_peak_gene)
export(addData)
export(addData_TFActivity)
export(addTFBS)
export(add_TF_gene_correlation)
export(build_eGRN_graph)
......@@ -20,8 +19,8 @@ export(getCounts)
export(getGRNConnections)
export(getParameters)
export(getTopNodes)
export(importTFData)
export(initializeGRN)
export(loadExampleObject)
export(nGenes)
export(nPeaks)
export(overlapPeaksAndTFBS)
......@@ -35,22 +34,30 @@ export(plotGeneralGraphStats)
export(plotPCA_all)
export(plotTFEnrichment)
export(plot_stats_connectionSummary)
import(BiocFileCache)
import(BiocManager)
import(GenomicRanges)
import(IRanges)
import(checkmate)
import(ggplot2)
import(grDevices)
import(graphics)
import(grid)
import(magrittr)
import(patchwork)
import(rlang)
import(tibble)
import(tidyverse)
import(topGO)
import(utils)
importFrom(GenomicRanges,mcols)
importFrom(IRanges,width)
importFrom(circlize,colorRamp2)
importFrom(grid,gpar)
importFrom(magrittr,`%>%`)
importFrom(methods,new)
importFrom(rlang,.data)
importFrom(rlang,`:=`)
importFrom(stats,cor)
importFrom(stats,cor.test)
importFrom(stats,median)
importFrom(stats,quantile)
importFrom(stats,sd)
importFrom(utils,packageVersion)
importFrom(utils,tail)
# GRaNIE 0.99 (2022-03-08)
## Major changes
- numerous changes to improve the user experience (replaced pheatmap with ComplexHeatmap, additional function parameters, updates for the documentation and R help, code quality improvements, etc.)
## Bug fixes
- numerous various minor bug fixes
## Minor changes
- numerous minor changes and improvements
# GRaNIE 0.15-0.17 (2021-12-13)
## Major changes
......
This diff is collapsed.
This diff is collapsed.
......@@ -127,8 +127,8 @@
counts.norm %>%
as.data.frame() %>%
tibble::as_tibble() %>%
dplyr::mutate(!!as.name(idColumn) := ids) %>%
dplyr::select(!!as.name(idColumn), tidyselect::everything()) %>%
dplyr::mutate({{idColumn}} := ids) %>%
dplyr::select({{idColumn}}, tidyselect::everything()) %>%
purrr::set_names(c(idColumn, colnames_samples))
}
......@@ -665,7 +665,7 @@
diffDensityMat[rownames(diffDensityMat) == TF, ] <- diff_density
}
diffDensityMat = diffDensityMat[!is.na(diffDensityMat[,1]),]
colnames(diffDensityMat) = signif(h_Motif$mids,1)
colnames(diffDensityMat) = signif(h_Motif$mids,2)
# quantile(diffDensityMat)
## check to what extent the number of TF motifs affects the density values
......@@ -738,19 +738,43 @@
}
labelMain = paste0(as.numeric(thresCur)*100, " / ", (1 - as.numeric(thresCur))*100, " %")
labelMain = "Summary density heatmap (foreground - background)\nfor each TF and classifications across stringencies"
# pheatmap::pheatmap(diffDensityMat_Plot, cluster_rows = FALSE, cluster_cols = FALSE,
# fontsize_row = 1.25, scale = 'row' , fontsize_col = 10, fontsize = 8, labels_col = c(-1, -0.5, 0, 0.5, 1),
# annotation_row = anno_rowDF, annotation_colors = annotation_colors, annotation_legend = FALSE, main = labelMain, legend = TRUE)
labelMain = "Summary density heatmap (foreground - background, sorted)\nfor each TF and classifications across stringencies"
col.list = list()
for (colCur in colnames(anno_rowDF)) {
col.list[[colCur]] = c("repressor" = "#e41a1c", "undetermined" = "Snow3", "activator" = "#4daf4a")
}
anno_rowDF= dplyr::select(anno_rowDF, dplyr::contains("final"))
colnames(anno_rowDF) = gsub(" final", "", colnames(anno_rowDF))
left_annotation = ComplexHeatmap::rowAnnotation(df = anno_rowDF, col = col.list, show_legend = FALSE)
fontsize_row = 2
heatmapCur = ComplexHeatmap::Heatmap(
diffDensityMat_Plot,
name = "Density\n(foreground -\nbackground)",
col = NULL,
cluster_columns = FALSE, cluster_rows = FALSE,
row_names_side = "left", row_names_gp = grid::gpar(fontsize = fontsize_row),
column_title = labelMain,
column_names_gp = grid::gpar(fontsize = 10),
left_annotation = left_annotation,
row_names_max_width = ComplexHeatmap::max_text_width(
rownames(diffDensityMat_Plot),
gp = grid::gpar(fontsize = fontsize_row)
),
row_title = "TF"
)
lgd_list = list(
ComplexHeatmap::Legend(labels = c("activator", "undetermined", "repressor"), title = "Classification\n(shared for all\nstringencies)",
legend_gp = grid::gpar(fill = c("#4daf4a", "Snow3", "#e41a1c")))
)
# Run a modified version here, see function documentation for details
p = .pheatmap_mod(diffDensityMat_Plot, cluster_rows = FALSE, cluster_cols = FALSE,
fontsize_row = 1.25, scale = 'row' , fontsize_col = 10, fontsize = 8, labels_col = c(-1, -0.5, 0, 0.5, 1),
annotation_row = anno_rowDF, annotation_colors = annotation_colors, annotation_legend = FALSE, main = labelMain, legend = TRUE, silent = TRUE)
ComplexHeatmap::draw(heatmapCur, annotation_legend_list = lgd_list, merge_legend = TRUE)
grid::grid.newpage()
grid::grid.draw(p$gtable)
if (!is.null(file)) {
......
......@@ -362,7 +362,7 @@
if (!is.null(seqlengths)) {
idx <- GenomicRanges:::get_out_of_bound_index(gr)
idx <- which(end(gr) > GenomeInfoDb::seqlengths(gr)[as.character(GenomeInfoDb::seqnames(gr))] | start(gr) <= 0)
if (length(idx) != 0L) {
futile.logger::flog.warn(paste0(length(idx), " ranges out of ", length(gr), " are outside of the chromosome boundaries and will be removed. Check the validity of the input data."))
gr = GenomicRanges::trim(gr)
......@@ -703,4 +703,11 @@ match.call.defaults <- function(asList = TRUE, ...) {
#' @import utils
is.installed <- function(mypkg){
is.element(mypkg, installed.packages()[,1])
}
\ No newline at end of file
}
# Taken from https://www.bioconductor.org/packages/release/bioc/vignettes/BiocFileCache/inst/doc/BiocFileCache.html
.get_cache <- function() {
# cache <- tools::R_user_dir(utils::packageName(), which="cache")
cache <- tools::R_user_dir("GRaNIE", which="cache")
BiocFileCache::BiocFileCache(cache, ask = FALSE)
}
This diff is collapsed.
This diff is collapsed.
<img src="man/figures/logo_398x413.png" align="right" />
Gene Regulatory Network Inference including Enhancers: Reconstruction and evaluation of data-driven, cell type specific gene regulatory networks including enhancers using chromatin accessibility and RNAseq data
===================================================================================================================================================================================================================================================================
This project is currently under active development.
### GRaNIE and GRaNPA: Inference and evaluation of enhancer-mediated gene regulatory networks
The companion packages *GRaNIE* (**G**ene **R**egul**a**tory **N**etwork **I**nference including **E**nhancers) and *GRaNPA* (**G**ene **R**egul**a**tory **N**etwork **P**erformace **A**nalysis) are currently under active development. If you have questions, please do not hesitate to contact us (see below). This page describes *GRaNIE*. For *GRaNPA*, please visit [this page](https://grp-zaugg.embl-community.io/GRaNPA).
Repository structure
----------------------
This repository for our *GRaNIE* package (**G**ene **R**egul**a**tory **N**etwork **I**nference including **E**nhancers)
**We are soon submitting our *GRaNIE* and the associated *GRaNIEData* for being included on *Bioconductor*. Once we are accepted and the package is included in the stable release of *Bioconductor*, we will update the installation guidelines in the documentation.**
**If you use our packages, please use the following citation (we will update it once the paper has been officially published):**
GRaNIE and GRaNPA: Inference and evaluation of enhancer-mediated gene regulatory networks applied to study macrophages. Aryan Kamal, Christian Arnold, Annique Claringbould, Rim Moussa, Neha Daga, Daria Nogina, Maksim Kholmatov, Nila
Servaas, Sophia Mueller-Dott, Armando Reyes-Palomares, Giovanni Palla, Olga Sigalova, Daria Bunina, Caroline Pabst, Judith B. Zaugg. bioRxiv 2021.12.18.473290; doi: https://doi.org/10.1101/2021.12.18.473290
The full documentation for the all packages is available at the following stable URL and will soon be extended and completed:
### Summary
**[https://grp-zaugg.embl-community.io/GRaNIE](https://grp-zaugg.embl-community.io/GRaNIE)**
*Towards a data-driven cell-type specific regulatory network including enhancers*
Genetic variants associated with diseases often affect non-coding regions, thus
likely having a regulatory role. To understand the effects of genetic variants
in these regulatory regions, identifying genes that are modulated by specific
regulatory elements (REs) is crucial. The effect of gene regulatory elements,
such as enhancers, is often cell-type specific, likely because the combinations
of transcription factors (TFs) that are regulating a given enhancer have
cell-type-specific activity. This TF activity can be quantified with existing
tools such as *diffTF* and captures differences in binding of a TF in open
chromatin regions. Collectively, this forms an enhancer-mediated gene regulatory
network (*eGRN*) with cell-type and data-specific TF-RE and RE-gene links. Here,
we reconstruct such a *eGRN* using bulk RNAseq and open chromatin (e.g., using
ATACseq or ChIPseq for open chromatin marks) and optionally TF activity data.
Our network contains different types of links, connecting TFs to regulatory
elements, the latter of which is connected to genes in the vicinity or within
the same chromatin domain (TAD). We use a statistical framework to assign
empirical FDRs and weights to all links using a permutation-based approach.
Since no widely accepted ground-truth dataset for assessing the constructed
*eGRN* exists, we propose a novel evaluation algorithm which is not using a
ground-truth network and instead assesses a *eGRN* based on its performance in
predicting differential expression response. For this, we used a random forest
regression model and evaluate how well the *eGRN* links predict differential
expression values based on differential TF activity. Overall, our *eGRNs*
consistently perform significantly better than corresponding randomized
versions, showing that they capture reliable links between TFs and their target
genes. Our framework also allows us to benchmark and compare different *eGRN*
reconstruction algorithms. Finally, we run our *eGRN* construction and
evaluation pipeline on diverse datasets such as naive CD4-positive T cells or an
AML cohort and identified a set of cell-type specific TFs with crucial roles to
predict differential gene expression based on differential TF activity. The
resulting core subnetwork has higher predictive power and enables a deeper
understanding of the underlying regulatory programs
### Get help and contact us
**We are soon submitting our *GRaNIE* and the associated *GRaNIEData* for being included on *Bioconductor*. Once we are accepted and the package is included in the stable release of *Bioconductor*, we will update the installation guidelines in the documentation.**
If you have questions or comments, feel free to contact us. We will be happy to
answer any questions related to this project as well as questions related to the
software implementation. For method-related questions, contact Judith B. Zaugg
(judith.zaugg@embl.de). For technical questions, contact Christian Arnold
(christian.arnold@embl.de).
If you have questions, doubts, ideas or problems, please use the [Gitlab Issue
Tracker](https://git.embl.de/grp-zaugg/GRaNIE/issues). We will respond in a
timely manner.
### Contributions
**If you use our packages, please use the following citation (we will update it once the paper has been officially published):**
- Originally developed by Armando Reyes-Palomares and subsequently modified by
Giovanni Palla
- Christian Arnold then took over and added many improvements and
extensions and converted it to a proper R package with the help of various
people from the Zaugg Lab, particularly Rim Moussa.
\ No newline at end of file
GRaNIE and GRaNPA: Inference and evaluation of enhancer-mediated gene regulatory networks applied to study macrophages. Aryan Kamal, Christian Arnold, Annique Claringbould, Rim Moussa, Neha Daga, Daria Nogina, Maksim Kholmatov, Nila Servaas, Sophia Mueller-Dott, Armando Reyes-Palomares, Giovanni Palla, Olga Sigalova, Daria Bunina, Caroline Pabst, Judith B. Zaugg. bioRxiv 2021.12.18.473290; doi: https://doi.org/10.1101/2021.12.18.473290
\ No newline at end of file
......@@ -49,7 +49,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://grp-zaugg.embl-community.io/GRaNIE/index.html">GRaNIE</a>
<span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="Unreleased version">0.17.0</span>
<span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="Unreleased version">0.99.0</span>
</span>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment