Skip to content

Commit

Permalink
Improving hg19 gene expression matching rowranges for SE. Data frame …
Browse files Browse the repository at this point in the history
…is still the original.
  • Loading branch information
tiagochst committed Dec 2, 2016
1 parent e9a2390 commit b9df35f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/TCGAPrepare.R
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,12 @@ makeSEfromGeneExpressionQuantification <- function(df, assay.list, genome="hg19"
if(all(grepl("\\|",df[,1]))){
aux <- strsplit(df$gene_id,"\\|")
GeneID <- unlist(lapply(aux,function(x) x[2]))
df$entrezid <- as.numeric(GeneID)
GeneSymbol <- unlist(lapply(aux,function(x) x[1]))
df$external_gene_id <- as.character(GeneSymbol)
df$entrezgene <- as.numeric(GeneID)
} else {
df$external_gene_id <- as.character(df[,1])
}

df <- merge(df, gene.location, by="external_gene_id")
df <- merge(df, gene.location, by="entrezgene")

if("transcript_id" %in% assay.list){
rowRanges <- GRanges(seqnames = paste0("chr", df$chromosome_name),
Expand Down

0 comments on commit b9df35f

Please sign in to comment.