This file contains hidden or 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(MultiAssayExperiment) | |
| load('nci60dat.rda') | |
| rnadat <- Biobase::ExpressionSet(assayData=rna.arraydat) | |
| proteinMSdat <- Biobase::ExpressionSet(assayData=protein.ms.arraydat) | |
| deepProteinMSdat <- Biobase::ExpressionSet(assayData=deep.protein.ms.arraydat) | |
| kinaseProteinMSdat <- Biobase::ExpressionSet(assayData=kinase.protein.ms.arraydat) | |
| ExpList <- list( |
This file contains hidden or 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(Biobase) | |
| library(MultiAssayExperiment) | |
| patient.data <- data.frame(sex=c("M", "F", "M", "F"), | |
| age=38:41, | |
| row.names=c("Jack", "Jill", "Bob", "Barbara")) | |
| arraydat <- matrix(seq(101, 108), ncol=4, | |
| dimnames=list(c("ENST00000294241", "ENST00000355076"), | |
| c("array1", "array2", "array3", "array4"))) | |
| arraypdat <- as(data.frame(slope53=rnorm(4), | |
| row.names=c("array1", "array2", "array3", |
This file contains hidden or 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(curatedMetagenomicData) | |
| newicklabs <- getMetaphlanTree(simplify=FALSE)$tip.label | |
| delims <- paste0("\\|", c("p", "c", "o", "f", "g", "s"), "__.+") | |
| res <- lapply(delims, function(x) sub(x, "", newicklabs)) | |
| res <- unique(unlist(res)) | |
| res <- c(res, grep("s__", newicklabs, val=TRUE)) | |
| res <- sort(res) | |
| res <- grep("GCF", res, invert=TRUE, val=TRUE) | |
| res <- grep("noname$", res, invert = TRUE, value = TRUE) | |
| write.table(res, file="~/Downloads/metaphlantaxa.tsv", row.names=FALSE, col.names = FALSE) |
This file contains hidden or 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(PharmacoGx) | |
| fimm <- downloadPSet("FIMM") | |
| slotNames(fimm) | |
| names(fimm@sensitivity) | |
| head(fimm@sensitivity$info) | |
| head(fimm@sensitivity$profiles) | |
| fimm@sensitivity$n[1:5, 1:5] | |
| class(fimm@sensitivity$raw) |
This file contains hidden or 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(SummarizedExperiment) | |
| library(MultiAssayExperiment) | |
| example("MultiAssayExperiment", echo=FALSE) | |
| myMultiAssayExperiment[[1]] <- SummarizedExperiment(assays=exprs(myMultiAssayExperiment[[1]]), colData=pData(myMultiAssayExperiment[[1]])) | |
| myMultiAssayExperiment[[2]] <- SummarizedExperiment(myMultiAssayExperiment[[2]], colData=DataFrame(slope53=1:5)) | |
| myMultiAssayExperiment[[3]] <- SummarizedExperiment(myMultiAssayExperiment[[3]]) | |
| colData(myMultiAssayExperiment) | |
| colData(myMultiAssayExperiment[[1]]) | |
| colData(myMultiAssayExperiment[[2]]) |
This file contains hidden or 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
| mypkgs <- rownames(installed.packages()) | |
| if (!require("BiocInstaller")) { | |
| source("http://www.bioconductor.org/biocLite.R") | |
| biocLite(ask = FALSE) | |
| } | |
| if (!require("devtools")) | |
| biocLite("devtools", ask = FALSE) |
This file contains hidden or 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
| urls <- c("https://s3.amazonaws.com/rubioinformatics/ATAC_Workshop/ATAC_Data/ATAC_BAM/Sorted_ATAC_50K_2.bam", | |
| "https://s3.amazonaws.com/rubioinformatics/ATAC_Workshop/ATAC_Data/ATAC_BAM/Sorted_ATAC_50K_2.bam.bai", | |
| "https://s3.amazonaws.com/rubioinformatics/ATAC_Workshop_Essential.zip") | |
| for (url in urls) | |
| download.file(url, destfile = basename(url)) |
This file contains hidden or 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
| url1 <- "https://support.illumina.com/content/dam/illumina-support/documents/documentation/chemistry_documentation/samplepreps_nextera/nexterarapidcapture/nexterarapidcapture_exome_targetedregions.bed" | |
| url2 <- "https://support.illumina.com/content/dam/illumina-support/documents/documentation/chemistry_documentation/samplepreps_nextera/nexterarapidcapture/nexterarapidcapture_expandedexome_targetedregions.bed" | |
| library(rtracklayer) | |
| rapidgr <- import(url1, genome="hg19") | |
| expandedgr <- import(url2, genome="hg19") | |
| library(GenomicRanges) | |
| table(countOverlaps(rapidgr, expandedgr)) |
This file contains hidden or 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
| ## A big SE | |
| library(curatedMetagenomicData) | |
| library(SummarizedExperiment) | |
| library(tidyr) | |
| library(ape) | |
| simplifynodes <- TRUE | |
| makeTaxTable <- function(fullnames){ |
This file contains hidden or 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(curatedMetagenomicData) | |
| library(SummarizedExperiment) | |
| library(tidyr) | |
| library(ape) | |
| simplifynodes <- TRUE | |
| makeTaxTable <- function(fullnames){ | |
| taxonomic.ranks <- c("Kingdom", "Phylum", "Class", "Order", | |
| "Family", "Genus", "Species", "Strain") |
OlderNewer