Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Using DocumentReferences, gather sample, assay, participant, and study information. #11

Open
RobertJCarroll opened this issue Jun 27, 2022 · 4 comments

Comments

@RobertJCarroll
Copy link
Contributor

For each assay result, we want to gather the following:

  1. File ID to link with record
  2. Tissue type from Sample
  3. Condition / Disease linked to Tissue
  4. Study name
  5. Individual Sex

If the information is missing (eg, no sample links in KF), the data can be left as NA. We will post-process to generate as detailed of labels as possible.

@bwalsh
Copy link

bwalsh commented Jun 28, 2022


# get the data
df_include =query_fhir_include(query_statement)
df_kf = query_fhir_kf(query_statement)
df_gtex = query_fhir_gtex(query_statement)
 


# dataframe looks like
#   columns: 
#       document_reference_attachment_uri (either drs:// or gs://), 
#       drs_uri, (if it exists)
#       document_reference_reference, ( DocumentReference/1234 )
#       file_path,  (downloaded document_reference_attachment_uri on local file system)
#       specimen_bodySite, 
#       condition_code,
#       research_study_reference, (full uri of research_study https:/example.com/fhir/ResearchStudy/1234)
#       patient_reference, (full uri  https:/example.com/fhir/Patient/123)
#       specimen_reference, (full uri  https:/example.com/fhir/Specimen/123)
#       ... extra columns (eg. observations) allowed
#   index:
#       document_reference_reference


pca_df =  df_include + df_kf + df_gtex

# go do PCA!

@mattions
Copy link
Contributor

Screenshot 2022-06-28 170816
@RobertJCarroll plan ^

@torstees
Copy link
Contributor

To get disease status associated with HTP in INCLUDE:

https://include-api-fhir-service.includedcc.org/Observation?_tag=HTP&code=MONDO:0008608

For Controls and

https://include-api-fhir-service.includedcc.org/Condition?code=MONDO:0008608

For Cases

That MONDO code is Down Syndrome. The other studies may be done differently, then Meen can clarify how those. His may all be Conditions with a different verificationStatus

@bwalsh
Copy link

bwalsh commented Jun 28, 2022

gtext_v8 data frame here: gs://fc-be286b9f-3acf-4168-af6e-592df509391d/gtex_v8-dataframe.tsv

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

No branches or pull requests

4 participants