Bioconductor / GenomicDataCommons

Provide R access to the NCI Genomic Data Commons portal.
http://bioconductor.github.io/GenomicDataCommons/
83 stars 23 forks source link

Strange results on merging clinical id #71

Closed bioinfo-dirty-jobs closed 5 years ago

bioinfo-dirty-jobs commented 5 years ago

Dear All, I try to retrieve some information using Genomic Data common package. why I obtain 16 row but i I have id case_id e case_id.case_id

pt<-c("44f52c83-3eb1-4f91-a885-599fb960049c.FPKM-UQ.txt.gz","f125d4a1-cb15-4729-9318-433c39c685d7.FPKM-UQ.txt.gz","7d229eb4-cdbd-4578-9e54-c7cbd7ef1378.FPKM-UQ.txt.gz","63a39ca4-6ea7-468e-b726-b3b8ce17d7b1.FPKM-UQ.txt.gz")
pt2<-c("e21fa645-230b-433b-bd54-ad4182971285", "4a56a3ce-48c7-4640-98b6-964b5a905396","d22adc62-0a38-43d7-bf55-649820ffea97", "e9ea3259-a07c-4474-8261-2fb1d8ad5951")
List_files<-filenameToBarcode(pt)

mitico=UUIDtoUUID(pt2, to_type =c("case_id"))
GBM<-gdc_clinical(mitico$cases.case_id)

full_clin = with(GBM,
                 main %>%
                   dplyr::left_join(demographic, by = "case_id") %>%
                   dplyr:: left_join(exposures, by = "case_id") %>%
                   dplyr::left_join(diagnoses, by = "case_id"))

aa=merge(mitico,List_files,bx.x= "file_id",bx.y = "file_id" )
tt=merge(aa,full_clin,bx="cases.case_id",bx.y="case_id") 
LiNk-NY commented 5 years ago

Hi @bioinfo-dirty-jobs,

Please use the right arguments:

tt=merge(aa,full_clin,by.x="cases.case_id",by.y="case_id") 
dim(tt)
## [1]  4 55

Please use the reprex package to make sure you are providing an reproducible example. Otherwise, it will be difficult to help you.

Best, Marcel

bioinfo-dirty-jobs commented 5 years ago

@LiNk-NY thanks so much!! Sorry for my mistake!