## 4 Use Case Examples
### Use Case 1: for Kidney Cancers, Find Mutations and Their Number in Each Exon  
For this example, we consider TCGA public somatic mutation data samples of Kidney Adenoma and Adenocarcinoma patients--which are contained in three TCGA projects, i.e., Kidney Chromophobe (KICH), Kidney Renal Clear Cell Carcinoma (KIRK) and Kidney Renal Papillary Cell Carcinoma (KIRP)--and extract novel mutations (i.e., not listed in dbSNP [54]) in gene exons. For each sample, we count the mutations occurring in each exon, filter-out the exons without any mutation, and finally return the remaining mutated exons, equipped with their number and the maximum number of mutations in one exon. In this example: (1) we use GDC mutation data in combination with a GENCODE annotation dataset--demonstrating the interoperability of OpenGDC curated data with other sources; (2) we use seamlessly metadata from GDC APIs (i.e., first and second conditions in line 2 in Listing 1) and Clinical Supplements (third and fourth conditions in line 3 and 4 in Listing 1)--this is not possible on the GDC portal, where only the former are supported; (3) we select three TCGA projects together by using the characterization of the tissue and the classification of diseases (note that the OpenGDC normalized metadata attribute _gdc_disease_type_ represents the type of malignant disease (The disease is categorized by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O). ), while the attribute _gdc_project_disease_type_ contains the full name for the project. The output dataset contains in total 227 samples with 15,517 exon regions and 296 distinct metadata attributes. 2 Use Case 2: in Breast Invasive Carcinoma, Find the Genomic Regions Whose Mirna Expression Counts Result above Average in at Least 10 % of Tumoral Samples  
We translate these specifications into selecting TCGA miRNA expression samples corresponding to patients who are affected by primary tumors of Breast Invasive Carcinoma, and into selecting the miRNA regions that exhibit a value of _reads_per_million_mirna_mapped_ (In the miRNA Expression Quantification data type, it is the read normalized count in reads-per-million-miRNA-mapped associated with each miRNA ID.) above the average of the dataset in 10% or more of such samples. We first use a simple query (lines 3-8 in Listing 2) to evaluate the average of miRNA normalized reads. In order to obtain the lightest query possible in terms of computational time, from the selected TCGA dataset we PROJECT only the required field, MERGE all samples into one, compute the average as a metadata attribute (_avg_reads_) and MATERIALize a small dataset in order to get the required average value (531.6 for the considered data). We then perform a query to filter out miRNA regions that present a _reads_per_million_mirna_mapped_ value equal or below the calculated average of the dataset (lines 11-13 in Listing 2). In addition, we use COVER to extract in one sample only the remaining miRNA regions that are present in at least 10% of the dataset samples and equip each extracted region with: (1) the number of samples in which the region is expressed above average; (2) the list of co-located genes, using specifically the _entrez_gene_id_ region attribute--which is a new attribute added in the OpenGDC data, with respect to the original GDC data. The output dataset contains a sample with 102 miRNA regions (with _reads_per_million_mirna_mapped_ above average) out of the 1881 distinct ones considered in the initial dataset.