Created
December 19, 2018 20:14
-
-
Save lwaldron/9d77ce85030b9d1ec24474c1b2c0a99b to your computer and use it in GitHub Desktop.
GMQL use case (from Masseroli et al 2018, Bioinformatics bty688)
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
# Masseroli et al 2018, https://doi.org/10.1093/bioinformatics/bty688 | |
# "In TCGA data of BRCA patients, find the DNA somatic mutations | |
# within the first 2000 bp outside of the genes that are both | |
# expressed with FPKM > 3 and have at least a methylation in the same patient | |
# biospecimen, and extract these mutations of the top 5% patients | |
# with the highest number of such mutations." | |
library(curatedTCGAData) | |
system.time(mae <- curatedTCGAData("ACC", c("Mutation", "RNASeq2GeneNorm", "Methylation"), dry.run = FALSE)) | |
library(TCGAutils) | |
system.time(mae <- symbolsToRanges(mae)) | |
rangedMethylation <- function(SE){ | |
SEranged <- SE[!is.na(rowData(SE)$Chromosome), ] | |
rd <- rowData(SEranged) | |
rowRanges(SEranged) <- GRanges(rd$Chromosome, rd$Genomic_Coordinate) | |
genome(SEranged) | |
return(SEranged) | |
} | |
system.time(mae[[1]] <- rangedMethylation(mae[[1]])) | |
system.time(mae <- intersectColumns(mae)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Levi, @lwaldron
I've added the
rowRanges<-
replace method for this function to work in Bioc-devel.-MR