Hello,
I have a another question please. I am doing this survival analysis and the plan is :
Normalised data
Determine number genes
For every ith gene on the array
Find median of ith gene across samples
Make gene expression 1 or 0 depending on whether or not raw expression value is above or below median (diGene)
gene_survival <- coxph(Surv(survival time, status)~diGene)
My code I have so far :
cel_files <- dir(data_directory, full.names = T, pattern = ".CEL")
print(cel_files)
norm_data <- just.gcrma(cel_files)
exprs(norm_data)-> num
# for loop
for(i in num){
medians <- apply(exprs(norm_data), 1, median)
if(medians > norm_data){
diGene <- 1;
} else {
diGene <- 0;
}
print(diGene);
}
My question is to do with the comparison if(medians > norm_data) I need to compare to the raw expression but there is an error
Error in medians > norm_data :
comparison (6) is possible only for atomic and list types"
Am I wrong in thinking that norm_data is the raw data (UN-normalised) or those raw expression mean before Quality control and probeset filtration done?
Thanks
Thanks so much .........