Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pixi environments
.pixi
*.egg-info
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# This repository contains the code used for our manuscript:
https://www.biorxiv.org/content/10.1101/2023.08.24.554683
# G1/S Boundary Activates Interferon and Inflammatory Response Genes

## [Manuscript](https://www.biorxiv.org/content/10.1101/2023.08.24.554683)

## Running

### RNA-seq

```sh
pixi run plots
```
3 changes: 2 additions & 1 deletion RNA-seq/01_STAR_align.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /bin/bash
# load STAR
module load star/2.7.3a
# TODO if Ganymede
# module load star/2.7.3a

# Read file names
while IFS=',' read -ra array; do
Expand Down
Empty file modified RNA-seq/02_samtools_filter.sh
100644 → 100755
Empty file.
Empty file modified RNA-seq/03_bam_index.sh
100644 → 100755
Empty file.
35 changes: 2 additions & 33 deletions RNA-seq/04_DEG_analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,50 +14,19 @@ knitr::opts_chunk$set(echo = TRUE)

```{r packages, echo=TRUE,eval=FALSE,cache=FALSE}
# install & load packages
#install.packages("dplyr")
library(dplyr)
#install.packages("DT")
#install.packages("tidyr")
library(tidyr)
#install.packages("ggplot2")
library(ggplot2)
#install.packages("magrittr")
library(magrittr)
#install.packages("devtools")
library(devtools)

#source("https://bioconductor.org/biocLite.R")

# Needed for mac and Linux only
# BiocManager::install("Rsubread")
# Bioconductor
library(Rsubread)

# BiocManager::install("Rsamtools")
library(Rsamtools)
# BiocManager::install("GenomicAlignments")
# BiocManager::install("TxDb.Hsapiens.UCSC.hg38.knownGene")
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
# BiocManager::install("soGGi")
# BiocManager::install("rtracklayer")
# BiocManager::install("ChIPQC")
# BiocManager::install("ChIPseeker")
# BiocManager::install("rGREAT")
# BiocManager::install("limma")
# BiocManager::install("DESeq2")
library(DESeq2)
# BiocManager::install("tracktables")
# BiocManager::install("clusterProfiler")
# BiocManager::install("org.Mm.eg.db")
# BiocManager::install("MotifDb")
# BiocManager::install("Biostrings")
# BiocManager::install("edgeR")
library(edgeR)
# BiocManager::install("BSgenome.Hsapiens.UCSC.hg38")

# Finally we need development version of soGGi (named here 1.10.4)
# not version on Bioconductor (1.10.0)
# devtools::install_github("ThomasCarroll/soGGi")
sessionInfo()
sessionInfo()
```

