-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_level1_metadata_r3`
(
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Filename STRING OPTIONS(description="Name of a file"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  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"),
  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)"),
  Nucleic_Acid_Source STRING OPTIONS(description="The source of the input nucleic molecule"),
  Cryopreserved_Cells_in_Sample STRING OPTIONS(description="Indicate if library preparation was based on revived frozen cells."),
  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"),
  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]"),
  Read_Indicator STRING OPTIONS(description="Indicate if this is Read 1 (R1) or Read 2 (R2)"),
  Read1 STRING OPTIONS(description="Read 1 content description"),
  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"),
  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"),
  Spike_In STRING OPTIONS(description="A set of known synthetic RNA molecules with known sequence that are added to the cell lysis mix"),
  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."),
  Total_Number_of_Input_Cells STRING OPTIONS(description="Number of cells loaded/placed on plates"),
  Input_Cells_and_Nuclei STRING OPTIONS(description="Number of cells and number of nuclei input; entry format: number, number"),
  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'"),
  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'"),
  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'"),
  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."),
  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)"),
  Cell_Barcode_Offset STRING OPTIONS(description="Offset in sequence for cell barcode read (in bp): number"),
  Cell_Barcode_Length STRING OPTIONS(description="Length of cell barcode read (in bp): number"),
  Valid_Barcodes_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"),
  UMI_Barcode_Length STRING OPTIONS(description="Length of UMI barcode read (in bp): number"),
  Median_UMIs_per_Cell_Number STRING OPTIONS(description="Number"),
  Empty_Well_Barcode STRING OPTIONS(description="Unique cell barcode assigned to empty cells used as controls in CEL-seq2 assays."),
  Well_Index STRING OPTIONS(description="Indicate if protein expression (EPCAM/CD45) positive/negative data  is available for each cell in CEL-seq2 assays"),
  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]"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  HTAN_Center STRING OPTIONS(description="Name of HTAN Center e.g. HTAN HTAPP"),
  Data_Release STRING OPTIONS(description="Inclusion in HTAN Data Release e.g. Release 1.0"),
  Manifest_Version INT64 OPTIONS(description="Latest version of metadata manifest"),
  Uuid STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  md5 STRING OPTIONS(description="md5 hash of file"),
  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 R3 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 2023. More details: see https://data.humantumoratlas.org/standard/sequencing",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("status", "current"), ("category", "metadata")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.scRNAseq_level1_metadata_r3` (Component, Filename, File_Format, HTAN_Parent_Biospecimen_ID, HTAN_Data_File_ID, Nucleic_Acid_Source, Cryopreserved_Cells_in_Sample, Single_Cell_Isolation_Method, Dissociation_Method, Library_Construction_Method, Read_Indicator, Read1, Read2, End_Bias, Reverse_Transcription_Primer, Spike_In, Sequencing_Platform, Total_Number_of_Input_Cells, Input_Cells_and_Nuclei, Library_Preparation_Days_from_Index, Single_Cell_Dissociation_Days_from_Index, Sequencing_Library_Construction_Days_from_Index, Nucleic_Acid_Capture_Days_from_Index, Protocol_Link, Technical_Replicate_Group, Cell_Barcode_Offset, Cell_Barcode_Length, Valid_Barcodes_Cell_Number, UMI_Barcode_Offset, UMI_Barcode_Length, Median_UMIs_per_Cell_Number, Empty_Well_Barcode, Well_Index, Feature_Reference_Id, entityId, HTAN_Center, Data_Release, Manifest_Version, Uuid, File_Size, md5, CDS_Release) VALUES ('ScRNA-seqLevel1', 'single_cell_RNAseq_level_1/fastq/HTA8_1001_1/barcode/889_Ru1038_Plus_frozen_IGO_10414_2_S2_L001_R1_001.fastq.gz', 'fastq', 'HTA8_1001_1', 'HTA8_1001_110001', 'Single Cell', 'Yes', '10x', 'Enzymatic Digestion', '10xV2', 'R1', 'Cell Barcode and UMI', 'cDNA', '3 Prime', 'Poly-dT', 'No Spike In', 'Illumina NovaSeq 6000', '8700', '87000', '1', '1', '1', '56', 'https://assets.ctfassets.net/an68im79xiti/RT8DYoZzhDJRBMrJCmVxl/6a0ed8015d89bf9602128a4c9f8962c8/CG00052_SingleCell3_ReagentKitv2UserGuide_RevF.pdf', NULL, '0', '16', '180419', '16', '10', '3096.0', NULL, NULL, NULL, 'syn23629823', 'HTAN MSK', 'Release 1.0', 1, '592fed5d-29ee-497b-b541-de111a7f11dd', 2261359346, '0d0fedc0d98c2d8459a47459a09467d6', 'v21.9.1.seq'), ('ScRNA-seqLevel1', 'single_cell_RNAseq_level_1/fastq/HTA8_1001_1/barcode/889_Ru1038_Plus_frozen_IGO_10414_2_S2_L002_R1_001.fastq.gz', 'fastq', 'HTA8_1001_1', 'HTA8_1001_110002', 'Single Cell', 'Yes', '10x', 'Enzymatic Digestion', '10xV2', 'R1', 'Cell Barcode and UMI', 'cDNA', '3 Prime', 'Poly-dT', 'No Spike In', 'Illumina NovaSeq 6000', '8700', '87000', '1', '1', '1', '56', 'https://assets.ctfassets.net/an68im79xiti/RT8DYoZzhDJRBMrJCmVxl/6a0ed8015d89bf9602128a4c9f8962c8/CG00052_SingleCell3_ReagentKitv2UserGuide_RevF.pdf', NULL, '0', '16', '180419', '16', '10', '3096.0', NULL, NULL, NULL, 'syn23629824', 'HTAN MSK', 'Release 1.0', 1, '37ba0d4a-028b-473d-99ad-0cca9fe4d340', 2205228816, '1ee73a6f5b065fac396836f1151fc1d4', 'v21.9.1.seq'), ('ScRNA-seqLevel1', 'single_cell_RNAseq_level_1/fastq/HTA8_2005_2/barcode/Ru1108a_Bambanker_Frozen_IGO_09557_18_S18_L001_R1_001.fastq.gz', 'fastq', 'HTA8_2005_2', 'HTA8_2005_120001', 'Single Cell', 'Yes', '10x', 'Enzymatic Digestion', '10xV2', 'R1', 'Cell Barcode and UMI', 'cDNA', '3 Prime', 'Poly-dT', 'No Spike In', 'Illumina NovaSeq 6000', '8700', '87000', '1', '1', '1', '14', 'https://assets.ctfassets.net/an68im79xiti/RT8DYoZzhDJRBMrJCmVxl/6a0ed8015d89bf9602128a4c9f8962c8/CG00052_SingleCell3_ReagentKitv2UserGuide_RevF.pdf', NULL, '0', '16', '439832', '16', '10', '11228.0', NULL, NULL, NULL, 'syn23593959', 'HTAN MSK', 'Release 1.0', 1, 'e8bab1d5-8063-4b04-85a7-35ff635fba2c', 2179835872, '908a8cdbdd43e1023c98f406dd872f79', 'v21.9.1.seq'), ('ScRNA-seqLevel1', 'single_cell_RNAseq_level_1/fastq/HTA8_2005_2/barcode/Ru1108a_Bambanker_Frozen_IGO_09557_18_S18_L002_R1_001.fastq.gz', 'fastq', 'HTA8_2005_2', 'HTA8_2005_120002', 'Single Cell', 'Yes', '10x', 'Enzymatic Digestion', '10xV2', 'R1', 'Cell Barcode and UMI', 'cDNA', '3 Prime', 'Poly-dT', 'No Spike In', 'Illumina NovaSeq 6000', '8700', '87000', '1', '1', '1', '14', 'https://assets.ctfassets.net/an68im79xiti/RT8DYoZzhDJRBMrJCmVxl/6a0ed8015d89bf9602128a4c9f8962c8/CG00052_SingleCell3_ReagentKitv2UserGuide_RevF.pdf', NULL, '0', '16', '439832', '16', '10', '11228.0', NULL, NULL, NULL, 'syn23593961', 'HTAN MSK', 'Release 1.0', 1, '0d8f56fd-f4d1-4f39-8e6f-90990ae721a0', 2155351009, '44fca478e470c581c9d57f1a2249708e', 'v21.9.1.seq'), ('ScRNA-seqLevel1', 'single_cell_RNAseq_level_1/fastq/HTA8_1001_1/genomic/889_Ru1038_Plus_frozen_IGO_10414_2_S2_L001_R2_001.fastq.gz', 'fastq', 'HTA8_1001_1', 'HTA8_1001_110003', 'Single Cell', 'Yes', '10x', 'Enzymatic Digestion', '10xV2', 'R2', 'Cell Barcode and UMI', 'cDNA', '3 Prime', 'Poly-dT', 'No Spike In', 'Illumina NovaSeq 6000', '8700', '87000', '1', '1', '1', '56', 'https://assets.ctfassets.net/an68im79xiti/RT8DYoZzhDJRBMrJCmVxl/6a0ed8015d89bf9602128a4c9f8962c8/CG00052_SingleCell3_ReagentKitv2UserGuide_RevF.pdf', NULL, '0', '16', '180419', '16', '10', '3096.0', NULL, NULL, NULL, 'syn23629830', 'HTAN MSK', 'Release 1.0', 1, '401ae93f-c769-4966-96d0-7d4dd1ed8dfe', 5122767822, '0e4ed912a7e408f4dee303c3746fdbb7', 'v21.9.1.seq');