-
Notifications
You must be signed in to change notification settings - Fork 0
Multiple Kmer Lookup
Adam Taranto edited this page Sep 23, 2024
·
3 revisions
This section describes how to look up multiple k-mers at once.
# create table
kct = oxli.KmerCountTable(ksize=3)
# Count some k-mers
kct.count('AAA')
kct.count('AAA')
kct.count('AAG')
# Check the hashes for our kmers
print(f" Hash of 'AAA': {kmer_table1.hash_kmer('AAA')}") # 10679328328772601858
print(f" Hash of 'AAG': {kmer_table2.hash_kmer('AAG')}") # 12774992397053849803
# Get counts for ordered list of hash keys
kct.get_hash_array([12774992397053849803, 10679328328772601858])
# [1, 2] # Output in same order as query list
Installing Oxli
Basic Setup
For Developers
Getting Started
Getting Started
Counting Kmers
Basic Counting
Extracting from Files
Handling Bad Kmers
Looking up Counts
Single Kmer Lookup
Multiple Kmer Lookup
Removing Records Remove Kmers Abundance Filtering
Exploring Count Tables
Iterating Records
Attributes
Set Operations
Basic SetOps
Exporting Data
Histo: Export Frequency Counts
Dump: Write Hash:Count Pairs
Save and Load KmerCountTables