Skip to content

Commit

Permalink
changes to module 3, part 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Isabel Risch committed Jun 13, 2024
1 parent e913332 commit 05a7828
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
9 changes: 5 additions & 4 deletions _posts/0003-04-03-DE_Visualization_AdvancedR.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,24 @@ library(ggrepel)
#Set working directory where results files exist
datadir = "~/workspace/rnaseq/de/ballgown/ref_only"
# datadir = "/cloud/project/data/bulk_rna"
# outdir = "/cloud/project/outdir"
outdir = "~/workspace/rnaseq/de/manual_viz"
if (!dir.exists(outdir)) dir.create(outdir)

setwd(datadir)

# List the current contents of this directory
dir()

#Import expression results (TPM values) from the HISAT2/Stringtie pipeline (http://genomedata.org/rnaseq-tutorial/results/cshl2022/rnaseq/gene_tpm_all_samples.tsv)
gene_expression=read.table("gene_tpm_all_samples.tsv", header=TRUE, stringsAsFactors=FALSE, row.names=1)
gene_expression=read.table("~/workspace/rnaseq/expression/stringtie/ref_only/gene_tpm_all_samples.tsv", header=TRUE, stringsAsFactors=FALSE, row.names=1)

#Import gene name mapping file (http://genomedata.org/rnaseq-tutorial/results/cshl2022/rnaseq/ENSG_ID2Name.txt)
gene_names=read.table("ENSG_ID2Name.txt", header=TRUE, stringsAsFactors=FALSE)
gene_names=read.table("~/workspace/rnaseq/de/htseq_counts/ENSG_ID2Name.txt", header=TRUE, stringsAsFactors=FALSE)
colnames(gene_names)=c("gene_id","gene_name")

#Import DE results from the HISAT2/htseq-count/DESeq2 pipeline (http://genomedata.org/cri-workshop/deseq2/DE_all_genes_DESeq2.tsv)
setwd(outdir)
results_genes <-read.table("DE_all_genes_DESeq2.tsv", sep="\t", header=T, stringsAsFactors = F)
results_genes <-read.table("~/workspace/rnaseq/de/deseq2/DE_all_genes_DESeq2.tsv", sep="\t", header=T, stringsAsFactors = F)

```

Expand Down
4 changes: 2 additions & 2 deletions _posts/0003-05-01-DE_Pathway_Analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Before we perform the pathway analysis we need to read in our differential expre
```R

#Define working dir paths
datadir = "/cloud/project/outdir"
#datadir = "~/workspace/rnaseq/de/htseq_counts/"
# datadir = "/cloud/project/outdir"
datadir = "~/workspace/rnaseq/de/deseq2/"

setwd(datadir)

Expand Down
11 changes: 8 additions & 3 deletions _posts/0003-06-02-Batch-Correction.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@ Perform the following analyses in `R`:
```R

#Define working dir paths
datadir = "/cloud/project/data/bulk_rna"
#datadir = "~/workspace/rnaseq/batch_correction"
# datadir = "/cloud/project/data/bulk_rna"
# outdir = "/cloud/project/outdir"

datadir = "~/workspace/rnaseq/batch_correction"
outdir = "~/workspace/rnaseq/batch_correction/outputs"

if (!dir.exists(outdir)) dir.create(outdir)


outdir = "/cloud/project/outdir"

#load neccessary libraries
library("sva") #Note this exercise requires sva (>= v3.36.0) which is only available for R (>= v4.x)
Expand Down

0 comments on commit 05a7828

Please sign in to comment.