-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_level1_metadata_r4`
(
  HTAN_Data_File_ID STRING OPTIONS(description="Self-identifier for this data file - HTAN ID of this file HTAN ID SOP (eg HTANx_yyy_zzz)"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  Empty_Well_Barcode STRING OPTIONS(description="Unique cell barcode assigned to empty cells used as controls in CEL-seq2 assays."),
  Single_Cell_Isolation_Method STRING OPTIONS(description="The method by which cells are isolated into individual reaction containers at a single cell resolution (e.g. wells, micro-droplets)"),
  Technical_Replicate_Group STRING OPTIONS(description="A common term for all files belonging to the same cell or library. Provide a numbering of each library prep batch (can differ from encapsulation and sequencing batch)"),
  Sequencing_Library_Construction_Days_from_Index STRING OPTIONS(description="Number of days between sample for assay was received in lab and day of sequencing library construction [number]. If not applicable please enter 'Not Applicable'"),
  Nucleic_Acid_Capture_Days_from_Index STRING OPTIONS(description="Number of days between sample for single cell assay was received in lab and day of nucleic acid capture part of library construction (in number of days since sample received in lab) [number]. If not applicable please enter 'Not Applicable'"),
  Dissociation_Method STRING OPTIONS(description="The tissue dissociation method used for scRNASeq or scATAC-seq assays"),
  Protocol_Link STRING OPTIONS(description="Protocols.io ID or DOI link to a free/open protocol resource describing in detail the assay protocol (e.g. surface markers used in Smart-seq, dissociation duration,  lot/batch numbers for key reagents such as primers, sequencing reagent kits, etc.) or the protocol by which the sample was obtained or generated."),
  Well_Index STRING OPTIONS(description="Indicate if protein expression (EPCAM/CD45) positive/negative data  is available for each cell in CEL-seq2 assays"),
  Cell_Barcode_Offset STRING OPTIONS(description="Offset in sequence for cell barcode read (in bp): number"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Feature_Reference_Id STRING OPTIONS(description="Unique ID for this feature. Must not contain whitespace, quote or comma characters. Each ID must be unique and must not collide with a gene identifier from the transcriptome [https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/feature-bc-analysis#feature-ref]"),
  Total_Number_of_Input_Cells STRING OPTIONS(description="Number of cells loaded/placed on plates"),
  Spike_In_Concentration STRING OPTIONS(description="The final concentration or dilution (for commercial sets) of the spike in mix [PMID:21816910]"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  cDNA_Offset STRING OPTIONS(description="Offset in sequence for cDNA read (in bp): number"),
  End_Bias STRING OPTIONS(description="The end of the cDNA molecule that is preferentially sequenced, e.g. 3/5 prime tag/end or the full length transcript"),
  Library_Preparation_Days_from_Index STRING OPTIONS(description="Number of days between sample for assay was received in lab and the libraries were prepared for sequencing [number]. If not applicable please enter 'Not Applicable'"),
  Nucleic_Acid_Source STRING OPTIONS(description="The source of the input nucleic molecule"),
  cDNA_Length STRING OPTIONS(description="Length of cDNA read (in bp): number"),
  UMI_Barcode_Length STRING OPTIONS(description="Length of UMI barcode read (in bp): number"),
  HTAN_Parent_Biospecimen_ID STRING OPTIONS(description="HTAN Biospecimen Identifier (eg HTANx_yyy_zzz) indicating the biospecimen(s) from which these files were derived; multiple parent biospecimen should be comma-separated"),
  Input_Cells_and_Nuclei STRING OPTIONS(description="Number of cells and number of nuclei input; entry format: number, number"),
  Library_Construction_Method STRING OPTIONS(description="Process which results in the creation of a library from fragments of DNA using cloning vectors or oligonucleotides with the role of adaptors [OBI_0000711]"),
  Cell_Barcode_Length STRING OPTIONS(description="Length of cell barcode read (in bp): number"),
  Valid_Barcodes_Cell_Number STRING OPTIONS(description="Number"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  Filename STRING OPTIONS(description="Name of a file"),
  Single_Cell_Dissociation_Days_from_Index STRING OPTIONS(description="Number of days between sample for single cell assay was received in lab and when the sample was dissociated and cells were isolated [number]. If not applicable please enter 'Not Applicable'"),
  Read1 STRING OPTIONS(description="Read 1 content description"),
  Read2 STRING OPTIONS(description="Read 2 content description"),
  Reverse_Transcription_Primer STRING OPTIONS(description="An oligo to which new deoxyribonucleotides can be added by DNA polymerase [SO_0000112]. The type of primer used for reverse transcription, e.g. oligo-dT or random primer. This allows users to identify content of the cDNA library input e.g. enriched for mRNA"),
  Read_Indicator STRING OPTIONS(description="Indicate if this is Read 1 (R1) or Read 2 (R2)"),
  Sequencing_Platform STRING OPTIONS(description="A platform is an object aggregate that is the set of instruments and software needed to perform a process [OBI_0000050]. Specific model of the sequencing instrument."),
  Median_UMIs_per_Cell_Number STRING OPTIONS(description="Number"),
  UMI_Barcode_Offset STRING OPTIONS(description="Start position of UMI barcode in the sequence. Values: number, 0 for start of read"),
  Cryopreserved_Cells_in_Sample STRING OPTIONS(description="Indicate if library preparation was based on revived frozen cells."),
  Spike_In STRING OPTIONS(description="A set of known synthetic RNA molecules with known sequence that are added to the cell lysis mix"),
  HTAN_Center STRING OPTIONS(description="Name of HTAN Center e.g. HTAN HTAPP"),
  Manifest_Id STRING OPTIONS(description="Synapse ID of manifest containing file annotation"),
  Manifest_Version INT64 OPTIONS(description="Latest version of metadata manifest"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  md5 STRING OPTIONS(description="md5 hash of file"),
  Data_Release STRING OPTIONS(description="Inclusion in HTAN Data Release e.g. Release 1.0"),
  CDS_Release STRING OPTIONS(description="CDS transfer package in which file was included e.g. v22.6.1.seq")
)
OPTIONS(
  friendly_name="HTAN SCRNASEQ LEVEL 1 METADATA R4 VERSIONED",
  description="This table contains the file metadata for first level (i.e. fastq) single cell RNA sequencing. Data was extracted from HTAN Synapse projects in October 2023. More details: see https://data.humantumoratlas.org/standard/sequencing",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("category", "metadata"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.scRNAseq_level1_metadata_r4` (HTAN_Data_File_ID, Id, Empty_Well_Barcode, Single_Cell_Isolation_Method, Technical_Replicate_Group, Sequencing_Library_Construction_Days_from_Index, Nucleic_Acid_Capture_Days_from_Index, Dissociation_Method, Protocol_Link, Well_Index, Cell_Barcode_Offset, entityId, Feature_Reference_Id, Total_Number_of_Input_Cells, Spike_In_Concentration, Component, cDNA_Offset, End_Bias, Library_Preparation_Days_from_Index, Nucleic_Acid_Source, cDNA_Length, UMI_Barcode_Length, HTAN_Parent_Biospecimen_ID, Input_Cells_and_Nuclei, Library_Construction_Method, Cell_Barcode_Length, Valid_Barcodes_Cell_Number, File_Format, Filename, Single_Cell_Dissociation_Days_from_Index, Read1, Read2, Reverse_Transcription_Primer, Read_Indicator, Sequencing_Platform, Median_UMIs_per_Cell_Number, UMI_Barcode_Offset, Cryopreserved_Cells_in_Sample, Spike_In, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('HTA3_50044_2965609361', 'syn51602617', 'Not Applicable', 'FACS', NULL, 'Not Applicable', 'Not Applicable', 'Enzymatic Digestion', 'DOI 10.1186/s13059-016-0938-8', 'No', '2', 'syn51602617', 'GRCh38', '96', 'Not Applicable', 'ScRNA-seqLevel1', '0', '3 Prime', NULL, 'Single Cell', '82', '5', 'HTA3_50044_3001838', '96', 'CEL-seq2', '6', '0', 'fastq', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/H2GC2BGXH_PCGA02_10044_3001838_R1.fastq.gz', 'Not Applicable', 'Cell Barcode and UMI', 'Cell Barcode and UMI', 'Poly-dT', 'R1', 'Illumina Next Seq 500', '646.0', '2', 'No', 'ERCC', 'HTAN BU', 'syn39147409', 15, 428533925, '29f6c5609b3a61575cc095e6feb0a06f', 'Release 4.0', NULL), ('HTA3_50044_0870876639', 'syn51602656', 'Not Applicable', 'FACS', NULL, 'Not Applicable', 'Not Applicable', 'Enzymatic Digestion', 'DOI 10.1186/s13059-016-0938-8', 'No', '2', 'syn51602656', 'GRCh38', '96', 'Not Applicable', 'ScRNA-seqLevel1', '0', '3 Prime', NULL, 'Single Cell', '82', '5', 'HTA3_50044_3101838', '96', 'CEL-seq2', '6', '0', 'fastq', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/H2GC2BGXH_PCGA02_10044_3101838_R1.fastq.gz', 'Not Applicable', 'Cell Barcode and UMI', 'Cell Barcode and UMI', 'Poly-dT', 'R1', 'Illumina Next Seq 500', '5884.5', '2', 'No', 'ERCC', 'HTAN BU', 'syn39147409', 15, 458890380, '81b5507bc3141a68c7f5dd7a1b9dfb0c', 'Release 4.0', NULL), ('HTA3_50044_5762731301', 'syn51602660', 'Not Applicable', 'FACS', NULL, 'Not Applicable', 'Not Applicable', 'Enzymatic Digestion', 'DOI 10.1186/s13059-016-0938-8', 'No', '2', 'syn51602660', 'GRCh38', '96', 'Not Applicable', 'ScRNA-seqLevel1', '0', '3 Prime', NULL, 'Single Cell', '82', '5', 'HTA3_50044_3201838', '96', 'CEL-seq2', '6', '0', 'fastq', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/H2GC2BGXH_PCGA02_10044_3201838_R1.fastq.gz', 'Not Applicable', 'Cell Barcode and UMI', 'Cell Barcode and UMI', 'Poly-dT', 'R1', 'Illumina Next Seq 500', '7747.0', '2', 'No', 'ERCC', 'HTAN BU', 'syn39147409', 15, 430546885, 'b516d03ab006bed94e7d3baa2da11437', 'Release 4.0', NULL), ('HTA3_50044_7532449115', 'syn51602296', 'Not Applicable', 'FACS', NULL, 'Not Applicable', 'Not Applicable', 'Enzymatic Digestion', 'DOI 10.1186/s13059-016-0938-8', 'No', '2', 'syn51602296', 'GRCh38', '96', 'Not Applicable', 'ScRNA-seqLevel1', '0', '3 Prime', NULL, 'Single Cell', '82', '5', 'HTA3_50044_3501831', '96', 'CEL-seq2', '6', '0', 'fastq', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/PCGA02_10044_3501831_R1.fastq.gz', 'Not Applicable', 'Cell Barcode and UMI', 'Cell Barcode and UMI', 'Poly-dT', 'R1', 'Illumina Next Seq 500', '0.0', '2', 'No', 'ERCC', 'HTAN BU', 'syn39147409', 15, 341326294, '7b53ac2449115dc6aa2a55a12bc5e85f', 'Release 4.0', NULL), ('HTA3_50044_8516336542', 'syn51602663', 'Not Applicable', 'FACS', NULL, 'Not Applicable', 'Not Applicable', 'Enzymatic Digestion', 'DOI 10.1186/s13059-016-0938-8', 'No', '2', 'syn51602663', 'GRCh38', '96', 'Not Applicable', 'ScRNA-seqLevel1', '0', '3 Prime', NULL, 'Single Cell', '82', '5', 'HTA3_50044_3601831', '96', 'CEL-seq2', '6', '0', 'fastq', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/H2GC2BGXH_PCGA02_10044_3601831_R1.fastq.gz', 'Not Applicable', 'Cell Barcode and UMI', 'Cell Barcode and UMI', 'Poly-dT', 'R1', 'Illumina Next Seq 500', '2914.0', '2', 'No', 'ERCC', 'HTAN BU', 'syn39147409', 15, 574056815, '0784bae2b4d1cfc127184d16b09214ab', 'Release 4.0', NULL);