-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.CPTAC.miRNAseq_hg38_gdc_current`
(
  project_short_name STRING OPTIONS(description="Project name abbreviation, eg TARGET-AML"),
  case_barcode STRING OPTIONS(description="Original TARGET case barcode, eg TARGET-20-PASCGR"),
  sample_barcode STRING OPTIONS(description="TARGET sample barcode, eg TARGET-20-PASWAT-09A"),
  aliquot_barcode STRING OPTIONS(description="TARGET aliquot barcode, eg TARGET-20-PAJLIP-01A-01R"),
  primary_site STRING OPTIONS(description="Anatomical site of the cancer under investigation or review"),
  miRNA_id STRING OPTIONS(description="Unique miRNA id (aka symbol), eg hsa-mir-21  --  relevant reference information can be found in the isb-cgc:genome_reference dataset in the tables miRBase_v21 and miRBase_v21_hsa_gff3"),
  read_count INT64 OPTIONS(description="Number of reads that were mapped to this mirna_id"),
  reads_per_million_miRNA_mapped FLOAT64 OPTIONS(description="Read count normalized by total reads mapped divided by 1 million"),
  cross_mapped STRING OPTIONS(description="A short isomiR read may map exactly to mature strands whose sequences are similar but not identical, when the read sequence does not capture the bases that distinguish these miRNAs (e.g. hsa-mir-30a at 6q13 and hsa-mir-30e at 1p34.2, which differ at position 18). We report such a <line_feed> read as cross-mapped, and we increment the read count for each MIMAT that it mapped to. Either Y or N -- fewer than 2% are Y"),
  sample_type_name STRING OPTIONS(description="The longer name of the sample type; eg. Primary Tumor, Recurrent Tumor, etc"),
  case_gdc_id STRING OPTIONS(description="GDC unique identifier for this case (corresponds to the case_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-f91c8f407ba11"),
  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-f91c8f407ba11")
)
OPTIONS(
  friendly_name="CPTAC HG38 miRNA EXPRESSION",
  description="Data was extracted from Rel 28 of the active GDC archive in June 2021 for TCGA miRNA data. The mRNA expression data was originally generated by next generation sequencing runs and quantified using the GDC miRNAseq analysis pipeline. This is version 2 of this table which now includes the sample_type_name field.",
  labels=[("access", "open"), ("program_0", "cptac2"), ("reference_genome", "hg38"), ("program_1", "cptac3"), ("data_type", "mirna_expression"), ("source", "gdc"), ("category", "processed_-omics_data"), ("status", "current"), ("version", "r28_v2")]
);

INSERT INTO `isb-cgc-bq.CPTAC.miRNAseq_hg38_gdc_current` (project_short_name, case_barcode, sample_barcode, aliquot_barcode, primary_site, miRNA_id, read_count, reads_per_million_miRNA_mapped, cross_mapped, sample_type_name, case_gdc_id, sample_gdc_id, aliquot_gdc_id, file_gdc_id) VALUES ('CPTAC-2', '05CO014', '6968a80f-fd06-4669-b4bd-9a5cb5', '6968a80f-fd06-4669-b4bd-9a5cb5_D7', 'Rectum', 'hsa-let-7a-2', 26, 9534.286762, 'N', 'Primary Tumor', '227d0588-648f-4d7d-b536-4260d031f42f', '5a62763f-49cf-42e3-94e5-8e7e36f1203f', '28153451-8701-4356-a36a-db548ed4f5b8', '4e111319-cebd-4bc7-9abd-d59764a74e33'), ('CPTAC-2', '05CO014', '6968a80f-fd06-4669-b4bd-9a5cb5', '6968a80f-fd06-4669-b4bd-9a5cb5_D7', 'Rectum', 'hsa-mir-23a', 24, 8800.880088, 'N', 'Primary Tumor', '227d0588-648f-4d7d-b536-4260d031f42f', '5a62763f-49cf-42e3-94e5-8e7e36f1203f', '28153451-8701-4356-a36a-db548ed4f5b8', '4e111319-cebd-4bc7-9abd-d59764a74e33'), ('CPTAC-2', '05CO014', '6968a80f-fd06-4669-b4bd-9a5cb5', '6968a80f-fd06-4669-b4bd-9a5cb5_D7', 'Rectum', 'hsa-mir-10a', 33, 12101.210121, 'N', 'Primary Tumor', '227d0588-648f-4d7d-b536-4260d031f42f', '5a62763f-49cf-42e3-94e5-8e7e36f1203f', '28153451-8701-4356-a36a-db548ed4f5b8', '4e111319-cebd-4bc7-9abd-d59764a74e33'), ('CPTAC-2', '05CO014', '6968a80f-fd06-4669-b4bd-9a5cb5', '6968a80f-fd06-4669-b4bd-9a5cb5_D7', 'Rectum', 'hsa-mir-148a', 60, 22002.20022, 'N', 'Primary Tumor', '227d0588-648f-4d7d-b536-4260d031f42f', '5a62763f-49cf-42e3-94e5-8e7e36f1203f', '28153451-8701-4356-a36a-db548ed4f5b8', '4e111319-cebd-4bc7-9abd-d59764a74e33'), ('CPTAC-2', '05CO014', '6968a80f-fd06-4669-b4bd-9a5cb5', '6968a80f-fd06-4669-b4bd-9a5cb5_D7', 'Rectum', 'hsa-mir-375', 19, 6967.363403, 'N', 'Primary Tumor', '227d0588-648f-4d7d-b536-4260d031f42f', '5a62763f-49cf-42e3-94e5-8e7e36f1203f', '28153451-8701-4356-a36a-db548ed4f5b8', '4e111319-cebd-4bc7-9abd-d59764a74e33');