Skip to content

Commit

Permalink
Correcting a little bug when handling duplicate gene names.
Browse files Browse the repository at this point in the history
  • Loading branch information
jracle85 committed Mar 14, 2019
1 parent f847817 commit bdb3cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/EPIC_fun.R
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ merge_duplicates <- function(mat, warn=TRUE, in_type=NULL){
mat <- mat[!dupl,,drop=F]
# First put the dupl cases in a separate matrix and keep only the unique
# gene names in the mat matrix.
mat[dupl_genes,] <- sapply(dupl_genes, FUN=function(cgene)
apply(mat_dupl[mat_dupl_names == cgene,,drop=F], MARGIN=2, FUN=median))
mat[dupl_genes,] <- t(sapply(dupl_genes, FUN=function(cgene)
apply(mat_dupl[mat_dupl_names == cgene,,drop=F], MARGIN=2, FUN=median)))
}
return(mat)
}

0 comments on commit bdb3cc1

Please sign in to comment.