cuSBF
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Enumerations | Functions
Fastx.hpp File Reference
#include <algorithm>
#include <concepts>
#include <cstdint>
#include <filesystem>
#include <format>
#include <fstream>
#include <istream>
#include <memory>
#include <span>
#include <stdexcept>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <cusbf/error.hpp>
#include <cusbf/gzstreambuf.hpp>
Include dependency graph for Fastx.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cusbf::RecordRange
 Ordered non-overlapping byte range for one record inside a dense sequence batch. More...
 
struct  cusbf::RecordBatchView
 Dense host-resident sequence batch plus explicit record boundaries. More...
 
class  cusbf::DenseRecordBatchBuilder
 Accumulates parsed FASTX records into a dense RecordBatchView. More...
 
struct  cusbf::RecordQueryView
 Per-record query payload emitted by query_record_batch(). More...
 
struct  cusbf::FastxInsertReport
 Summary statistics returned by Filter insert operations on FASTX and record-batch input. More...
 
struct  cusbf::FastxQueryReport
 Summary statistics returned by Filter query operations on FASTX and record-batch input. More...
 
struct  cusbf::FastxRecordView
 Per-record query payload emitted by FASTX streaming query APIs. More...
 
struct  cusbf::FastxDetailedQueryRecord
 Detailed per-record query results returned by Filter FASTX detail APIs. More...
 
struct  cusbf::FastxDetailedQueryReport
 Aggregate and per-record results returned by Filter FASTX detail APIs. More...
 
struct  cusbf::detail::FastxRecord
 A single sequence record extracted from a FASTA/FASTQ stream. More...
 
class  cusbf::detail::FastxReader
 Streaming FASTA/FASTQ parser. More...
 

Namespaces

namespace  cusbf
 
namespace  cusbf::detail
 

Concepts

concept  cusbf::RecordQueryConsumer
 Callable invoked once per record by Filter::query_record_batch overloads that take a callback.
 
concept  cusbf::FastxRecordConsumer
 Callable invoked once per record by Filter::query_fastx_records and related FASTX streaming query APIs.
 

Enumerations

enum class  cusbf::detail::FastxFormat : uint8_t { cusbf::detail::unknown , cusbf::detail::fasta , cusbf::detail::fastq }
 Detected file format for a FASTA/FASTQ stream. More...
 

Functions

void cusbf::detail::trimTrailingCarriageReturn (std::string &line)
 Removes a trailing carriage return from line if present (Windows line endings).
 
uint32_t cusbf::detail::fastx_column_at (std::string_view line, size_t byte_index)
 1-based column at byte_index within line (clamped to the line end).
 
uint32_t cusbf::detail::fastx_quality_excess_column (uint64_t quality_length, uint64_t expected_length, std::string_view line)
 1-based column of the first quality byte that exceeds expected_length.
 
uint32_t cusbf::detail::fastx_quality_short_column (std::string_view line)
 1-based column where a quality run ends too short (position after the last byte).
 
Result< std::unique_ptr< std::istream > > cusbf::detail::openFastxFile (const std::filesystem::path &path)
 Opens a FASTA/FASTQ file for reading.