-- DBMS: snowflake
create or replace TABLE BULKWES_LEVEL2_METADATA_CURRENT (
	"Total_Unmapped_reads" VARCHAR(16777216),
	"Adapter_Content" VARCHAR(16777216),
	"Proportion_Base_Mismatch" VARCHAR(16777216),
	"Custom_Alignment_Workflow" VARCHAR(16777216),
	"HTAN_Data_File_ID" VARCHAR(16777216),
	"Average_Read_Length" VARCHAR(16777216),
	"Contamination" VARCHAR(16777216),
	"Basic_Statistics" VARCHAR(16777216),
	"Component" VARCHAR(16777216),
	"Per_Base_Sequence_Content" VARCHAR(16777216),
	"Proportion_Reads_Duplicated" VARCHAR(16777216),
	"MSI_Workflow_Link" VARCHAR(16777216),
	"Total_Reads" VARCHAR(16777216),
	"QC_Workflow_Link" VARCHAR(16777216),
	"Pairs_On_Diff_CHR" VARCHAR(16777216),
	"QC_Workflow_Version" VARCHAR(16777216),
	"MSI_Score" VARCHAR(16777216),
	"Total_Uniquely_Mapped" VARCHAR(16777216),
	"Short_Reads" VARCHAR(16777216),
	"Proportion_Coverage_10x" VARCHAR(16777216),
	"HTAN_Parent_Data_File_ID" VARCHAR(16777216),
	"Proportion_Reads_Mapped" VARCHAR(16777216),
	"Genomic_Reference_URL" VARCHAR(16777216),
	"Genomic_Reference" VARCHAR(16777216),
	"Per_Sequence_GC_Content" VARCHAR(16777216),
	"Overrepresented_Sequences" VARCHAR(16777216),
	"HTAN_Parent_Biospecimen_ID" VARCHAR(16777216),
	"Alignment_Workflow_Type" VARCHAR(16777216),
	"Sequence_Length_Distribution" VARCHAR(16777216),
	"Average_Insert_Size" VARCHAR(16777216),
	"MSI_Status" VARCHAR(16777216),
	"Sequence_Duplication_Levels" VARCHAR(16777216),
	"Filename" VARCHAR(16777216),
	"entityId" VARCHAR(16777216),
	"Average_Base_Quality" VARCHAR(16777216),
	"Percent_GC_Content" VARCHAR(16777216),
	"Per_Tile_Sequence_Quality" VARCHAR(16777216),
	"Index_File_Name" VARCHAR(16777216),
	"Proportion_Coverage_30X" VARCHAR(16777216),
	"Per_Base_N_Content" VARCHAR(16777216),
	"QC_Workflow_Type" VARCHAR(16777216),
	"Is_lowest_level" VARCHAR(16777216),
	"Per_Base_Sequence_Quality" VARCHAR(16777216),
	"Contamination_Error" VARCHAR(16777216),
	"Proportion_Targets_No_Coverage" VARCHAR(16777216),
	"Id" VARCHAR(16777216),
	"Per_Sequence_Quality_Score" VARCHAR(16777216),
	"Encoding" VARCHAR(16777216),
	"Mean_Coverage" VARCHAR(16777216),
	"File_Format" VARCHAR(16777216),
	"HTAN_Center" VARCHAR(16777216),
	"Manifest_Id" VARCHAR(16777216),
	"Manifest_Version" NUMBER(38,0),
	"File_Size" NUMBER(38,0),
	"md5" VARCHAR(16777216),
	"Data_Release" VARCHAR(16777216),
	"CDS_Release" VARCHAR(16777216)
);

