Skip to contents

Returns the package-bundled function catalog generated from the top-level functions.yaml manifest in the duckhts repository.

Usage

rduckhts_functions(category = NULL, kind = NULL)

Arguments

category

Optional function category filter.

kind

Optional function kind filter such as "scalar", "table", or "table_macro".

Value

A data frame describing the extension functions, including the DuckDB function name, kind, category, signature, return type, optional R helper wrapper, short description, and example SQL.

Examples

catalog <- rduckhts_functions()
subset(catalog, category == "Sequence UDFs", select = c("name", "description"))
#>                name
#> 140     seq_revcomp
#> 141   seq_canonical
#> 142   seq_hash_2bit
#> 143 seq_encode_4bit
#> 144 seq_decode_4bit
#> 145  seq_gc_content
#> 146       seq_kmers
#>                                                                                                                                                                                                                                                                                                                                                                                                             description
#> 140 Compute the reverse complement of a DNA sequence using A, C, G, T, and N bases. Overloaded: accepts either a VARCHAR text sequence (returns VARCHAR) or a UTINYINT[] of htslib nt16 codes as produced by read_bam(sequence_encoding := 'nt16') (returns UTINYINT[]); the nt16 overload is bit-identical to the text path after decoding, so BAM pipelines can reverse-complement without leaving the nt16 encoding.
#> 141                                          Return the lexicographically smaller of a sequence and its reverse complement. Overloaded: accepts either a VARCHAR text sequence (returns VARCHAR) or a UTINYINT[] of htslib nt16 codes as produced by read_bam(sequence_encoding := 'nt16') (returns UTINYINT[]); the nt16 overload compares by decoded base order and is bit-identical to the text path after decoding.
#> 142                                                                                                                                                                                  Encode a short DNA sequence as a 2-bit unsigned integer hash. Overloaded to also accept a UTINYINT[] of htslib nt16 codes (from read_bam(sequence_encoding := 'nt16')); non-ACGT codes yield NULL, bit-identical to the text path.
#> 143                                                                                                                                                                                                                                                                                                               Encode an IUPAC DNA sequence as a list of 4-bit base codes, preserving ambiguity symbols including N.
#> 144                                                                                                                                                                                                                                                                                                                                            Decode a list of 4-bit IUPAC DNA base codes back into a sequence string.
#> 145                                        Compute GC fraction for a DNA sequence as a value between 0 and 1. Overloaded: accepts either a VARCHAR text sequence or a UTINYINT[] of htslib nt16 codes as produced by read_bam(sequence_encoding := 'nt16'); the nt16 overload classifies codes directly and is bit-identical to the text path, so BAM pipelines can compute GC without decoding sequences back to text.
#> 146                                                                                                                                                                                                                                                                                                                                            Expand a sequence into positional k-mers with optional canonicalization.
subset(rduckhts_functions(kind = "table"), select = c("name", "r_wrapper"))
#>                               name                        r_wrapper
#> 1        duckhts_macro_definitions                                 
#> 2                duckhts_simd_info               rduckhts_simd_info
#> 3         duckhts_simd_kernel_info        rduckhts_simd_kernel_info
#> 4         duckhts_simd_set_backend        rduckhts_simd_set_backend
#> 5                         read_bcf                     rduckhts_bcf
#> 6                        read_geno                    rduckhts_geno
#> 7                 read_bcf_samples             rduckhts_bcf_samples
#> 8                         read_bam                     rduckhts_bam
#> 9                      read_pileup                  rduckhts_pileup
#> 10                      read_fasta                   rduckhts_fasta
#> 11                        read_bed                     rduckhts_bed
#> 12                       fasta_nuc               rduckhts_fasta_nuc
#> 13       duckhts_cgranges_overlaps                                 
#> 14                      read_fastq                   rduckhts_fastq
#> 15                     read_bigwig                  rduckhts_bigwig
#> 16     duckhts_somalier_bam_counts     rduckhts_somalier_bam_counts
#> 17         detect_quality_encoding rduckhts_detect_quality_encoding
#> 18                        read_gff                     rduckhts_gff
#> 19                        read_gtf                     rduckhts_gtf
#> 20                    read_genbank                 rduckhts_genbank
#> 21                genbank_to_fasta        rduckhts_genbank_to_fasta
#> 22                      read_tabix                   rduckhts_tabix
#> 23                     fasta_index             rduckhts_fasta_index
#> 24                           bgzip                   rduckhts_bgzip
#> 25                         bgunzip                 rduckhts_bgunzip
#> 26                       bam_index               rduckhts_bam_index
#> 27                       bcf_index               rduckhts_bcf_index
#> 28                     tabix_index             rduckhts_tabix_index
#> 29  duckhts_bam_insert_size_counts  rduckhts_bam_insert_size_counts
#> 30                  bam_bin_counts          rduckhts_bam_bin_counts
#> 31     duckhts_bam_mismatch_counts     rduckhts_bam_mismatch_counts
#> 32 duckhts_bam_mate_overlap_counts rduckhts_bam_mate_overlap_counts
#> 33        duckhts_bam_bed_coverage        rduckhts_bam_bed_coverage
#> 34                duckhts_mosdepth                rduckhts_mosdepth
#> 35       duckhts_samtools_idxstats       rduckhts_samtools_idxstats
#> 36                 read_hts_header              rduckhts_hts_header
#> 37                  read_hts_index               rduckhts_hts_index
#> 38            read_hts_index_spans         rduckhts_hts_index_spans
#> 39                  bcftools_score                   rduckhts_score
#> 40                       seq_kmers