seqhash: Individually hash biological sequences

Description Usage Arguments Value

View source: R/tzara.R

Description

Individually hash biological sequences

Usage

1
2
3
4
5
6
7
seqhash(seq, algo = "xxhash32", len = NA, preserve_na = TRUE)

## S3 method for class 'character'
seqhash(seq, algo = "xxhash32", len = NA, preserve_na = TRUE)

## S3 method for class 'XStringSet'
seqhash(seq, algo = "xxhash32", len = NA, preserve_na = TRUE)

Arguments

seq

(character or XStringSet-class) the sequences to hash.

algo

(character) a hash algorithm supported by digest. default: "xxhash32"

len

(integer) number of characters to keep from each hash string. NA (the default) to keep all characters.

preserve_na

(logical) If TRUE, NA values in seq are preserved as NA in the output. If FALSE, then NA is passed to digest, which results in a valid hash.

Value

a character vector of the same length as seq, with the hashed sequences.


brendanf/tzara documentation built on March 11, 2021, 5:40 a.m.