Skip to content

Commit

Permalink
image changes
Browse files Browse the repository at this point in the history
  • Loading branch information
saral98 committed Apr 17, 2023
1 parent 823ecaf commit 8dcfbe3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
Binary file added Images/Figure1-export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions R/computeCellTypeFeatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,20 @@ computeCellTypeFeatures <- function(metaData,
list_enh <- as.data.frame(unique(featuresGeneric$enhancer_id))
colnames(list_enh) <- c("enhancer_id")


print(head(regions_enhancer))
cat("Getting the CRUP-EP scores for enhancer, promoter and the regulatory
distance")

#Crup enhancer scores for enhancer
crup_EP_enh <- compute_crup_enhancer(regions_enhancer,
list_enh,
crupScores)

crup_features <- merge(featuresGeneric,
crup_EP_enh,
by.x = "enhancer_id",
by.y = "cres_name",
all.x = TRUE)
print(head(crup_features))
#CRUP enhancer scores for promoter
crup_EP_prom <- compute_crup_promoter(regions_prom,
list_prom,
Expand All @@ -142,9 +142,10 @@ computeCellTypeFeatures <- function(metaData,
by.x = "gene_id2",
by.y = "gene_name",
all.x = TRUE)
print(head(crup_features))
##crup enhancer scores for distance
crup_features <- compute_crup_reg_distance_enh(crup_features, crupScores)

print(head(crup_features))

##Get CRUP promoter probabilities

Expand Down
2 changes: 1 addition & 1 deletion R/createPairs.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ createPairs <- function(gene) {
RSQLite::dbDisconnect(conn)
gene$startTts <- integer(nrow(gene))
gene$endTts <- integer(nrow(gene))
for (i in seq_along(nrow(gene)))
for (i in seq_len(nrow(gene)))
{
##extend 500 kb to the left of tts
if (gene$transcription_start[i] <= 500000) {
Expand Down
14 changes: 7 additions & 7 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,23 @@ compute_crup_reg_distance_enh <- function(input, prediction) {
bins <- as.data.frame(table(cres_EP$between))

cres_EP1 <- cres_EP[cres_EP$EP_reg_distance > 0.5, ]

print(cres_EP1)
if (nrow(cres_EP1) == 0) {

bins_pos <- as.data.frame(matrix(c(c(seq(1:nrow(input)),
bins_pos <- as.data.frame(matrix(c(seq(1:nrow(input)),
rep(0, times = nrow(input))),
nrow = nrow(input),
ncol = 2)))
ncol = 2))
colnames(bins_pos) <- c("Var1", "Freq")
} else {
bins_pos <- as.data.frame(table(cres_EP1$between))
}

print(head(bins_pos))

all_bins <- merge(bins, bins_pos, by.x = "Var1", by.y = "Var1", all.x = TRUE)
all_bins[is.na(all_bins)] <- 0
colnames(all_bins) <- c("pair", "bins", "bins_pos")

print(head(all_bins))

input$reg_dist_enh <- all_bins$bins_pos
input$norm_reg_dist_enh <- all_bins$bins_pos / all_bins$bins
Expand Down Expand Up @@ -305,10 +305,10 @@ compute_crup_reg_distance_prom <- function(input, prediction) {

if (nrow(cres_EP1) == 0) {

bins_pos <- as.data.frame(matrix(c(c(seq(1:nrow(input)),
bins_pos <- as.data.frame(matrix(c(seq(1:nrow(input)),
rep(0, times = nrow(input))),
nrow = nrow(input),
ncol = 2)))
ncol = 2))
colnames(bins_pos) <- c("Var1", "Freq")
} else {
bins_pos <- as.data.frame(table(cres_EP1$between))
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ChIP-seq data for three histone modifications for the cell type of interest.
CENTRE uses various available datasets and extracts cell-type agnostic
statistics to complement the cell-type specific information.

![title](Images/Figure1-export.tiff)
![title](Images/Figure1-export.png)

### Contact

Expand Down Expand Up @@ -69,7 +69,8 @@ Note: If the installation of any of the dependencies of CENTRE fails
try running the script CENTRE/install/install_CENTRE.R

## References
Andersson,R. et al. (2014) An atlas of active enhancers across human cell types and tissues. Nature, 507, 455–461.
Thurman,R.E. et al. (2012) The accessible chromatin landscape of the human genome. Nature, 489, 75–82.
Sheffield,N.C. et al. (2013) Patterns of regulatory activity across diverse human cell types predict tissue identity, transcription factor binding, and long-range interactions. Genome Res., 23, 777–788.

- Andersson,R. et al. (2014) An atlas of active enhancers across human cell types and tissues. Nature, 507, 455–461.
- Thurman,R.E. et al. (2012) The accessible chromatin landscape of the human genome. Nature, 489, 75–82.
- Sheffield,N.C. et al. (2013) Patterns of regulatory activity across diverse human cell types predict tissue identity, transcription factor binding, and long-range interactions. Genome Res., 23, 777–788.

5 changes: 3 additions & 2 deletions vignettes/CENTRE_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ output:
rmarkdown::html_document
abstract:
vignette: |
%\VignetteIndexEntry{crupR-vignette}
%\VignetteIndexEntry{Centre-vignette}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
Expand Down Expand Up @@ -51,7 +51,8 @@ and Annotation.db. To do this run the following:
CENTRE::downloadPrecomputedData(method = "curl")
# Make sure whatever method you use to download is available on your system
```

Or download the data from http://owww.molgen.mpg.de/~CENTRE_data/PrecomputedData.db
and http://owww.molgen.mpg.de/~CENTRE_data/Annotation.db add it to the /inst/extdata folder.

# Run the *CENTRE* pipeline

Expand Down

0 comments on commit 8dcfbe3

Please sign in to comment.