```{r, echo=TRUE,eval=FALSE,cache=FALSE}
Expand Down
23 changes: 19 additions & 4 deletions RNA-seq/05_plots.R
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
#!/usr/bin/env Rscript

#### Create plots for the paper ####
# packages
library(edgeR)
library(DESeq2)
#BiocManager::install("reshape2")
library(reshape2)
library(ggplot2)
library(dplyr)
library(tidyr)
library(RColorBrewer)
library(Cairo)
#BiocManager::install("ggrepel")
library(ggrepel)
#BiocManager::install("ggrastr")
library(ggrastr)
library(pheatmap)
library("stringr")
library(stringr)
#####################################################
# set the colors for samples
hex_cols <- c("#1b9e77", "#d95f02", "#7570b3", "#e7298a")
#####################################################
# PCA plot
# GM12878
# get the data
# FIXME This hard-coded path will fail
load(file="~/project/Gozde_data/RNA-seq/R_objs/GM_counts_keep.RData")
# create group names for GM samples
Group_GM <- factor(c("GM_DU","GM_DI", "GM_AU", "GM_AI", "GM_DU", "GM_DI", "GM_AU", "GM_AI", "GM_DU", "GM_DI", "GM_AU", "GM_AI"))
colnames(GM_counts_keep) <- Group_GM
# FIXME This hard-coded path will fail
load(file="~/project/Gozde_data/RNA-seq/R_objs/GM_RNA_DDS.RData")

#normalize the reads
Expand All @@ -46,10 +47,12 @@ ggsave(pca_gm, filename= "~/Gozde_data/RNA-seq/files/PCA_GM.pdf", device = cairo

# JURKAT
# get the data
# FIXME This hard-coded path will fail
load("~/project/Gozde_data/RNA-seq/R_objs/JU_counts_keep.RData")
# create group names for JU samples
Group_JU <- factor(c("JU_DU","JU_DI", "JU_AU", "JU_AI", "JU_DU", "JU_DI", "JU_AU", "JU_DI", "JU_AI", "JU_AU", "JU_AI", "JU_DU"))
colnames(JU_counts_keep) <- Group_JU
# FIXME This hard-coded path will fail
load(file="~/project/Gozde_data/RNA-seq/R_objs/JU_RNA_DDS.RData")

#normalize the reads
Expand Down Expand Up @@ -149,6 +152,7 @@ dev.off()

######################################################
rm(list = ls())
# TODO There might be more packages in here
library(dplyr)
library(ggpubr)
library(Seurat)
Expand All @@ -157,9 +161,11 @@ library(destiny)
library(ggrastr)
library(DESeq2)
library(edgeR)
# FIXME This hard-coded path will fail
source("~/onlybiohpc/pr3/OUR_DATA/utility_functions.R")

# Load dataset
# FIXME This hard-coded path will fail
load(file="~/project/Gozde_data/RNA-seq/R_objs/GM_RNA_DDS.RData")

# Normalize the reads
Expand Down Expand Up @@ -208,6 +214,7 @@ dev.off()


# Overlaps - AI-DU and AU-DU
# TODO Add to pixi
library(VennDiagram)

pdf('GM_AIDU_AUDU_OVERLAP.pdf')
Expand Down Expand Up @@ -317,6 +324,7 @@ ggscatter(toplot, x = 'log10FDR', y = 'Description', color = 'red', size = 'Odds
dev.off()

## HEATMAPS ##
# FIXME This hard-coded path will fail
load("~/project/Gozde_data/RNA-seq/R_objs/GM_counts_keep.RData")

GM_counts_norm = log2(cpm(GM_counts_keep) + 1)
Expand Down Expand Up @@ -563,6 +571,7 @@ dev.off()
## GM vs JU

# Load datasets
# FIXME This hard-coded path will fail
load(file="~/project/Gozde_data/RNA-seq/R_objs/JU_counts_keep.RData")
load(file="~/project/Gozde_data/RNA-seq/R_objs/GM_counts_keep.RData")

Expand Down Expand Up @@ -609,6 +618,7 @@ rio::export(DU_GM_JU, file="~/project/Gozde_data/RNA-seq/files/DU_GM_vs_JU.xlsx"
## GM and JU markers in AU vs DU


# FIXME This hard-coded path will fail
load(file="~/project/Gozde_data/RNA-seq/R_objs/GM_RNA_DDS.RData")
load(file="~/project/Gozde_data/RNA-seq/R_objs/JU_RNA_DDS.RData")

Expand All @@ -627,6 +637,7 @@ ju_au_du_up = ju_au_du[ju_au_du$log2FoldChange > 0.6 & ju_au_du$padj < 0.05,] %>
#length(intersect(gm_ju_down, gm_au_du_up)) / length(union(gm_ju_down, gm_au_du_up))


# TODO Add to pixi
library(GeneOverlap)
gm_ju_list = list(gm_ju_up, gm_ju_down)
au_du_list = list(gm_au_du_up, ju_au_du_up)
Expand Down Expand Up @@ -707,6 +718,7 @@ dev.off()


# Overlaps - AI-DU and AU-DU
# TODO Add to pixi
library(VennDiagram)

pdf('JU_AIDU_AUDU_OVERLAP.pdf')
Expand All @@ -730,6 +742,7 @@ draw.pairwise.venn(area1 = length(c(ai_up, ai_down)),
dev.off()

# Overlap with GM
# FIXME This hard-coded path will fail
load(file="~/project/Gozde_data/RNA-seq/R_objs/GM_RNA_DDS.RData")
GM_AU_DU = results(GM_RNA_DDS, c("Group_GM", "GM_AU", "GM_DU"), format = "DataFrame")
GM_AU_DU = GM_AU_DU[!(is.na(GM_AU_DU$padj)),]
Expand All @@ -747,6 +760,7 @@ draw.pairwise.venn(area1 = length(c(au_up, au_down)),
cat.cex = 2, cat.fontface = 'bold', margin = 0.13)
dev.off()

# TODO Add to pixi
library(GeneOverlap)
resgom = newGOM(list(c(au_up, au_down)), list(c(au_up_gm, au_down_gm)), genome.size = nrow(GM_AU_DU))
pvalmat = getMatrix(resgom, name="pval")
Expand Down Expand Up @@ -870,6 +884,7 @@ dev.off()


## HEATMAPS ##
# FIXME This hard-coded path will fail
load("~/project/Gozde_data/RNA-seq/R_objs/JU_counts_keep.RData")

JU_counts_norm = log2(cpm(JU_counts_keep) + 1)
Expand Down
Loading