I'm trying to get a list of cases for which there is DNA methylation and gene expression data available for both normal and cancer tissue samples using the GenomicDataCommons R package (which I am using for the first time).
qCases <- cases() %>%
filter( ~ samples.sample_type == "Solid Tissue Normal" | samples.sample_type == "Blood Derived Normal") %>%
filter(~ files.type == 'gene_expression' & files.type == 'methylation_beta_value')
qCases %>% count()
> [1] 0
this returns no results
Examining the response()
of qCases
when only calling the first filter reveals that there are definitely cases with files that contain both gene expression and methylation beta value files.
qCases <- cases() %>%
filter( ~ samples.sample_type == "Solid Tissue Normal" | samples.sample_type == "Blood Derived Normal") %>%
GenomicDataCommons::select('files.type')
qCases %>% response()
> $results
> files
> 1 copy_number_segment, ----->###gene_expression###<-------, simple_somatic_mutation,
annotated_somatic_mutation, biospecimen_supplement, clinical_supplement, biospecimen_supplement,
biospecimen_supplement, mirna_expression, aligned_reads, clinical_supplement,
aggregated_somatic_mutation, slide_image, simple_somatic_mutation, copy_number_segment,
clinical_supplement, clinical_supplement, biospecimen_supplement, clinical_supplement,
clinical_supplement, clinical_supplement, biospecimen_supplement, copy_number_segment, aligned_reads,
annotated_somatic_mutation, biospecimen_supplement, biospecimen_supplement,
annotated_somatic_mutation, biospecimen_supplement, clinical_supplement,
----->###methylation_beta_value###<-----, masked_somatic_mutation, simple_somatic_mutation,
biospecimen_supplement, slide_image, copy_number_segment, annotated_somatic_mutation,
masked_somatic_mutation, clinical_supplement, aggregated_somatic_mutation,
aggregated_somatic_mutation, aggregated_somatic_mutation, mirna_expression, clinical_supplement,
gene_expression, masked_somatic_mutation, gene_expression, biospecimen_supplement, aligned_reads,
biospecimen_supplement, biospecimen_supplement, aligned_reads, simple_somatic_mutation,
masked_somatic_mutation
My guess is that what is going wrong here is the filter is looking at individual files entries and thus no one file is both type gene_expression and type methylation_beta_value. Is there a way to filter for cases that have files with a given set of types?
I've been looking over the examples in the vignette but there don't seem to be any examples of composite queries like the one I'm trying to do. Any assistance would be appreciated!
You may want to post on Bioconductor Support, where the GenomicDataCommons developer is more active currently.