-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_level1_metadata_r5`
(
  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'"),
  Nucleic_Acid_Source STRING OPTIONS(description="The source of the input nucleic molecule"),
  Total_Number_of_Input_Cells STRING OPTIONS(description="Number of cells loaded/placed on plates"),
  UMI_Barcode_Offset STRING OPTIONS(description="Start position of UMI barcode in the sequence. Values: number, 0 for start of read"),
  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"),
  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]"),
  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'"),
  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)"),
  Valid_Barcodes_Cell_Number STRING OPTIONS(description="Number"),
  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"),
  Well_Index STRING OPTIONS(description="Indicate if protein expression (EPCAM/CD45) positive/negative data  is available for each cell in CEL-seq2 assays"),
  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'"),
  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)"),
  Median_UMIs_per_Cell_Number STRING OPTIONS(description="Number"),
  Read1 STRING OPTIONS(description="Read 1 content description"),
  cDNA_Length STRING OPTIONS(description="Length of cDNA read (in bp): number"),
  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."),
  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"),
  Cell_Barcode_Offset STRING OPTIONS(description="Offset in sequence for cell barcode read (in bp): 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]"),
  Input_Cells_and_Nuclei STRING OPTIONS(description="Number of cells and number of nuclei input; entry format: number, number"),
  Filename STRING OPTIONS(description="Name of a file"),
  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)"),
  Dissociation_Method STRING OPTIONS(description="The tissue dissociation method used for scRNASeq or scATAC-seq assays"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Cell_Barcode_Length STRING OPTIONS(description="Length of cell barcode read (in bp): number"),
  Empty_Well_Barcode STRING OPTIONS(description="Unique cell barcode assigned to empty cells used as controls in CEL-seq2 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."),
  Read2 STRING OPTIONS(description="Read 2 content description"),
  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'"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  Cryopreserved_Cells_in_Sample STRING OPTIONS(description="Indicate if library preparation was based on revived frozen cells."),
  Read_Indicator STRING OPTIONS(description="Indicate if this is Read 1 (R1), Read 2 (R2), Index Reads (I1), or Other"),
  UMI_Barcode_Length STRING OPTIONS(description="Length of UMI barcode read (in bp): number"),
  Spike_In_Concentration STRING OPTIONS(description="The final concentration or dilution (for commercial sets) of the spike in mix [PMID:21816910]"),
  Spike_In STRING OPTIONS(description="A set of known synthetic RNA molecules with known sequence that are added to the cell lysis mix"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  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 R5 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 April 2024 and corresponds to HTAN Data Release 5.1. 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_r5` (Single_Cell_Dissociation_Days_from_Index, Nucleic_Acid_Source, Total_Number_of_Input_Cells, UMI_Barcode_Offset, Reverse_Transcription_Primer, Feature_Reference_Id, Sequencing_Library_Construction_Days_from_Index, HTAN_Data_File_ID, Valid_Barcodes_Cell_Number, Component, cDNA_Offset, Well_Index, Nucleic_Acid_Capture_Days_from_Index, Technical_Replicate_Group, Median_UMIs_per_Cell_Number, Read1, cDNA_Length, Sequencing_Platform, HTAN_Parent_Biospecimen_ID, Cell_Barcode_Offset, Library_Construction_Method, Input_Cells_and_Nuclei, Filename, Single_Cell_Isolation_Method, Dissociation_Method, entityId, Cell_Barcode_Length, Empty_Well_Barcode, Protocol_Link, Read2, End_Bias, Library_Preparation_Days_from_Index, Id, Cryopreserved_Cells_in_Sample, Read_Indicator, UMI_Barcode_Length, Spike_In_Concentration, Spike_In, File_Format, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('Not Applicable', 'Single Cell', '96', '2', 'Poly-dT', 'GRCh38', 'Not Applicable', 'HTA3_50420_7652137', '0', 'ScRNA-seqLevel1', '0', 'no', 'Not Applicable', NULL, '0.0', 'Cell Barcode and UMI', '82', 'Illumina Next Seq 500', 'HTA3_50420_3101724', '2', 'CEL-seq2', '96', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/12-PCGA02-10420-1001724_S12_R1_001.fastq.gz', 'FACS', 'Enzymatic Digestion', 'syn53284070', '6', 'Not Applicable', 'DOI 10.1186/s13059-016-0938-8', 'Cell Barcode and UMI', '3 Prime', NULL, 'f8cb08d5-89aa-4417-b732-99093f93007b', 'no', 'R1', '5', 'Not Applicable', 'ERCC', 'fastq', 'HTAN BU', 'syn39147409', 21, 209826117, '52d330adfb4d9252632d4b7244dd4ec6', 'Release 5.0', NULL), ('Not Applicable', 'Single Cell', '96', '2', 'Poly-dT', 'GRCh38', 'Not Applicable', 'HTA3_50404_2536892', '0', 'ScRNA-seqLevel1', '0', 'no', 'Not Applicable', NULL, '0.0', 'Cell Barcode and UMI', '82', 'Illumina Next Seq 500', 'HTA3_50404_3001849', '2', 'CEL-seq2', '96', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/7-PCGA02-10404-1001849_S7_R1_001.fastq.gz', 'FACS', 'Enzymatic Digestion', 'syn53284073', '6', 'Not Applicable', 'DOI 10.1186/s13059-016-0938-8', 'Cell Barcode and UMI', '3 Prime', NULL, '324bf812-469d-473c-a3d8-b9a0bc145f20', 'no', 'R1', '5', 'Not Applicable', 'ERCC', 'fastq', 'HTAN BU', 'syn39147409', 21, 486385932, 'e968226376ca206f7236e47ce8c93247', 'Release 5.0', NULL), ('Not Applicable', 'Single Cell', '96', '2', 'Poly-dT', 'GRCh38', 'Not Applicable', 'HTA3_50313_1595816015', '0', 'ScRNA-seqLevel1', '0', 'no', 'Not Applicable', NULL, '0.0', 'Cell Barcode and UMI', '82', 'Illumina Next Seq 500', 'HTA3_50313_3501800', '2', 'CEL-seq2', '96', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/MS-LZ-PCGA02-10313-3501807_S2_R1_001.fastq.gz', 'FACS', 'Enzymatic Digestion', 'syn51602310', '6', 'Not Applicable', 'DOI 10.1186/s13059-016-0938-8', 'Cell Barcode and UMI', '3 Prime', NULL, 'syn51602310', 'no', 'R1', '5', 'Not Applicable', 'ERCC', 'fastq', 'HTAN BU', 'syn39147409', 21, 196252599, '3403433b073817643d562fba072bf135', 'Release 4.0', 'v23.10.1.seq'), ('Not Applicable', 'Single Cell', '96', '2', 'Poly-dT', 'GRCh38', 'Not Applicable', 'HTA3_50313_4754507365', '0', 'ScRNA-seqLevel1', '0', 'no', 'Not Applicable', NULL, '0.0', 'Cell Barcode and UMI', '82', 'Illumina Next Seq 500', 'HTA3_50313_3502051', '2', 'CEL-seq2', '96', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/MS-LZ-PCGA02-10313-3502058_S3_R1_001.fastq.gz', 'FACS', 'Enzymatic Digestion', 'syn51602313', '6', 'Not Applicable', 'DOI 10.1186/s13059-016-0938-8', 'Cell Barcode and UMI', '3 Prime', NULL, 'syn51602313', 'no', 'R1', '5', 'Not Applicable', 'ERCC', 'fastq', 'HTAN BU', 'syn39147409', 21, 528825998, 'ea05716ddff72e27d93dae8aee4fa638', 'Release 4.0', 'v23.10.1.seq'), ('Not Applicable', 'Single Cell', '96', '2', 'Poly-dT', 'GRCh38', 'Not Applicable', 'HTA3_50403_4140123595', '0', 'ScRNA-seqLevel1', '0', 'no', 'Not Applicable', NULL, '0.0', 'Cell Barcode and UMI', '82', 'Illumina Next Seq 500', 'HTA3_50403_3501769', '2', 'CEL-seq2', '96', 'sc_rna_seq_Level_1/LUSC/P_LUSC/Roswell/MS-LZ-PCGA02-10403-3501769_S4_R1_001.fastq.gz', 'FACS', 'Enzymatic Digestion', 'syn51602318', '6', 'Not Applicable', 'DOI 10.1186/s13059-016-0938-8', 'Cell Barcode and UMI', '3 Prime', NULL, 'syn51602318', 'no', 'R1', '5', 'Not Applicable', 'ERCC', 'fastq', 'HTAN BU', 'syn39147409', 21, 452277579, '1c0527d7891a8545805399a5466a1679', 'Release 4.0', 'v23.10.1.seq');