Dissertation!

I learned how to use R Markdown and Latex together to format my final dissertation! Repo can be found here: https://github.com/yaaminiv/dissertation

Things that were annoying to figure out: table formatting, figure formatting, making things horizontal vs. vertical.

R package: usethis

install.packages(“usethis”) #Install packages
usethis::use_course(“hglanz/rworkshop_Jan2021”) #Download materials from GitHub repo (https://github.com/hglanz/rworkshop_Jan2021) to machine

CG/CV transcriptomics

Helping Colleen with a comparative transcriptomics project for OSHV-infected and uninfected Pacific and eastern oysters to build skills and pipelines I’ll need for my RNASeq analysis later.

Revised WGCNA with GO-MWU analysis

https://github.com/eimd-2019/project-EWD-transcriptomics/blob/master/analyses/WGCNA/WGCNA.md

WGCNA code

https://github.com/eimd-2019/project-EWD-transcriptomics/blob/master/analyses/WGCNA/WGCNA.Rmd

Stacked barplot with different colors for each bar

https://stackoverflow.com/questions/22781685/different-colors-for-each-bar-in-stacked-bar-graph-base-graphics

CHiP-Seq and ATAC-Seq

https://bioinformatics-core-shared-training.github.io/cruk-autumn-school-2017/ChIP/Materials/Lectures/Lecture4_Introduction%20to%20ChIP-seq%20and%20ATAC-seq_SS.pdf

Creating plots mirrored along the y-axis

Good code example: https://www.r-bloggers.com/making-back-to-back-histograms/

Adding lines to barplots + 2 y-axes

Explanation as to why base plot should be saved as a separate object and referenced in subsequent plots: https://www.r-bloggers.com/adding-lines-or-points-to-an-existing-barplot/

Good code example: https://stackoverflow.com/questions/15277712/adding-lines-to-barplot-in-a-different-y-axis-in-r

Importing multiple files to R

Modified from this link.

coverageFiles <- list.files(pattern = "*bedgraph") #Create a file list for all 10 files to import
list2env(lapply(setNames(coverageFiles,
make.names(gsub("s1_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov_", "", coverageFiles))), read.table),
envir = .GlobalEnv) #Import files with list2env. Use lapply to setNames of the files by taking all the common parts of their names out. Files will be named zr2096_#_5x.bedgraph