IGV provides functionality that allows a user to create a script to take screenshots of regions of interest.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(singleCellTK) | |
createSCTKE_from_Rsubread_and_multiqc <- function(matdir, r1multi, r2multi){ | |
r1annot <- read.table(r1multi, sep="\t", row.names = 1, header=TRUE) | |
colnames(r1annot) <- paste0(colnames(r1annot), "_R1") | |
rownames(r1annot) <- gsub("_R1$", "", rownames(r1annot)) | |
r2annot <- read.table(r2multi, sep="\t", row.names = 1, header=TRUE) | |
colnames(r2annot) <- paste0(colnames(r2annot), "_R2") | |
rownames(r2annot) <- gsub("_R2$", "", rownames(r2annot)) | |
if(any(rownames(r1annot)!=rownames(r2annot))){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Convert Cell Ranger outs Directory to a SingleCelltkExperiment | |
#' | |
#' This function creates a SingleCelltkExperiment object from a Cell Ranger | |
#' output directory. The filtered count matrix, pca, tsne, and clustering | |
#' results are stored in the object. This function requires the cellrangerRkit | |
#' package which is not on CRAN or Bioconductor. Install it using the directions | |
#' available here: | |
#' | |
#' https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/rkit | |
#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(limma) | |
library(edgeR) | |
# function to return the toptable from limma | |
# indata: raw count matrix for all kras comparisons | |
# subsetcols: column indices for columns that you want to subset | |
# firstannot: the name of the first annotation | |
# secondannot: the name of the second annotation | |
get_toptable <- function(indata, subsetcols, firstannot, secondannot){ | |
subset_gfp_wt <- indata[,subsetcols] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#credit to @myajima | |
library(cellrangerRkit) #install using https://s3-us-west-2.amazonaws.com/10x.files/supp/cell-exp/rkit-install-1.1.0.R | |
pipestance_path <-getwd() | |
download_sample(sample_name="pbmc3k", | |
sample_dir=pipestance_path, | |
host="https://s3-us-west-2.amazonaws.com/10x.files/samples/cell/") | |
gbm <- load_cellranger_matrix(pipestance_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create_complexheatmap <- function(indata){ | |
set.seed(123) | |
sample.annotation <- data.frame(SampleType=sample(c("groupA","groupB"), | |
size = ncol(indata), | |
replace = TRUE)) | |
topha <- HeatmapAnnotation(df = sample.annotation, | |
col = list(SampleType = c("groupA" = "coral3", | |
"groupB" = "aquamarine4")), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
hist_widget <- function() { | |
shinyApp( | |
ui = fluidPage( | |
sidebarLayout( | |
sidebarPanel(sliderInput("n", "Bins", 5, 100, 20)), | |
mainPanel(plotOutput("hist")) | |
) | |
), |
I hereby claim:
- I am dfjenkins3 on github.
- I am dfjenkins3 (https://keybase.io/dfjenkins3) on keybase.
- I have a public key whose fingerprint is 596F 88F4 BA92 A8AE BB47 7D84 8916 F2F3 B5CA 1207
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#run PCA | |
pca.results <- prcomp(t(expression)) | |
#vector of colors | |
cols <- as.character(indata$Annotation) | |
cols[cols=="K"] <- 'red' | |
cols[cols=="LG"] <- 'lightgreen' | |
cols[cols=="G"] <- 'darkgreen' | |
#plot it |
NewerOlder