-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.pancancer_atlas.merged_sample_quality_annotations`
(
  patient_barcode STRING OPTIONS(description="TCGA barcode identifier for the study participant, eg TCGA-02-0001"),
  aliquot_barcode STRING OPTIONS(description="TCGA aliquot barcode, eg TCGA-12-1089-01A-01D-0517-28"),
  cancer_type STRING OPTIONS(description="TCGA study abbreviation, eg LAML. Full list available at https://gdc.cancer.gov/resources-tcga-users/tcga-code-tables/tcga-study-abbreviations"),
  platform STRING OPTIONS(description="Platform used to generate this data, eg. HumanMethylation450, HumanMethylation27, IlluminaHiSeq_RNASeqV2, etc"),
  patient_annotation STRING OPTIONS(description="Participant level annotations"),
  sample_annotation STRING OPTIONS(description="Sample level annotations"),
  aliquot_annotation STRING OPTIONS(description="TCGA aliquot annotations"),
  aliquot_annotation_updated STRING OPTIONS(description="Updated TCGA aliquot annotations"),
  AWG_excluded_because_of_pathology STRING OPTIONS(description="Indicates if participant barcode was excluded because of pathology, according to the TCGA Analysis Working Group. Takes values of null, \"1.0\" (excluded), or \"0.0\" (non excluded) "),
  AWG_pathology_exclusion_reason STRING OPTIONS(description="Describe the reason of exclusion when AWG_excluded_because_of_pathology = \"1.0\""),
  Reviewed_by_EPC STRING OPTIONS(description="Indicates if participant barcode was reviewed by the expert pathology committee. Takes values of null, \"1.0\" (excluded), or \"0.0\" (non excluded)."),
  Do_not_use STRING OPTIONS(description="Boolean variable that indicates whether aliquot barcodes were flagged as \"do not use\" by the TCGA PanCancer Atlas Consortium")
)
OPTIONS(
  friendly_name="PanCancer Merged Sample Quality Annotations",
  description="Data loaded from the PanCancer Atlas initiative on the GDC in April 2018. Contains Sample Quality Annotations. This file was created by merging the annotations available in the DCC annotations database with manually curated lists of issue samples.   \n\nMore details: https://www.synapse.org/#!Synapse:syn4551248 \nand \nhttps://gdc.cancer.gov/about-data/publications/pancanatlas , file:merged_sample_quality_annotations.tsv",
  labels=[("category", "clinical_biospecimen_data"), ("status", "current"), ("access", "open"), ("source_0", "gdc"), ("data_type", "biospecimen_supplement"), ("program", "pancancer_atlas"), ("reference_genome", "hg19"), ("source_1", "literature")]
);

INSERT INTO `isb-cgc-bq.pancancer_atlas.merged_sample_quality_annotations` (patient_barcode, aliquot_barcode, cancer_type, platform, patient_annotation, sample_annotation, aliquot_annotation, aliquot_annotation_updated, AWG_excluded_because_of_pathology, AWG_pathology_exclusion_reason, Reviewed_by_EPC, Do_not_use) VALUES ('TCGA-05-4244', 'TCGA-05-4244-01A-21-2190-20', 'LUAD', 'MDA_RPPA_Core', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'False'), ('TCGA-05-4250', 'TCGA-05-4250-01A-21-2190-20', 'LUAD', 'MDA_RPPA_Core', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'False'), ('TCGA-05-4397', 'TCGA-05-4397-01A-21-2190-20', 'LUAD', 'MDA_RPPA_Core', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'False'), ('TCGA-05-4427', 'TCGA-05-4427-01A-22-2190-20', 'LUAD', 'MDA_RPPA_Core', 'Notification:Prior malignancy:Prior malignancy malignant melanoma of the skin. No systemic chemotherapy or radiation.', NULL, NULL, NULL, NULL, NULL, NULL, 'False'), ('TCGA-05-4434', 'TCGA-05-4434-01A-21-2190-20', 'LUAD', 'MDA_RPPA_Core', 'Notification:Prior malignancy:Prior malignancy  breast cancer. No systemic chemotherapy or radiation.', NULL, NULL, NULL, NULL, NULL, NULL, 'False');