-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_level2_metadata_r2`
(
  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_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  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)"),
  scRNAseq_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze a data set."),
  Workflow_Version STRING OPTIONS(description="Major version of the workflow (e.g. Cell Ranger v3.1)"),
  scRNAseq_Workflow_Parameters_Description STRING OPTIONS(description="Parameters used to run the workflow. scRNA-seq level 3: e.g. Normalization and log transformation, ran empty drops or doublet detection, used filter on # genes/cell, etc. scRNA-seq Level 4: dimensionality reduction with PCA and 50 components, nearest-neighbor graph with k = 20 and Leiden clustering with resolution = 1, UMAP visualization using 50 PCA components, marker genes used to annotate cell types, information about droplet matrix (all barcodes) to cell matrix (only informative barcodes representing real cells) conversion"),
  Workflow_Link STRING OPTIONS(description="Link to workflow or command. DockStore.org recommended. URL"),
  Genomic_Reference STRING OPTIONS(description="Exact version of the human genome reference used in the alignment of reads (e.g. https://www.gencodegenes.org/human/)"),
  Genomic_Reference_URL STRING OPTIONS(description="Link to human genome sequence (e.g. ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_34/GRCh38.primary_assembly.genome.fa.gz) [URL]"),
  Genome_Annotation_URL STRING OPTIONS(description="Link to the human genome annotation (GTF) file (e.g. ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_34/gencode.v34.annotation.gtf.gz)"),
  Checksum STRING OPTIONS(description="MD5 checksum of the BAM file"),
  Whitelist_Cell_Barcode_File_Link STRING OPTIONS(description="Link to file listing all possible cell barcodes. URL"),
  Cell_Barcode_Tag STRING OPTIONS(description="SAM tag for cell barcode field; please provide a valid cell barcode tag"),
  UMI_Tag STRING OPTIONS(description="SAM tag for UMI field; please provide a valid UB, UMI"),
  Applied_Hard_Trimming STRING OPTIONS(description="TBD"),
  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"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  Base_Filename STRING OPTIONS(description="Base name of file"),
  md5 STRING OPTIONS(description="md5 hash of file")
)
OPTIONS(
  friendly_name="HTAN SCRNASEQ LEVEL 2 METADATA R2 VERSIONED",
  description="Data was extracted from HTAN Synapse projects in April 2022. More details: see https://data.humantumoratlas.org/standard/rnaseq",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("status", "current"), ("category", "metadata")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.scRNAseq_level2_metadata_r2` (Component, Filename, File_Format, HTAN_Parent_Data_File_ID, HTAN_Data_File_ID, scRNAseq_Workflow_Type, Workflow_Version, scRNAseq_Workflow_Parameters_Description, Workflow_Link, Genomic_Reference, Genomic_Reference_URL, Genome_Annotation_URL, Checksum, Whitelist_Cell_Barcode_File_Link, Cell_Barcode_Tag, UMI_Tag, Applied_Hard_Trimming, entityId, HTAN_Center, Data_Release, File_Size, Base_Filename, md5) VALUES ('ScRNA-seqLevel2', 'single_cell_RNAseq_level_2/bam.ENSEMBL/HTA8_1012_1/RU255B_BRAINMET_Aligned.out.bam', 'bam', 'HTA8_1012_110001,HTA8_1012_110002,HTA8_1012_110003,HTA8_1012_110004,HTA8_1012_110005,HTA8_1012_110006,HTA8_1012_110007,HTA8_1012_110008,HTA8_1012_110009,HTA8_1012_110010,HTA8_1012_110011,HTA8_1012_110012,HTA8_1012_110013,HTA8_1012_110014,HTA8_1012_110015,HTA8_1012_110016', 'HTA8_1012_210001', 'SEQC', '0.2.8', 'Default parameters for SEQC', 'https://github.com/dpeerlab/seqc', 'hg38_long_polya', 's3://seqc-public/genomes/hg38_long_polya/', 's3://seqc-public/genomes/hg38_long_polya/annotations.gtf', 'a03b84316c5a01ffb624b7e21af593fb', 's3://dplab-data/barcodes/ten_x_v2/flat/', 'First field in read name (column 1)', 'Second field in read name (column 1)', 'No', 'syn24988994', 'HTAN MSK', 'Release 1.0', 15710113775, 'RU255B_BRAINMET_Aligned.out.bam', 'a03b84316c5a01ffb624b7e21af593fb'), ('ScRNA-seqLevel2', 'single_cell_RNAseq_level_2/bam.ENSEMBL/HTA8_1013_1/RU653_TUMOR_Aligned.out.bam', 'bam', 'HTA8_1013_110001,HTA8_1013_110002,HTA8_1013_110003,HTA8_1013_110004,HTA8_1013_110005,HTA8_1013_110006,HTA8_1013_110007,HTA8_1013_110008,HTA8_1013_110009,HTA8_1013_110010,HTA8_1013_110011,HTA8_1013_110012,HTA8_1013_110013,HTA8_1013_110014,HTA8_1013_110015,HTA8_1013_110016', 'HTA8_1013_210001', 'SEQC', '0.2.8', 'Default parameters for SEQC', 'https://github.com/dpeerlab/seqc', 'hg38_long_polya', 's3://seqc-public/genomes/hg38_long_polya/', 's3://seqc-public/genomes/hg38_long_polya/annotations.gtf', '63569ba4840ff5ee9ae204c6bafe39ae', 's3://dplab-data/barcodes/ten_x_v2/flat/', 'First field in read name (column 1)', 'Second field in read name (column 1)', 'No', 'syn24988993', 'HTAN MSK', 'Release 1.0', 13153177477, 'RU653_TUMOR_Aligned.out.bam', '63569ba4840ff5ee9ae204c6bafe39ae'), ('ScRNA-seqLevel2', 'single_cell_RNAseq_level_2/bam.ENSEMBL/HTA8_1014_1/RU661_TUMOR_Aligned.out.bam', 'bam', 'HTA8_1014_110001,HTA8_1014_110002,HTA8_1014_110003,HTA8_1014_110004,HTA8_1014_110005,HTA8_1014_110006,HTA8_1014_110007,HTA8_1014_110008,HTA8_1014_110009,HTA8_1014_110010,HTA8_1014_110011,HTA8_1014_110012,HTA8_1014_110013,HTA8_1014_110014,HTA8_1014_110015,HTA8_1014_110016', 'HTA8_1014_210001', 'SEQC', '0.2.8', 'Default parameters for SEQC', 'https://github.com/dpeerlab/seqc', 'hg38_long_polya', 's3://seqc-public/genomes/hg38_long_polya/', 's3://seqc-public/genomes/hg38_long_polya/annotations.gtf', '2f4ab18432c5e0c56d971132634c8b9c', 's3://dplab-data/barcodes/ten_x_v2/flat/', 'First field in read name (column 1)', 'Second field in read name (column 1)', 'No', 'syn24989017', 'HTAN MSK', 'Release 1.0', 19500866497, 'RU661_TUMOR_Aligned.out.bam', '2f4ab18432c5e0c56d971132634c8b9c'), ('ScRNA-seqLevel2', 'single_cell_RNAseq_level_2/bam.ENSEMBL/HTA8_1015_1/RU666_SPINEMET_Aligned.out.bam', 'bam', 'HTA8_1015_110001,HTA8_1015_110002,HTA8_1015_110003,HTA8_1015_110004,HTA8_1015_110005,HTA8_1015_110006,HTA8_1015_110007,HTA8_1015_110008,HTA8_1015_110009,HTA8_1015_110010,HTA8_1015_110011,HTA8_1015_110012,HTA8_1015_110013,HTA8_1015_110014,HTA8_1015_110015,HTA8_1015_110016', 'HTA8_1015_210001', 'SEQC', '0.2.8', 'Default parameters for SEQC', 'https://github.com/dpeerlab/seqc', 'hg38_long_polya', 's3://seqc-public/genomes/hg38_long_polya/', 's3://seqc-public/genomes/hg38_long_polya/annotations.gtf', '2a3fe345462973a818d394a09bc214a1', 's3://dplab-data/barcodes/ten_x_v2/flat/', 'First field in read name (column 1)', 'Second field in read name (column 1)', 'No', 'syn24989018', 'HTAN MSK', 'Release 1.0', 16036328192, 'RU666_SPINEMET_Aligned.out.bam', '2a3fe345462973a818d394a09bc214a1'), ('ScRNA-seqLevel2', 'single_cell_RNAseq_level_2/bam.ENSEMBL/HTA8_1016_1/RU675_TUMOR_Aligned.out.bam', 'bam', 'HTA8_1016_110001,HTA8_1016_110002,HTA8_1016_110003,HTA8_1016_110004,HTA8_1016_110005,HTA8_1016_110006,HTA8_1016_110007,HTA8_1016_110008,HTA8_1016_110009,HTA8_1016_110010,HTA8_1016_110011,HTA8_1016_110012,HTA8_1016_110013,HTA8_1016_110014,HTA8_1016_110015,HTA8_1016_110016', 'HTA8_1016_210001', 'SEQC', '0.2.8', 'Default parameters for SEQC', 'https://github.com/dpeerlab/seqc', 'hg38_long_polya', 's3://seqc-public/genomes/hg38_long_polya/', 's3://seqc-public/genomes/hg38_long_polya/annotations.gtf', '99c6123175d980b85bc6899183b84293', 's3://dplab-data/barcodes/ten_x_v2/flat/', 'First field in read name (column 1)', 'Second field in read name (column 1)', 'No', 'syn24989026', 'HTAN MSK', 'Release 1.0', 14843572911, 'RU675_TUMOR_Aligned.out.bam', '99c6123175d980b85bc6899183b84293');