control substitution on statement ok SET exon.cram_parse_tags = true; statement ok CREATE EXTERNAL TABLE cram STORED AS CRAM LOCATION '$CARGO_MANIFEST_DIR/test-data/datasources/cram/test_input_1_a.cram'; query I SELECT name, flag, reference, start, end, mapping_quality, cigar, mate_reference, tags."PG" FROM cram LIMIT 1; ---- r000 99 insert 50 59 30 10M insert bull statement ok DROP TABLE cram; statement ok SET exon.cram_parse_tags = false; statement ok CREATE EXTERNAL TABLE cram STORED AS CRAM LOCATION '$CARGO_MANIFEST_DIR/test-data/datasources/cram/test_input_1_a.cram'; query I SELECT name, flag, reference, start, end, mapping_quality, cigar, mate_reference, tags FROM cram LIMIT 1; ---- r000 99 insert 50 59 30 10M insert [{tag: PG, value: bull}] statement ok DROP TABLE cram; statement ok CREATE EXTERNAL TABLE cram STORED AS CRAM OPTIONS (fasta_reference '$CARGO_MANIFEST_DIR/test-data/datasources/cram/ce.fa') LOCATION '$CARGO_MANIFEST_DIR/test-data/datasources/cram/0500_mapped.cram'; query I SELECT name, flag, reference, start, end FROM cram LIMIT 1; ---- match 99 CHROMOSOME_I 1000 1099 statement ok DROP TABLE cram; statement ok CREATE EXTERNAL TABLE cram STORED AS CRAM OPTIONS (fasta_reference '/does/not/exist') LOCATION '$CARGO_MANIFEST_DIR/test-data/datasources/cram/0500_mapped.cram'; statement error SELECT * FROM cram; statement ok DROP TABLE cram; statement ok CREATE EXTERNAL TABLE cram STORED AS CRAM OPTIONS (fasta_reference '$CARGO_MANIFEST_DIR/test-data/datasources/two-cram/rand1k.fa', indexed 'true') LOCATION '$CARGO_MANIFEST_DIR/test-data/datasources/two-cram/twolib.sorted.cram'; query I SELECT * FROM cram WHERE cram_region_filter('rand1k', reference) = true LIMIT 1; ---- read1-1 0 rand1k 1 60 60 60M NULL TCCTAATTCTGGGTAACCGCCGCCTGAAGCCAAAAAATAAGCCGGAGCCAAGGGGGAGTC [] [{tag: AS, value: 60}, {tag: XS, value: 0}] statement ok DROP TABLE cram;