INSERT INTO "HTAN_2"."HTAN"."BULKWES_LEVEL2_METADATA_CURRENT" (Average_Insert_Size, Pairs_On_Diff_CHR, Overrepresented_Sequences, Average_Read_Length, Basic_Statistics, Contamination, File_Format, Proportion_Reads_Mapped, HTAN_Parent_Biospecimen_ID, md5, Percent_GC_Content, Alignment_Workflow_Type, Genomic_Reference, Is_lowest_level, Total_Unmapped_reads, Sequence_Duplication_Levels, Per_Base_Sequence_Content, HTAN_Center, Proportion_Targets_No_Coverage, Short_Reads, MSI_Workflow_Link, Proportion_Reads_Duplicated, Data_Release, File_Size, Custom_Alignment_Workflow, CDS_Release, Average_Base_Quality, Per_Sequence_Quality_Score, Manifest_Version, MSI_Status, Index_File_Name, Total_Uniquely_Mapped, Per_Base_Sequence_Quality, QC_Workflow_Type, Adapter_Content, QC_Workflow_Link, Proportion_Coverage_30X, Component, QC_Workflow_Version, Per_Sequence_GC_Content, Per_Base_N_Content, Total_Reads, Genomic_Reference_URL, Per_Tile_Sequence_Quality, Manifest_Id, Proportion_Coverage_10x, MSI_Score, Mean_Coverage, entityId, Sequence_Length_Distribution, Contamination_Error, HTAN_Parent_Data_File_ID, Proportion_Base_Mismatch, Id, HTAN_Data_File_ID, Encoding, Filename) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, 'bam', NULL, 'HTA10_01_004', '0349fb2e761141c3b7a7284009d67b5b', NULL, 'BWA with Mark Duplicates and BQSR', 'hg38+EBV', NULL, NULL, NULL, NULL, 'HTAN Stanford', NULL, NULL, NULL, NULL, 'Release 1.0', 60385716845, NULL, 'v21.9.1.seq', NULL, NULL, 2, NULL, 'wgs_level_2/A001C004.sorted.ir.br.rmDup.md.bam.bai', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkWESLevel2', NULL, NULL, NULL, NULL, 'https://doi.org/10.5281/zenodo.10557919', NULL, 'syn53366794', NULL, NULL, NULL, 'syn23594339', NULL, NULL, 'HTA10_01_00410001, HTA10_01_00410002', NULL, '322e60f5-637d-4e40-985d-764e415770c5', 'HTA10_01_00410201', NULL, 'wgs_level_2/A001C004.sorted.ir.br.rmDup.md.bam'), (NULL, NULL, NULL, NULL, NULL, NULL, 'bam', NULL, 'HTA10_02_010', 'ed2de4d16405f80d1f8f0a0a5aac10b3', NULL, 'BWA with Mark Duplicates and BQSR', 'hg38+EBV', NULL, NULL, NULL, NULL, 'HTAN Stanford', NULL, NULL, NULL, NULL, 'Release 1.0', 223532372579, NULL, 'v21.9.1.seq', NULL, NULL, 2, NULL, 'wgs_level_2/A002C010.sorted.ir.br.rmDup.md.bam.bai', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkWESLevel2', NULL, NULL, NULL, NULL, 'https://doi.org/10.5281/zenodo.10557919', NULL, 'syn53366794', NULL, NULL, NULL, 'syn23594380', NULL, NULL, 'HTA10_02_01010001, HTA10_02_01010002, HTA10_02_01010003, HTA10_02_01010004, HTA10_02_01010005, HTA10_02_01010006', NULL, 'c06aa794-0361-4cd1-b36a-fbf05c7b86cb', 'HTA10_02_01010201', NULL, 'wgs_level_2/A002C010.sorted.ir.br.rmDup.md.bam'), (NULL, NULL, NULL, NULL, NULL, NULL, 'bam', NULL, 'HTA10_03_055', '435d8f750ec9211d7fd160e96b99590e', NULL, 'BWA with Mark Duplicates and BQSR', 'hg38+EBV', NULL, NULL, NULL, NULL, 'HTAN Stanford', NULL, NULL, NULL, NULL, 'Release 1.0', 246768267654, NULL, 'v21.9.1.seq', NULL, NULL, 2, NULL, 'wgs_level_2/A014C055.sorted.ir.br.rmDup.md.bam.bai', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkWESLevel2', NULL, NULL, NULL, NULL, 'https://doi.org/10.5281/zenodo.10557919', NULL, 'syn53366794', NULL, NULL, NULL, 'syn23627643', NULL, NULL, 'HTA10_03_05510001, HTA10_03_05510002, HTA10_03_05510003, HTA10_03_05510004, HTA10_03_05510005, HTA10_03_05510006, HTA10_03_05510007, HTA10_03_05510008, HTA10_03_05510009, HTA10_03_05510010', NULL, '41c60995-7c2b-4948-8ca1-2cd34227ecd2', 'HTA10_03_05510201', NULL, 'wgs_level_2/A014C055.sorted.ir.br.rmDup.md.bam'), (NULL, NULL, NULL, NULL, NULL, NULL, 'bam', NULL, 'HTA10_02_123', 'f8941ae881eec0618cd0ac475451f0e1', NULL, 'BWA with Mark Duplicates and BQSR', 'hg38+EBV', NULL, NULL, NULL, NULL, 'HTAN Stanford', NULL, NULL, NULL, NULL, 'Release 1.0', 123637035108, NULL, 'v21.9.1.seq', NULL, NULL, 2, NULL, 'wgs_level_2/A002C123.sorted.ir.br.rmDup.md.bam.bai', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkWESLevel2', NULL, NULL, NULL, NULL, 'https://doi.org/10.5281/zenodo.10557919', NULL, 'syn53366794', NULL, NULL, NULL, 'syn23594851', NULL, NULL, 'HTA10_02_12310001, HTA10_02_12310002, HTA10_02_12310003, HTA10_02_12310004', NULL, '8f05b59b-bddd-4774-8e38-9090b03bd764', 'HTA10_02_12310201', NULL, 'wgs_level_2/A002C123.sorted.ir.br.rmDup.md.bam'), (NULL, NULL, NULL, NULL, NULL, NULL, 'bam', NULL, 'HTA10_04_206', '20d5375c8724ff3c60c09da0833f7d2c', NULL, 'BWA with Mark Duplicates and BQSR', 'hg38+EBV', NULL, NULL, NULL, NULL, 'HTAN Stanford', NULL, NULL, NULL, NULL, 'Release 1.0', 137174896920, NULL, 'v21.9.1.seq', NULL, NULL, 2, NULL, 'wgs_level_2/A015C206.sorted.ir.br.rmDup.md.bam.bai', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkWESLevel2', NULL, NULL, NULL, NULL, 'https://doi.org/10.5281/zenodo.10557919', NULL, 'syn53366794', NULL, NULL, NULL, 'syn23627923', NULL, NULL, 'HTA10_04_20610001, HTA10_04_20610002, HTA10_04_20610003, HTA10_04_20610004', NULL, '6f3b5747-f9cd-43d5-8ea7-bdd1ba9681a9', 'HTA10_04_20610201', NULL, 'wgs_level_2/A015C206.sorted.ir.br.rmDup.md.bam');