Displaying 2 results from an estimated 2 matches for "listmetric".
Did you mean:
costmetric
2010 Dec 18
0
[BioC] problem with function
...[,4], Probe)] ) )
??? #multiply fc by context score for each interaction???
? ? metric <- fcVector * as.numeric(deMirPresGenes[,11])
? ? geneMetric <- cbind(deMirPresGenes[,2], metric)
? ? colnames(geneMetric) <- c('sym', 'metric')
? ?
? ? #make cumul by aggregate
? ? listMetric <- aggregate(as.numeric(geneMetric[,2]), list(geneMetric[,1]), sum)#returns a dataframe
??? colnames(listMetric) <- c('symbol','cumulMetric')
? ?
??? #return whole list
??? return(listMetric)# dataframe
}
Cheers
i
--- On Sat, 18/12/10, cstrato <cstrato at aon.at> wro...
2010 Dec 17
1
help with function
...? ? fcVector <- as.numeric(with (fc, FC[match(deMirPresGenes[,4], Probe)] ) )
? ? #multiply fc by context score for each interaction
? ? metric <- fcVector * as.numeric(deMirPresGenes[,11])
? ? geneMetric <- cbind(deMirPresGenes[,2], as.numeric(metric))
? ? #make cumul weighted score
? ? listMetric <- unstack(geneMetric, as.numeric(geneMetric[,2])~geneMetric[,1])
? ? listMetric <- as.data.frame(sapply(listMetric,sum)) #returns a dataframe
? ? colnames(listMetric) <- c('cumulMetric')
? ? #return whole list
? ? return(listMetric)
}
deMirPresGenes looks like this:
Gene.ID? ?...