[R] matching genes to a list of gene groups an built binary data frame
Karim Mezhoud
kmezhoud at gmail.com
Mon Oct 20 15:28:30 CEST 2014
Dear All,
I have a gene list
Genes <- c("ACACA", "BAX" , "BCL2", "BID", "BAX", "MAPK9")
and a list of group of genes
ListGroup <- list(group1=c("ACACA" ,"AHSA1" ,"AIMP2" , "AKR1B1",
"AKT1", "AKT1S1"), group2=c("ANXA1" , "AR" , "ARID1A" ,
"ATM" , "BAK1" , "BAX" ), group3=c("BCL2" , "BCL2L1" ,
"BCL2L11" , "BECN1" , "BID" , "BIRC2"))
ListGroup
$group1
[1] "ACACA" "AHSA1" "AIMP2" "AKR1B1" "AKT1" "AKT1S1"
$group2
[1] "ANXA1" "AR" "ARID1A" "ATM" "BAK1" "BAX"
$group3
[1] "BCL2" "BCL2L1" "BCL2L11" "BECN1" "BID" "BIRC2"
I would like to built a data frame as:
ACACA BAX BCL2 BID BAX MAPK9
group1 1 0 0 0 0 0
group2 0 1 0 0 1 0
group3 0 0 1 1 0 0
Many thanks,
Karim
[[alternative HTML version deleted]]
More information about the R-help
mailing list