Hi
I used collapseRows function with MaxMean method to get rid of duplicated genes in my microarray expression profile. My understanding of MaxMean is that it will choose the row with the highest mean absolute value. I wanted to check how exactly it works. To this end, first I chose L1CAM which is repeated three times in my data.
exp_annot[exp_annot$Gene.Symbol=="L1CAM",]
ID Gene.Symbol SC01141A.CEL SC01151A.CEL SC01153A.CEL SC01154A.CEL SC01155A.CEL SC01156A.CEL SC01157A.CEL SC01158A.CEL
32565 ADXEC.30227.C1_at L1CAM 7.50263 3.99462 6.84585 4.08020 7.83157 7.27309 3.69999 3.56850
91789 ADXECNTDJ.8091_at L1CAM 4.68515 4.73158 4.60477 4.33120 5.07858 5.26125 4.81417 4.50915
104594 ADXECRS.7093_s_at L1CAM 6.56999 6.36527 6.77033 6.09783 7.48488 7.04284 6.35463 6.15014
Then I calculate rowMeans for each 3 rows:
ADXEC.30227.C1_at L1CAM rowMeans : 5.599556
ADXECNTDJ.8091_at L1CAM rowMeans: 4.751981
ADXECRS.7093_s_at L1CAM rowMeans: 1.836985
I expected that MaxMean method choose ADXEC.30227.C1_at that have the highest rowMeans, but it selected ADXECRS.7093_s_at .
this is my code to collapse data using collapseRows function with MaxMean method:
rowGroup <- as.vector(exp_annot[exp_annot$Gene.Symbol=="L1CAM",]$Gene.Symbol)
rowID <- as.vector(exp_annot[exp_annot$Gene.Symbol=="L1CAM",]$ID)
datET <- exp_annot[exp_annot$Gene.Symbol=="L1CAM",][,-c(1,2)]
rownames(datET) <- rowID
head(datET)
collapse.maxmean <- collapseRows(datET=datET, rowGroup=rowGroup, rowID=rowID, method = "MaxMean")
L1CAM_maxmean <- data.frame(collapse.maxmean$group2row, collapse.maxmean$datETcollapsed)
and this is the result:
group selectedRowID SC01141A.CEL SC01151A.CEL SC01153A.CEL SC01154A.CEL SC01155A.CEL SC01156A.CEL SC01157A.CEL SC01158A.CEL
L1CAM L1CAM ADXECRS.7093_s_at 6.56999 6.36527 6.77033 6.09783 7.48488 7.04284 6.35463 6.15014
Sorry, if it became too long. I really appreciate any help!
maxmean
collapserows
wgcna