I have extracted microarray gene expression data from GEO using the
GEOquery package in R. There are multiple probes per gene. Is there a way to select the best probe? If so, what would be the criteria and how can you do this? Maybe use Jetset probes (=best quality probes) for this?
Otherwise, would you use the average expression value of all probes for each gene? If so, how can you do this in R, please?
Edit after comment below: I like the suggestion proposed here: https://support.bioconductor.org/p/70133/, using this code:
Probesets=paste("a",1:200,sep="") # "fake probesets" Genes=sample(letters,200,replace=T) Value=rnorm(200) X=data.frame(Probesets,Genes,Value) # I edited this line, as it seemed to contain an error X=X[order(X$Value,decreasing=T),] Y=X[which(!duplicated(X$Genes)),]
But, I do not understand it. How is the value for each gene in Y calculated? It was commented that this is the MAD, but calculating the Median Absolute Deviation (MAD) by hand results in a different value. Could anyone help, please? Thank you.
duplicated()being used with
!and only after sorting
Xin decreasing order. Basically, you sort your "values" from higher to lower and
duplicated()gives you FALSE if that particular "value" was never observed in the "array of interest". When you negate this with
!, you only keep the first occurence of a particular value and this first occurence would be the highest as it was sorted already in the previous step. $\endgroup$