Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 3.23 KB

README.md

File metadata and controls

74 lines (54 loc) · 3.23 KB

eureka

Collection of useful bits used to elucidate pesky little mysteries

NGS / scRNA-Seq

Getting ZINB-WaVE and Seurat working

NGS / RNA-Seq

Mapped reads disappear when counting reads (HT-Seq, FeatureCouts)

Batch effects in RNA-Seq

In DESeq2

From Michael Love (DESeq2) - https://support.bioconductor.org/p/76099/

Batch effects are gene-specific, and DESeq2 fits gene-specific coefficients for the batch term. If you want to get an idea how much batch variability contributes to a PCA plot, I've recommended the following approach on the support site before: variance stabilize the counts, apply limma's removeBatchEffect to assay(vsd), then use plotPCA to plot the residuals.

# Make some simulated data with a batch effect:
dds <- makeExampleDESeqDataSet(betaSD=1,interceptMean=10)
dds$batch <- factor(rep(c("A","B"),each=6))

# VST, remove batch effect, then plotPCA:

vsd <- vst(dds)
plotPCA(vsd, "batch")
assay(vsd) <- limma::removeBatchEffect(assay(vsd), vsd$batch)
plotPCA(vsd, "batch")

DASC

DASC is an R package used for identifying batches and classifying samples into different batches in a high dimensional gene expression dataset. The batch information can be further used as a covariate in conjunction with other variables of interest among standard bioinformatics analysis like differential expression analysis. https://github.com/zhanglabNKU/DASC

R

Rtools 3.5 is incompatible with R 3.5 in Windows

Fix posted at https://community.rstudio.com/t/error-dependency-transformr-is-not-available-for-package-gganimate/11134/3

# Set path of Rtools
Sys.setenv(PATH = paste(Sys.getenv("PATH"), "*InstallDirectory*/Rtools/bin/",
                       "*InstallDirectory*/Rtools/mingw_64/bin", sep = ";")) #for 64 bit version
Sys.setenv(BINPREF = "*InstallDirectory*/Rtools/mingw_64/bin")
library(devtools)

#Manually "force" version to be accepted 
assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")
find_rtools() # is TRUE now

# Now you can install transformr then gganimate
devtools::install_github("thomasp85/transformr")
devtools::install_github("dgrtwo/gganimate")

Random links

Windows

Add a new filetype to the right-click context menu

  1. Open registry editor
  2. go to HKEY_CLASSES_ROOT, look for filetype to add to menu
  3. Right click on it, create new KEY, name it ShellNew
  4. Right click new key, select New | String Value, assign it a value of NullFile, then right click it and assign the data to 1