Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Example: User wants to search for female participants with lung cancer who have lung tumortumour specimens with RNA > 5 ug AND DNA > 5 ug . For queries that has child and parent samples, you need to create subqueries. Refer to https://openspecimen.atlassian.net/wiki/x/aoA-FQ for more details. 

The example query file can be imported by downloading this file- Query File

...

  1. Select Queries from Dashboard and Click on '+Create.'

  2. Click on the Participant form and select 'Gender'. Add a filter with Operator 'Equals' and select 'Female' under the Condition Value.

  3. To add condition conditions for the anatomic site, click on Specimen and select 'Anatomic Site'. Add a filter with Operator 'Equals' and select 'Lung' as a value.

  4. To define the type of specimens, click on Specimen and select 'Type'. Add 'Frozen Tissue' under the value.

  5. To define tissue type, which is cancer in this case, click on Specimen and select 'Pathological Status'. Add a filter with Operator 'Equals' and select 'Malignant`under the condition value.

  6. Now it is time to define the sample type which is , RNA, for the first part of this example. Under the Specimen click on You will need to create a subquery with `Type` and select `RNA` as a value having a concentration greater than 5.

    Image RemovedImage Added

  7. To specify Specify the quantity number of required samples, click on Specimen and select `concentration`, select `Greater than`for than for the `Operator` field.

  8. To add DNA, you will need to create another subquery where you select `Type` under the Specimen. Click on `Equals` for the operator and select DNA as value.

  9. Follow the same steps as 6 to specify DNA concentration. Since two different types of samples are derived from same parent sample, user needs to use 'Intersection' operator between the child's conditions. Conditions for each child sample has to be in a separate parenthesis.

    Image Removed

    Image Added

  10. Now, to get the results from both DNA and RNA samples create a query combining query created in steps 6 and 8 with the 'AND' operator. Image Added

  11. Now, use query created in step 10 as sub query in the main query created. Since RNA and DNA samples (child samples) are derived from the original tumor tumour tissue (parent sample), the user needs to use the 'Hierarchical' operator between the parent and the children. Keep all the filters of the children in one set of parenthesis.

    Image RemovedImage Added