I want to analyze entire Connectivity Map dataset (~120 drugs, ~560 arrays, two chipsets (HG-U133A and HTHG-U133A)). I am reading the series matrix file available on GEO. As I want the differential expression of group of instances where cell line is same, platform is same, drug and its concentration is same so to build classes to determine which replicate is in which particular condition I have to do something like this:
data <- getGEO('GSE5258')
eset <- data[] # Taking GPL96 array into an expression set
title geo_accession status submission_date last_update_date type channel_count source_name_ch1 organism_ch1 characteristics_ch1 characteristics_ch1.1 characteristics_ch1.2
GSM118720 EC2003090503AA GSM118720 Public on Sep 27 2006 Jul 06 2006 Sep 18 2006 RNA 1 cmap_well:3 Homo sapiens perturbagen: small molecule type: treatment name: metformin
GSM118721 EC2003090502AA GSM118721 Public on Sep 27 2006 Jul 06 2006 Sep 18 2006 RNA 1 cmap_well:2 Homo sapiens perturbagen: small molecule type: control name: null
characteristics_ch1.3 characteristics_ch1.4 characteristics_ch1.5 characteristics_ch1.6 characteristics_ch1.7 molecule_ch1 label_ch1 taxid_ch1 description data_processing platform_id
GSM118720 concentration: .00001 M vehicle: medium vehicle_final: null duration: 6 h cell: MCF7 total RNA biotin 9606 MCF7 treated with metformin (.00001 M) for 6 h MAS 5.0 GPL96
GSM118721 concentration: null vehicle: medium vehicle_final: null duration: 6 h cell: MCF7 total RNA biotin 9606 MCF7 with vehicle (medium) for 6 h MAS 5.0 GPL96
h1=as.numeric(pData(eset)["characteristics_ch1.2"]=="name: metformin") # In a logical operator (h1) put 1 where drug = metformin and 0 otherwise and it works fine.
 1 0 1 1 1 0 0 0 0 1 0 0 ......  0
Now I want to apply multiple conditions: where drug == metformin AND cell line == MCF7
c1=as.numeric(pData(eset)$characteristics_ch1.2=="name: metformin" && characteristics_ch1.7=="cell: MCF7")
Error: object 'characteristics_ch1.7' not found
I am unable to apply multiple conditions here. I am even not sure if the approach I am following will work as well. Kindly share your views about the problem. Thank you.