diff --git a/_posts/0003-04-03-DE_Visualization_AdvancedR.md b/_posts/0003-04-03-DE_Visualization_AdvancedR.md index d1b688f..1d895b5 100644 --- a/_posts/0003-04-03-DE_Visualization_AdvancedR.md +++ b/_posts/0003-04-03-DE_Visualization_AdvancedR.md @@ -49,7 +49,8 @@ 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) @@ -57,15 +58,15 @@ setwd(datadir) 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) ``` diff --git a/_posts/0003-05-01-DE_Pathway_Analysis.md b/_posts/0003-05-01-DE_Pathway_Analysis.md index e553d83..6427555 100644 --- a/_posts/0003-05-01-DE_Pathway_Analysis.md +++ b/_posts/0003-05-01-DE_Pathway_Analysis.md @@ -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) diff --git a/_posts/0003-06-02-Batch-Correction.md b/_posts/0003-06-02-Batch-Correction.md index 3871cfb..c52c25a 100644 --- a/_posts/0003-06-02-Batch-Correction.md +++ b/_posts/0003-06-02-Batch-Correction.md @@ -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)