control substitution on statement ok CREATE TABLE dna_sequences(sequence TEXT) AS VALUES ('ATCG'), ('AAA') ; query I SELECT reverse_complement(sequence) FROM dna_sequences ---- CGAT TTT query I SELECT reverse_complement('ATCG') ---- CGAT query I SELECT reverse_complement('atcg') ---- cgat statement ok DROP TABLE dna_sequences; query I SELECT trim_polya('ATCGAAAA') ---- ATCG query I SELECT trim_polya('atcgaaaa') ---- atcg query I SELECT length(trim_polya('ATCGAAAA')) ---- 4 query I SELECT length(trim_polya('AAAA')) ---- 0 statement ok CREATE TABLE dna_sequences(s1 TEXT, s2 TEXT) AS VALUES ('ATCG', 'ATCG'), ('AAA', 'ATCG'); query I SELECT length(trim_polya(s1)) FROM dna_sequences ---- 4 0 query I SELECT alignment_score('ATCG', 'ATCG') ---- 4 query I SELECT alignment_score('ATCG', 'AG') ---- 1 query I SELECT alignment_score('ATCG', 'ATCGG') ---- 4 query I SELECT alignment_score(s1, s2) score FROM dna_sequences ---- 4 1 statement error SELECT alignment_score('A', 'T', 'hi') query I SELECT locate_regex('agctggagctacc', 'agc') ---- [{start: 1, end: 4, match: agc}, {start: 7, end: 10, match: agc}] query I SELECT locate_regex('agctggagctacc', 'a[atcg]c') ---- [{start: 1, end: 4, match: agc}, {start: 7, end: 10, match: agc}, {start: 11, end: 14, match: acc}] query I SELECT locate_regex(s1, 'A[TCG]C') FROM dna_sequences ---- [{start: 1, end: 4, match: ATC}] [] statement error Execution error: locate_regex takes different types of arguments, the a sequence and a pattern SELECT locate_regex('A[TCG]C', s1) FROM dna_sequences statement ok DROP TABLE dna_sequences; query I SELECT s1, integer_encoding(s1, 'ATCG') FROM (SELECT 'ATCG' s1 UNION ALL SELECT 'AAAA') t ORDER BY s1 ---- AAAA [0, 0, 0, 0] ATCG [0, 1, 2, 3]