-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.CPTAC.copy_number_segment_hg38_gdc_current`
(
  project_short_name STRING OPTIONS(description="Project name abbreviation; the program name appended with a project name abbreviation; e.g. TCGA-OV, etc."),
  case_barcode STRING OPTIONS(description="Original TCGA case barcode, eg TCGA-DX-A8BN"),
  primary_site STRING OPTIONS(description="Anatomical site of the cancer under investigation or review"),
  sample_barcode STRING OPTIONS(description="sample barcode, eg TCGA-12-1089-01A"),
  aliquot_barcode STRING OPTIONS(description="aliquot barcode, eg TCGA-12-1089-01A-01D-0517-02"),
  chromosome STRING OPTIONS(description="Chromosome, possible values: chr1-22, and chrX"),
  start_pos INT64 OPTIONS(description="1-based start chromosome position of isoform"),
  end_pos INT64 OPTIONS(description="1-based end chromosome position of isoform"),
  copy_number INT64 OPTIONS(description="The sum of the Major and Minor Copy Numbers"),
  major_copy_number INT64 OPTIONS(description="The Copy Number of the more prevalent allele set in the dataset for the genomic region"),
  minor_copy_number INT64 OPTIONS(description="The Copy Number of the less prevalent allele set in the dataset for the genomic region"),
  case_gdc_id STRING OPTIONS(description="Unique GDC identifier for this case (corresponds to the case_barcode).  Can be used to access more information from the GDC data portal like this:   https://portal.gdc.cancer.gov/files/c21b332c-06c6-4403-9032-f91c8f407ba10"),
  sample_gdc_id STRING OPTIONS(description="Unique GDC identifier for this sample (corresponds to the sample_barcode), eg a1ec9279-c1a6-4e58-97ed-9ec1f36187c5  --  this can be used to access more information from the GDC data portal"),
  aliquot_gdc_id STRING OPTIONS(description="Unique GDC identifier for this aliquot (corresponds to the aliquot_barcode), eg 7fbfdb3e-1fd2-4206-8d2e-7f68e4a15844  --  this can be used to access more information from the GDC data portal"),
  file_gdc_id STRING OPTIONS(description="Unique GDC identifier for this file (corresponds to the file_barcode)  --  this can be used to access more information from the GDC data portal like this: https://portal.gdc.cancer.gov/files/c21b332c-06c6-4403-9032-f91c8f407ba17")
)
OPTIONS(
  friendly_name="CPTAC HG38 COPY NUMBER SEGMENT",
  description="Data was extracted from REL 28 of the active GDC archive from GDC on July, 2021 for CPTAC copy number segment data. More details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#r28",
  labels=[("access", "open"), ("program_0", "cptac2"), ("reference_genome", "hg38"), ("program_1", "cptac3"), ("data_type", "copy_number_segment"), ("source", "gdc"), ("category", "processed_-omics_data"), ("status", "current"), ("version", "r28")]
);

INSERT INTO `isb-cgc-bq.CPTAC.copy_number_segment_hg38_gdc_current` (project_short_name, case_barcode, primary_site, sample_barcode, aliquot_barcode, chromosome, start_pos, end_pos, copy_number, major_copy_number, minor_copy_number, case_gdc_id, sample_gdc_id, aliquot_gdc_id, file_gdc_id) VALUES ('CPTAC-3', 'C3L-00017', 'Pancreas', 'C3L-00017-02', 'CPT0000250005', 'chr8', 38313774, 38354895, 22, 21, 1, 'd0a4a77b-3676-490b-9058-22509098cb27', '111b058e-22ed-4f30-aed6-9a67f190b754', '90daf6b6-b405-431c-bb0d-6f52df3e6ef9', '0c7d645e-0168-4103-8fa0-340dde83458b'), ('CPTAC-3', 'C3L-00017', 'Pancreas', 'C3L-00017-02', 'CPT0000250005', 'chr8', 38366179, 38425690, 16, 16, 0, 'd0a4a77b-3676-490b-9058-22509098cb27', '111b058e-22ed-4f30-aed6-9a67f190b754', '90daf6b6-b405-431c-bb0d-6f52df3e6ef9', '0c7d645e-0168-4103-8fa0-340dde83458b'), ('CPTAC-3', 'C3L-00017', 'Pancreas', 'C3L-00017-02', 'CPT0000250005', 'chr8', 37722738, 38311181, 14, 13, 1, 'd0a4a77b-3676-490b-9058-22509098cb27', '111b058e-22ed-4f30-aed6-9a67f190b754', '90daf6b6-b405-431c-bb0d-6f52df3e6ef9', '0c7d645e-0168-4103-8fa0-340dde83458b'), ('CPTAC-3', 'C3L-00017', 'Pancreas', 'C3L-00017-02', 'CPT0000250005', 'chr8', 38427063, 38806462, 25, 24, 1, 'd0a4a77b-3676-490b-9058-22509098cb27', '111b058e-22ed-4f30-aed6-9a67f190b754', '90daf6b6-b405-431c-bb0d-6f52df3e6ef9', '0c7d645e-0168-4103-8fa0-340dde83458b'), ('CPTAC-3', 'C3L-00017', 'Pancreas', 'C3L-00017-02', 'CPT0000250005', 'chr8', 38808259, 38854829, 44, 42, 2, 'd0a4a77b-3676-490b-9058-22509098cb27', '111b058e-22ed-4f30-aed6-9a67f190b754', '90daf6b6-b405-431c-bb0d-6f52df3e6ef9', '0c7d645e-0168-4103-8fa0-340dde83458b');