sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
a8191f145ca936ca130b4cec432bc375b956b50e6ced24b860dc8aea2ff97826 | C/C++ | 669 | 23 | #pragma once
#include "hts_utils/hts_types.h"
#include <utility>
struct bam1_t;
namespace dorado {
class SimplexRead;
struct AdapterScoreResult;
struct BarcodeScoreResult;
class Trimmer {
public:
static BamPtr trim_sequence(bam1_t* irecord, std::pair<int, int> interval, bool is_rna);
static void trim_seque... |
9ce27d9668990b0fb40006c08fc082d23cecc0115e07639a51766c281046e4b6 | C/C++ | 677 | 34 | #pragma once
#include "hts_utils/sequence_file_format.h"
#include <filesystem>
#include <memory>
#include <string_view>
namespace dorado::hts_io {
struct FastxRecord {
std::string_view name;
std::string_view comment;
std::string_view seq;
std::string_view qual;
};
class FastxSequentialReader {
... |
53709f7eb67a0b0d4daa4bc50e04f1b9c863726f43fe4963acc37c28500959fe | C/C++ | 681 | 31 | #pragma once
#include <cstdint>
struct htsFile;
struct sam_hdr_t;
struct hts_itr_t;
struct bam1_t;
namespace dorado::secondary {
struct HtslibMpileupData {
htsFile* fp = nullptr;
sam_hdr_t* hdr = nullptr;
hts_itr_t* iter = nullptr;
int32_t min_mapq = 0;
char tag_name[2] = "";
int32_t tag_val... |
2dae16d2149151e212eb39e245924cc15a17542b39a4c3e3b51612ff06e84a49 | C/C++ | 683 | 34 | #pragma once
#include "hts_writer/HtsFileWriter.h"
#include <memory>
namespace dorado {
namespace utils {
class HtsFile;
}
namespace hts_writer {
using OutputMode = utils::HtsFile::OutputMode;
class StreamHtsFileWriter : public HtsFileWriter {
public:
StreamHtsFileWriter(const HtsFileWriterConfig & cfg);
... |
15d9359b80b7ed1023205039e39402b89791c00af9ed406d366fc6ad75eb192d | C/C++ | 686 | 28 | #pragma once
#include "CorrectionAligner.h"
#include "utils/stats.h"
namespace dorado {
class Pipeline;
class CorrectionAligner {
public:
virtual ~CorrectionAligner() = default;
virtual std::string get_name() const = 0;
virtual stats::NamedStats sample_stats() const = 0;
// Main driver function.
... |
8f49c231a2a5c46f2ae1af233d6bd14e84012af9a2feb96ae5ee7a4c71671390 | C/C++ | 686 | 29 | #pragma once
#include "config/BasecallModelConfig.h"
#include "read_pipeline/base/MessageSink.h"
#include <string>
namespace dorado {
class ScalerNode : public MessageSink {
public:
ScalerNode(const config::SignalNormalisationParams& config,
models::SampleType model_type,
int num_w... |
3e75b7516e5229bab80c2be75f43648fe372dc06247a8770b38c184ccd92a076 | C/C++ | 720 | 30 | #pragma once
#include "CorrectionAligner.h"
#include "utils/stats.h"
#include <string>
#include <string_view>
#include <unordered_set>
namespace dorado {
class Pipeline;
class CorrectionPafReader : public CorrectionAligner {
public:
CorrectionPafReader(std::string_view paf_file, std::unordered_set<std::string>... |
8b021f39156292abbde02703462ca7b618ccab87f1c5e0bf77ab5fb6a7f3c125 | C/C++ | 722 | 23 | #pragma once
#include "utils/stats.h"
#include <cstddef>
namespace dorado::alignment {
// Set a limit on the amount of memory that minimap2 can use.
//
// This should be called at most once per process, and only during
// initialisation since it's not thread safe.
//
// Note that this only limits concurrent runtime... |
001ef3b4056d4d897f2a6a4c76089c303045c71a358694dd32d5ef2f35c7918a | C/C++ | 728 | 23 | #pragma once
#include "basecall/MetalCaller.h"
namespace dorado::basecall {
struct MetalCaller::NNTask {
NNTask(at::Tensor *input_, int num_chunks_, std::vector<decode::DecodedChunk> *out_chunks_)
: input(input_), out_chunks(out_chunks_), num_chunks(num_chunks_) {}
// LSTM: NTC - Tx: NCT
at:... |
32262c172fd1d45fef445137fedc839db32a66c35ac1b929d23cfdff920a9457 | C/C++ | 734 | 34 | #pragma once
#include "SimpleProgressBar.h"
#include "utils/stats.h"
#include <cstdint>
#include <string>
namespace dorado {
// Collect and calculate progress related
// statistics for error correction.
class CorrectionProgressTracker {
public:
CorrectionProgressTracker();
~CorrectionProgressTracker();
... |
06787a66362ff7bfa536d789c625128d293642a5048ddf788b9f8a571ad5273b | C/C++ | 742 | 32 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <atomic>
#include <cstdint>
namespace dorado {
class StereoDuplexEncoderNode : public MessageSink {
public:
StereoDuplexEncoderNode(int input_signal_stride);
~StereoDuplexEncoderNode();
std::string get_name() const override;
stats::N... |
f46226087698d7a34fb623154bc2ab77141b7245e133a2cd1c057fb427717a9d | C/C++ | 762 | 37 | //
// Created by berry on 2020-10-09.
//
#ifndef SOAPNUKE_BLOOMFILTER_H
#define SOAPNUKE_BLOOMFILTER_H
#include<string>
#include<bitset>
#include<iostream>
#include<math.h>
#include<string.h>
using namespace::std;
#define maxBfSize 1024L*1024*1024*200
class BloomFilter {
private:
int multiple;
int hashNum;
... |
eb015fbb621998e54aa4f7a525cce2a86363d5820906915020799052b5d46b39 | C/C++ | 763 | 37 | #pragma once
#include "utils/stats.h"
#include <cstdint>
#include <mutex>
#include <string>
namespace dorado::secondary {
class Stats {
public:
Stats() = default;
void increment(const std::string& name) {
std::unique_lock<std::mutex> lock(m_mtx);
m_stats[name] += 1.0;
}
void add(co... |
153889e82feb872ae22ec1be8252917af997c54b1a45c43e9d6dde12793430b7 | C/C++ | 771 | 30 | #pragma once
#include "SpeedEntry.h"
#include <algorithm>
#include <span>
#include <string_view>
namespace dorado::batchsize_benchmarks::compiled_cache {
struct ModelTimings {
std::string_view model_name;
std::span<const SpeedEntry> entries;
};
struct GPUModelTimings {
std::string_view gpu_name;
st... |
79cbb111cd12ee302138485f35b7c760874bfbbe4743a9ae5a909237b9556a77 | C/C++ | 779 | 25 | #pragma once
#include "Decoder.h"
#include <ATen/core/TensorBody.h>
namespace dorado::basecall::decode {
class CUDADecoder final : public Decoder {
public:
explicit CUDADecoder(float score_clamp_val) : m_score_clamp_val(score_clamp_val) {}
// We split beam_search into two parts, the first one running on th... |
c7d7c38b1e362da20abc0e3284ac1226406923b9953ea5371f2c009ebdd164e2 | C/C++ | 794 | 26 | #ifndef CONFIGPARAMMANAGER_H
#define CONFIGPARAMMANAGER_H
#include <QStringList>
class ConfigParamManager
{
public:
ConfigParamManager();
static QStringList getFrequencyItemList(void);
static QStringList getVoltageItemList(void);
static QStringList getWaveTypeItemL... |
f47ad1eb29330dc7961dcc499be4cabe5cc1a0279afc879201183948420f214d | C/C++ | 795 | 32 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <string>
#include <unordered_map>
#include <unordered_set>
namespace dorado {
/// Class to correctly tag the duplex
/// and simplex reads based on, post filtering,
/// whether a simplex read is a parent of a duplex
/// read or not.
class DuplexReadTa... |
dc8d48282b1bd0fca07fc4330d18e07f36ea7c46b4bccd5d7e69570687a03baf | C/C++ | 800 | 32 | #pragma once
#include "hts_utils/hts_types.h"
#include <array>
#include <string>
#include <unordered_map>
struct sam_hdr_t;
namespace dorado {
class HtsData;
using AlignmentCounts = std::unordered_map<std::string, std::array<int, 3>>;
class ReadInitialiser {
public:
ReadInitialiser(sam_hdr_t* hdr, AlignmentCo... |
c68af04bd860706d0020cb7072763dd7ab043438deccc7c9299aba436269a7c4 | C/C++ | 812 | 33 | #pragma once
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable : 4200) // nonstandard extension used: zero-sized array in struct/union
#endif
#include <minimap.h>
#ifdef _WIN32
#pragma warning(pop)
#endif
// Helper structs allowing the types to be forward declared
// minimap uses typedefs to anonymous stru... |
7692d7ad0aea44476ecfc46023da04fe979f3781e06f0a75980d9547b43d25d5 | C/C++ | 825 | 26 | #pragma once
#include "utils/barcode_kits.h"
#include <optional>
#include <string>
namespace dorado::demux {
std::pair<std::string, barcode_kits::KitInfo> parse_custom_arrangement(
const std::string& arrangement_file);
barcode_kits::BarcodeKitScoringParams parse_scoring_params(
const std::string& a... |
d327c2505a79997403264d2f29d4ad619e6029ec64166de6ec07e3fb78795f59 | C/C++ | 825 | 34 | #pragma once
#include <cstdint>
namespace kadayashi {
constexpr int32_t BBF_BLOCK_SHIFT = 9;
constexpr uint64_t BBF_BLOCK_MASK = (1ULL << BBF_BLOCK_SHIFT) - 1;
class BlockedBloomFilter {
public:
BlockedBloomFilter(int n_hashes, int n_blocks_bits);
~BlockedBloomFilter();
bool enable();
bool insert(u... |
4fa75e05448689ccb28eee043fa8278d539f7d703d1a78af630e9828393d65c0 | C/C++ | 864 | 34 | #pragma once
#include "hts_writer/HtsFileWriter.h"
#include "hts_writer/Structure.h"
#include <memory>
#include <unordered_map>
namespace dorado {
namespace hts_writer {
class StructuredHtsFileWriter : public HtsFileWriter {
public:
StructuredHtsFileWriter(const HtsFileWriterConfig& cfg,
... |
c067a449acdb85c4837afc0b7d9e8ca1e1fdae7e90d77099157e4728c27813fe | C/C++ | 873 | 33 | //
// Created by berry on 2020-07-14.
//
#ifndef SOAPNUKE_PROCESSSTLFR_H
#define SOAPNUKE_PROCESSSTLFR_H
#include<map>
#include "peprocess.h"
#include "BloomFilter.h"
class processStLFR: public peProcess{
// void process();
public:
explicit processStLFR(C_global_parameter m_gp);
// void filter_pe_fqs(PEc... |
2c348887b9f30f16cae6d43a5b2acbbba2126d528a059707b8899167aed2e66a | C/C++ | 874 | 24 | #pragma once
#include "SpeedEntry.h"
#include <algorithm>
#include <span>
namespace dorado::batchsize_benchmarks::tests {
// SpeedEntry shouldn't need an equality check outside of the tests, so implement that here.
inline bool entries_equal(std::span<const SpeedEntry> lhs, std::span<const SpeedEntry> rhs) {
cons... |
5bb91e0bbf03a581d061fa47e7b2f750174b5f5b80b5aa4cf7320a4f963ea0ce | C/C++ | 878 | 24 | #pragma once
#include <cstdint>
#include <filesystem>
#include <string>
#include <unordered_map>
namespace dorado::secondary {
/**
* \brief Parses a Kadayashi binary file with phasing information.
* The file structure has a lookup table and allows for random access to a specified region.
* \param in_hapl... |
2e5c9ba06aaedadcef8feec5221c8224ef36a7f73e70d26ec646a4fe3e5ee848 | C/C++ | 880 | 29 | #pragma once
#include <cstdint>
#include <filesystem>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
namespace dorado::secondary {
struct BamInfo {
bool uses_dorado_aligner = false;
bool has_dwells = false;
std::unordered_set<std::string> read_groups;
std::unordered_s... |
2106d33b1da75e16d52ef7b0db40140861e8e0a699a88fe63753f96ed7aa9f1a | C/C++ | 891 | 36 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
namespace dorado {
class ReadToBamTypeNode : public MessageSink {
public:
ReadToBamTypeNode(bool emit_moves,
size_t num_worker_threads,
... |
22af9c4e82a17d26e998a383fedb367d0c23deb2e7316579cb8958f92071e312 | C/C++ | 895 | 33 | #pragma once
#include <optional>
#include <string>
namespace argparse {
class ArgumentParser;
}
namespace dorado::cli {
struct EmitArgs {
bool bam{false};
bool sam{false};
bool cram{false};
bool fastq{false};
bool moves{false};
bool summary{false};
};
EmitArgs get_emit_args(const argparse::... |
3d9eec19cedad6570674cca5b329a3b91075ab38da14eee42ac1a1c13d8db500 | C/C++ | 919 | 21 | #include <cstddef>
#include <cstdint>
#include <vector>
namespace dorado::modbase {
std::vector<int8_t> encode_kmer_context(const std::vector<int>& seq,
const std::vector<uint64_t>& seq_mappings,
size_t bases_before,
... |
d06fa015c84ab86a314fdd97022da2ee118dc563e51a9385a3a1c683acdde4e0 | C/C++ | 922 | 40 | #pragma once
#include <filesystem>
#include <memory>
#include <string>
#include <vector>
struct faidx_t;
namespace dorado::hts_io {
struct FaidxDestructor {
void operator()(faidx_t*);
};
using FaidxPtr = std::unique_ptr<faidx_t, FaidxDestructor>;
// Class to wrap reading randomly from a FASTx
// file using an... |
1f995fa529402b6f493249dd43b9f31377b5ff2a9eb9104e2f7c9c65b64b0744 | C/C++ | 934 | 37 | #pragma once
#include "demux/AdapterDetectorSelector.h"
#include "read_pipeline/base/MessageSink.h"
#include <atomic>
#include <memory>
#include <string>
namespace dorado {
namespace demux {
struct AdapterInfo;
}
class AdapterDetectorNode : public MessageSink {
public:
AdapterDetectorNode(int threads);
~Ad... |
be929096b639d909c1d1e2c5d21282fa6737d59c2e5e4341056964b6da2aa136 | C/C++ | 940 | 38 | #pragma once
#include <cstdint>
#include <functional>
#include <tuple>
#include <vector>
namespace dorado {
template <typename T, typename Compare>
std::vector<std::tuple<int64_t, int64_t, T>> run_length_encode(const std::vector<T> &data,
Compare &&comp)... |
66af849ef8aef1bb8fdeb13471430864268fef06b29759606534285c391e6818 | C/C++ | 941 | 36 | #pragma once
#include "basecall/DecodedChunk.h"
#include "nn/AuxiliaryData.h"
#include <ATen/core/TensorBody.h>
#include <memory>
#include <vector>
namespace dorado::config {
struct BasecallModelConfig;
}
namespace dorado::basecall::decode {
struct DecodeData {
at::Tensor data;
int num_chunks;
Decoder... |
5d43206b6728962f69356519a1fe3116c00aeaf6aa8d2b896c9a7b1ec4ad06eb | C/C++ | 943 | 36 | #pragma once
#include "secondary/architectures/model_torch_base.h"
#include <ATen/ATen.h>
#include <torch/nn/modules/linear.h>
#include <torch/nn/modules/rnn.h>
#include <cstdint>
namespace dorado::secondary {
class ModelGRU : public ModelTorchBase {
public:
ModelGRU(const MustConstructWithFactory& ctor_tag,
... |
e479965527e72fb8a0bed550fa79c95b9a603fe29d5cb088669c1c8a6a439369 | C/C++ | 943 | 23 | #pragma once
#include "types.h"
#include <cstdint>
#include <unordered_map>
#include <vector>
namespace kadayashi {
bool variant_graph_gen(chunk_t &ck);
void variant_graph_propogate(chunk_t &ck);
bool variant_graph_check_if_phasing_succeeded(const chunk_t &ck);
void variant_graph_haptag_reads(chunk_t &ck);
void vari... |
e861bee994eca3456fe50a99f83a5c6bd158de96cf1385e4b643c49b9befb030 | C/C++ | 949 | 38 | #ifndef __MY_NM_H__
#define __MY_NM_H__
#include <stdbool.h>
#define INPUT_MATRIX_MAX_COL 20
#define INPUT_MATRIX_MAX_ROW 400
#define INPUT_TRAIN_LENGTH (6)
#define PREDICT_LENGTH (3)
#define DYNAMICS_ROW (200)
#if (0 < (INPUT_TRAIN_LENGTH - 3 * PREDICT_LENGTH))
#error "param error"
#else
#define... |
ccf64e277a6e4d483adc0b73ce40aa5eef1c3de548a97f1891b60aa5f3991c71 | C/C++ | 964 | 31 | #pragma once
#include <cstdint>
#include <string>
#include <string_view>
namespace kadayashi {
bool stoi_catch(int &dest, const char *s);
bool stod_catch(double &dest, const char *s);
/**
* @brief Construct a htslib-style region string (1-index, inclusive–inclusive)
* from 0-index, inclusive-exclusive coor... |
f3bf292da1645896ae4c05064a102ba264ea8b40c77958a4dccf0ba18a9b5e14 | C/C++ | 972 | 34 | #pragma once
#include "nn/MetalModules.h"
#include <torch/nn.h>
#include <vector>
namespace dorado::config {
struct BasecallModelConfig;
}
namespace dorado::basecall::model {
struct MetalCRFModelImpl : torch::nn::Module {
MetalCRFModelImpl(const config::BasecallModelConfig &config,
int c... |
d575cf2e5e7733282290b041d7d6b1886662c375b7bd973c9a9556d57a6b3784 | C/C++ | 974 | 39 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <atomic>
#include <memory>
#include <string>
namespace dorado {
namespace splitter {
class ReadSplitter;
}
class ReadSplitNode : public MessageSink {
public:
ReadSplitNode(std::unique_ptr<const splitter::ReadSplitter> splitter,
... |
617df594b3f6d1c684c9fbde87f49c7410dead099c7ccd5f5e29cd5dff2632bb | C/C++ | 975 | 49 | #ifndef HARDWARETHREAD_H
#define HARDWARETHREAD_H
#include "configparam.h"
#include <QThread>
#include <QList>
#include <QSerialPort>
class HardwareThread : public QThread
{
Q_OBJECT
public:
HardwareThread();
void setConfigParam(ConfigParam &);
void stop();
protected:
v... |
dc72a6ab102e385ee7a5ddc53d1216885ed428ac0679194cb858ef9d16063ec8 | C/C++ | 976 | 39 | #pragma once
#include "models/models.h"
#include <filesystem>
#include <iosfwd>
#include <optional>
#include <vector>
namespace dorado::model_resolution {
bool check_model_path(const std::filesystem::path& model_path);
struct ModelSource {
std::filesystem::path path;
std::optional<models::ModelInfo> info;
... |
f55a962ebfee6432dd9d5fa1070bcc9541cb17e835fddb88a5a0ee3126c69b7b | C/C++ | 976 | 26 | #pragma once
#include <string>
namespace dorado::utils {
/**
* @brief Generates a derived UUID from a given input UUID and a description string.
*
* This function takes an input UUID and a description string, concatenates them, and creates a new
* UUID based on their SHA-256 hash. The resulting UUID has a versio... |
549c0cf7e8a2e49aa4d6738e1ae42a2b8d81e2ff4facaa1f46b2999bfdc131d7 | C/C++ | 982 | 44 | #pragma once
#include <istream>
#include <map>
#include <string>
#include <vector>
namespace dorado::alignment {
class BedFile {
public:
struct Entry {
std::string bed_line{};
size_t start{};
size_t end{};
char strand{'.'};
};
using Entries = std::vector<Entry>;
BedF... |
21fe86a4490dc634415799c17d25aca7e7e5a97dddb59078b495d79c4688c0d8 | C/C++ | 988 | 37 | #pragma once
#include "hts_utils/HeaderMapper.h"
#include "read_pipeline/base/MessageSink.h"
#include <cstddef>
#include <memory>
#include <string>
namespace dorado {
namespace hts_writer {
class IWriter;
}
class WriterNode : public MessageSink {
public:
WriterNode(std::vector<std::unique_ptr<hts_writer::IWrit... |
5b259763f091f70da52bc53028ed3212c4ebb0781f3c075230608f7a45c67206 | C/C++ | 996 | 40 | #ifndef BWTGAP_H_
#define BWTGAP_H_
#include "bwt.h"
#include "bwtaln.h"
typedef struct { // recursion stack
uint32_t info; // score<<21 | i
uint32_t n_mm:8, n_gapo:8, n_gape:8, state:2, n_seed_mm:6;
uint32_t n_ins:16, n_del:16;
int last_diff_pos;
bwtint_t k, l; // (k,l) is the SA region of [i,n-1]
} gap_entry_t... |
566fa866eb36a6000c17f310b3e7dec1a550431b8cfa4890f3dd247e3cbf5527 | C/C++ | 1,001 | 45 | #pragma once
#include "basecall/ModelRunnerBase.h"
#include <filesystem>
#include <memory>
#include <string>
#include <vector>
namespace dorado::basecall {
#if DORADO_CUDA_BUILD
class CudaCaller;
#elif DORADO_METAL_BUILD
class MetalCaller;
#endif
} // namespace dorado::basecall
namespace dorado::modbase {
class ... |
62042a81e951cd5f3bad40fb35427fb6be07de2eff02fcae7da0fe902ad807b1 | C/C++ | 1,017 | 42 | #pragma once
#include "LinearLayer.h"
#include <torch/nn.h>
#include <vector>
namespace dorado::nn {
struct FactorisedLinearLayerImpl : LinearLayerImpl {
FactorisedLinearLayerImpl(int C_in, int K, int C_out);
at::Tensor forward(at::Tensor x) override;
#if DORADO_CUDA_BUILD
virtual void reserve_workin... |
3836f82e86151868decafe19c27075cb55723e79c9971afb48ad58dfb6702e38 | C/C++ | 1,019 | 27 | #pragma once
#include <cstdint>
#include <iosfwd>
#include <string>
namespace dorado::secondary {
// clang-format off
struct Window {
int32_t seq_id = -1; // ID of the sequence from which the window was sampled.
int64_t seq_length = 0; // Length of the sequence where the window was sampled... |
c2bfd56d508ab696cbd434744cb6b5d2d37c91bb56a556142a742ec5c24dd97b | C/C++ | 1,019 | 37 | #pragma once
#include <cstdint>
#include <filesystem>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace dorado::secondary {
struct ModelConfig {
int32_t version = 0;
std::unordered_set<std::string> supported_basecallers{};
int32_t chunk_size = 0;
int32_t ... |
c32bbb631c6963d800f53f202ede5e825e827931b521b93ec7f66c0c80a05a83 | C/C++ | 1,033 | 27 | #pragma once
#include "sample.h"
#include <cstdint>
#include <vector>
namespace dorado::secondary {
/**
* \brief Given an existing vector of samples (a batch), this function
* computes the shape of the would-be batch tensor if samples were collated.
* The shape assumes padding in all dimensions... |
dc86d7ac6f49dcbffc5eea2eda083c0b985acadd7d369cb77ba2ecf9264c49cb | C/C++ | 1,033 | 29 | #ifndef BWASE_H
#define BWASE_H
#include "bntseq.h"
#include "bwt.h"
#include "bwtaln.h"
#ifdef __cplusplus
extern "C" {
#endif
// Initialize mapping tables in the bwa single-end mapper.
void bwase_initialize();
// Calculate the approximate position of the sequence from the specified bwt with loaded suffix array.... |
a7f7b98a5667e7d6dbacc56f052308bce8b09f3793024d228a32106a21f096c0 | C/C++ | 1,035 | 39 | #pragma once
#include "AuxiliaryData.h"
#include "LinearLayer.h"
#include "WorkingMemory.h"
#include <torch/nn.h>
#include <memory>
namespace dorado::nn {
struct LinearCRFImpl : LinearLayerImpl {
LinearCRFImpl(int insize, int outsize, bool bias_, bool tanh_and_scale);
at::Tensor forward(at::Tensor x) overr... |
017ccce60561de8ed3ff9b242e3bdc23050d9e656e5d5546eabcd709bdfe10ad | C/C++ | 1,042 | 43 |
#pragma once
#include <cstdint>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
struct sam_hdr_t;
struct hts_md5_context;
namespace dorado::utils {
using MD5Hex = char[33];
// SAM SQ Header with optional UR and M5 tags
struct HeaderSQRecord {
std::string sequence_name; ... |
1cca6f506ddf3b94c436e7994c5d78ac6f42cc1b0705690b64f776d312283f34 | C/C++ | 1,042 | 41 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <optional>
namespace dorado::batchsize_benchmarks {
class BenchmarkSink final : public MessageSink {
using Clock = std::chrono::steady_clock;
public:
BenchmarkSink();
~Benc... |
4b5b48433d0adb07782d9b18c944203664f272037445fed21ac8a61ffacab630 | C/C++ | 1,046 | 36 | #pragma once
#include "ReadSplitter.h"
#include <functional>
#include <string>
#include <vector>
namespace dorado::splitter {
class RNAReadSplitter : public ReadSplitter {
public:
RNAReadSplitter(RNASplitSettings settings);
std::vector<SimplexReadPtr> split(SimplexReadPtr init_read) const override;
private... |
2964ec4f7bac4ef8bad55fa639acd2720e9a4e0e6ab36ad6cce5fa83b46a7362 | C/C++ | 1,057 | 38 | #pragma once
#include "ReadCommon.h"
#include <cstdint>
#include <limits>
#include <memory>
#include <string>
namespace dorado {
// Class representing a duplex read, including stereo-encoded raw data
class DuplexRead {
public:
// Data used to generate the stereo features in read_common.raw_data.
class Stere... |
0746e20fd10bc072acf5ffad67944bdd5470cd842886e7be2832030f4285a2c8 | C/C++ | 1,061 | 27 | #pragma once
#include <cstdint>
#include <ctime>
#include <string>
namespace dorado::utils {
// Get a formatted datetime from ms since unix epoch. This effectively converts pod5 start time
// to MinKnow formatted datetimes as "YYYYMMDD_hhmm"
std::string get_minknow_timestamp_from_unix_time_ms(int64_t time_stamp_ms);... |
245ca0fea90324675a827b9bdb371d22daecf1743883d862d5ac9b55fe9e6fe7 | C/C++ | 1,064 | 39 | #pragma once
#include "nn/AuxiliaryData.h"
#include "nn/CRFModules.h"
#include "nn/ConvStack.h"
#include "nn/RNNStack.h"
#include <torch/nn.h>
#include <vector>
namespace dorado::config {
struct BasecallModelConfig;
}
namespace dorado::basecall::model {
struct CRFModelImpl : torch::nn::Module {
explicit CRFMo... |
2cd6889df3e133fb1364500fd7f7f709e196c773b738ca7eb09fa44ffa7f002d | C/C++ | 1,065 | 40 | #pragma once
#include <set>
#include <string>
#include <vector>
struct sam_hdr_t;
namespace dorado {
namespace utils {
enum HeaderLineType {
CO, // One-line text comment
HD, // File-level metadata. Optional.
PG, // Program
RG, // Read group
SQ, // Reference sequence... |
f6f48e51885fb36237857b900bc572573e30c3572ebd5e3ad0e8aa9762aa0c16 | C/C++ | 1,069 | 33 | #pragma once
#include <optional>
#include <string>
#include <vector>
namespace dorado::demux {
/// This enum allows for specification of extended primer detection and handling.
enum class PrimerAux {
DEFAULT, ///< Indicates that standard primers for the kit should be used.
GEN10X, ///< Applies to SQK-LSK1... |
291d98b757b1018532d6e8cfff6d289cbb85329ebb85a531376bcec9eb69ec43 | C/C++ | 1,072 | 41 | /*<html><pre> -<a href="qh-geom_r.htm"
>-------------------------------</a><a name="TOP">-</a>
random.h
header file for random and utility routines
see qh-geom_r.htm and random_r.c
Copyright (c) 1993-2018 The Geometry Center.
$Id: //main/2015/qhull/src/libqhull_r/random_... |
b593a7b2c59641480df8f8257975f6099d128acb03f1f05701a261ef0936af64 | C/C++ | 1,072 | 40 | #pragma once
#include "AuxiliaryData.h"
#include "RNNStack.h"
#include "WorkingMemory.h"
#include <torch/nn.h>
#include <memory>
#include <vector>
namespace dorado::nn {
struct LSTMStackImpl : RNNStackImpl {
LSTMStackImpl(int num_layers, int size, bool reverse_first);
at::Tensor forward(at::Tensor x) overr... |
822888cc33d0906299b1432330db755ab1ce0f227d319c099b1e8d83bf04755d | C/C++ | 1,086 | 46 | #pragma once
#include <memory>
struct faidx_t;
struct htsFile;
struct hts_idx_t;
struct sam_hdr_t;
struct bam1_t;
struct hts_itr_t;
typedef struct htsFile samFile;
typedef struct sam_hdr_t bam_hdr_t;
namespace kadayashi {
struct FaidxDestructor {
void operator()(faidx_t *) const noexcept;
};
using FaidxPtr = st... |
52505335d104bcf8519cbb115da4a86a7920150ea837d1b3b204052531b59ca3 | C/C++ | 1,095 | 42 | #pragma once
#include "ModelRunnerBase.h"
#include <ATen/core/TensorBody.h>
#include <atomic>
#include <cstdint>
#include <filesystem>
#include <memory>
#include <vector>
namespace dorado::config {
struct BasecallModelConfig;
}
namespace dorado::basecall {
class MetalCaller;
class MetalModelRunner final : public ... |
7fa02986cab67c6241169b58ea8184e3f6f8cd76a6c85f67df8b8cf05271ded8 | C/C++ | 1,096 | 37 | #pragma once
#include "hts_utils/hts_types.h"
#include "variant.h"
#include <cstdint>
#include <filesystem>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
namespace dorado::secondary {
class VCFWriter {
public:
/**
* \brief Opens a VCF file for writing.
* \param filters A vecto... |
011556e1428544862d17fa4e2bfa21ffd8187f8762f4520159737fea03d25932 | C/C++ | 1,100 | 43 | #ifndef PLOTDIALOG_H
#define PLOTDIALOG_H
#include <QDialog>
#include <QtCharts/QSplineSeries> // Ìæ»»£ºÑùÌõÇúÏߣ¨Æ½»¬£©
#include <QtCharts/QScatterSeries> // É¢µãϵÁУ¨ºìÉ«µã£©
#include <QtCharts/QChart>
#include <QtCharts/QValueAxis>
//class QVBoxLayout;
//class QHBoxLayout;
//class QFrame;
//class Q... |
d06cd188b3c3313e29d5a70392c11f47c37eaae5be10ea7daa3b2381c624b6e2 | C/C++ | 1,116 | 40 | #pragma once
#include <cstddef>
namespace dorado::utils {
struct DefaultParameters {
int batchsize{0};
int chunksize{10000};
int overlap{500};
int num_runners{2};
// Minimum length for a sequence to be outputted.
size_t min_sequence_length{5};
};
static const DefaultParameters default_param... |
13fe5e2ff587620023bdc74cb146a0651cd0e6cfc86b4dac862aef3b9fdd19d1 | C/C++ | 1,117 | 32 | #pragma once
#include <cstdint>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <unordered_set>
#include <vector>
namespace dorado::utils {
// Given a path to a space-delimited csv in `tempate_id complement_id` format,
// returns a map of template_id to complement_id
std::map<std::st... |
f3be48bb2513f802f4cbd0f7d2f5aee3f6f6f396036889dd5fc8493db473864a | C/C++ | 1,123 | 34 | #pragma once
#include "blocked_bloom_filter.h"
#include "types.h"
#include <cstdint>
#include <string_view>
#include <vector>
struct bam1_t;
namespace kadayashi {
extern const unsigned char md_op_table[256];
float get_tag_de_f(const bam1_t *aln);
bool to_exclude_by_flags(const bam1_t *aln, uint16_t unwanted_flags... |
9ba6e525eb102ab00bb7879024c9d71e8de4f65c4e3ec0879f09aa8cc300c07a | C/C++ | 1,133 | 44 | #pragma once
#include "nn/AuxiliaryData.h"
#include "nn/ConvStack.h"
#include "nn/LinearUpsample.h"
#include "nn/TxModules.h"
#include "torch_utils/module_utils.h"
#include <c10/core/Device.h>
#include <c10/core/TensorOptions.h>
#include <torch/nn.h>
#include <vector>
namespace dorado::config {
struct BasecallModel... |
0f3642320103cae3f5239c458ccade555075026aaf8bb52801ccdcdbeb06eebc | C/C++ | 1,153 | 44 | #pragma once
#include "hts_utils/hts_types.h"
#include "utils/cigar.h"
#include <cstdint>
#include <iosfwd>
#include <string>
#include <string_view>
#include <vector>
namespace dorado::secondary {
struct Alignment {
std::string qname;
int64_t qlen{0};
int64_t qstart{0};
int64_t qend{0};
StrandOr... |
e36883e36909534f84fe98e051030607aa4fad3b45113c04108c0f4853e8374a | C/C++ | 1,164 | 30 | #pragma once
#include "poly_tail/poly_tail_calculator.h"
namespace dorado::poly_tail {
class RNAPolyTailCalculator : public PolyTailCalculator {
public:
RNAPolyTailCalculator(PolyTailConfig config,
bool is_rna_adapter,
const PolyTailCalibrationCoeffs& calibrati... |
a34dad4dceccb1998840b8aa5bf59b471ce604f4f04ef2cc95845e6889e13939 | C/C++ | 1,167 | 35 | #pragma once
#include <spdlog/spdlog.h>
#include <filesystem>
#include <mutex>
#include <stdexcept>
namespace dorado::hts_writer {
inline void create_output_folder(const std::filesystem::path& path) {
#ifdef _WIN32
static std::once_flag long_path_warning_flag;
if (path.string().size() >= 260) {
std::... |
075eddab3e147033e87127a0d2c52288cd7482538b6f1ccfdd9b222fdf0d08a0 | C/C++ | 1,169 | 46 | #pragma once
#include "hts_utils/hts_file.h"
#include "read_pipeline/base/MessageSink.h"
#include <atomic>
#include <string>
struct bam1_t;
namespace dorado {
class HtsWriterNode : public MessageSink {
public:
HtsWriterNode(utils::HtsFile& file, std::string gpu_names);
~HtsWriterNode();
std::string get... |
d4e8f7ee2af6fa4bf5b7b16e558c0d6a59f7a87077c4dc81dbb172c1336321f6 | C/C++ | 1,172 | 37 | #pragma once
#include <cstdint>
#include <span>
#include <string>
#include <vector>
namespace dorado {
class ReadCommon;
} // namespace dorado
namespace dorado::utils {
// A single chunk
struct Chunk {
// Non-VCS granularity is chunk_size
Chunk(size_t offset, size_t chunk_size) : Chunk(offset, chunk_size, ... |
b6835999d6f4ba92926c51316704f00036c44478a1b41e803fe039cca602899b | C/C++ | 1,173 | 40 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <atomic>
#include <cstdint>
#include <string>
#include <unordered_set>
namespace dorado {
/// Class to filter reads based on some criteria.
/// Currently only supports filtering based on
/// minimum Q-score, read length and read id.
class ReadFilterN... |
b3bab706098c9000c1199a2d345deb855711a3ec9ab12b9c25c3c7057b55a922 | C/C++ | 1,176 | 36 | #pragma once
#include "utils/concurrency/AsyncExecutor.h"
#include "utils/concurrency/TaskPool.h"
#include "utils/concurrency/WorkerPool.h"
namespace dorado {
// Simple wrapper around a set of workers and tasks.
template <typename Node>
class SimpleExecutors {
utils::concurrency::WorkerPool workers;
utils::c... |
b9344ae644433f6b5975737eb5f5623bb2f0610025f4faa1e36e914745cfcdf8 | C/C++ | 1,183 | 47 | #ifndef MALLOC_WRAP_H
#define MALLOC_WRAP_H
#include <stdlib.h> /* Avoid breaking the usual definitions */
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
void *wrap_calloc(size_t nmemb, size_t size,
const char *file, unsigned int line, const char *func);
void *wrap_malloc(size_t size,
co... |
3b26bd8bcbe225f522d00da1884ee004797905189ab442da159e67f9490bbeb3 | C/C++ | 1,186 | 48 | #pragma once
#include "utils/stats.h"
#include <functional>
#include <variant>
namespace dorado {
class HtsData;
namespace hts_writer {
using Processable = std::variant<std::reference_wrapper<HtsData>>;
template <typename Visitor>
void dispatch_processable(const Processable& item, Visitor&& visitor) {
// Vis... |
d697ce2ca60f254823b42c6d36189906781356e020ea35634224d0a54bf85bc0 | C/C++ | 1,191 | 35 | #pragma once
#include "basecall/MetalCaller.h"
#include <torch/nn/modules/container/any.h>
#include <torch/nn/pimpl.h>
namespace dorado::basecall {
class MPSCaller final : public MetalCaller {
public:
MPSCaller(const config::BasecallModelConfig &model_config);
~MPSCaller();
at::Tensor create_input_tens... |
865302188ae0f3bd5261179fad63a7298b10b468b72a45ddd9a093c0710d6632 | C/C++ | 1,194 | 35 | #pragma once
#include "torch_utils/tensor_utils.h"
#include <spdlog/spdlog.h>
#include <torch/nn.h>
#include <stdexcept>
#include <vector>
namespace dorado::utils {
inline void load_state_dict(torch::nn::Module& module, const std::vector<at::Tensor>& weights) {
if (weights.size() != module.parameters().size())... |
26676b2723022840a565b640a496569d10b97ba23540a13180f847548d0e0cfa | C/C++ | 1,197 | 37 | #pragma once
#include <filesystem>
#include <functional>
#include <optional>
#include <string>
namespace dorado::config {
struct BasecallModelConfig;
} // namespace dorado::config
namespace dorado::data_loader {
class InputFiles;
} // namespace dorado::data_loader
namespace dorado::batchsize_benchmarks {
// Retr... |
47c90a9bd5b31a375a1ac0a6e4ba91bd5289823a7f598c2d4fcf01bad3654dd7 | C/C++ | 1,202 | 44 | #pragma once
#include "SpeedEntry.h"
#include <istream>
#include <optional>
#include <ostream>
#include <span>
#include <string>
#include <string_view>
namespace dorado::batchsize_benchmarks {
namespace detail {
struct ParsedLine {
std::string_view gpu_name;
std::string_view model_name;
SpeedEntry entr... |
0a891dab26b7ef92f875ae8bc050921b7386372a8034a014856ba645efcdb81d | C/C++ | 1,204 | 34 | #pragma once
#include "types.h"
#include <filesystem>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
namespace kadayashi {
int write_haptagged_bam_given_hashtable_and_itvl(
const std::filesystem::path &fn_bam,
const std::string_view itvl,
const std::files... |
cb3e2acb6318c17cf26f1b3999c0a596575809dd30b20207cff252bdc7a60454 | C/C++ | 1,210 | 36 | #pragma once
#include "secondary/common/region.h"
#include "secondary/common/window.h"
#include <cstdint>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
namespace dorado::secondary {
/**
* \brief Linearly splits sequence lengths into windows. It also returns the backward mapping of w... |
164fce0a774e241bc72d17399c0dba90855098a9b35f4e0a3cbc16bef159308a | C/C++ | 1,212 | 42 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include "utils/concurrency/AsyncExecutor.h"
#include <atomic>
#include <map>
#include <mutex>
#include <string>
namespace dorado {
class PolyACalculatorNode : public MessageSink {
public:
static inline constexpr std::size_t MAX_INPUT_QUEUE_SIZE{10000};
... |
bfb00b8edfe8649163382af32d9cff62ee4277526724f32b164fd8733ff2ce8e | C/C++ | 1,219 | 27 | #ifndef _READ_FILTER_H
#define _READ_FILTER_H
#include <string>
#include <vector>
#include <math.h>
#include "process_argv.h"
#include "sequence.h"
#include "global_parameter.h"
using namespace::std;
bool check_tile_or_fov(string tile,string& tile_parameter);
string reversecomplementary(string& a);
C_fastq_stat_resu... |
2c700e6694744a8323be165e51afa5af10925113ba738bd5342e04eefaad8e87 | C/C++ | 1,223 | 35 | #pragma once
#include <cstddef>
#include <new>
// We're intentionally using these in a header, but they don't affect
// our ABI, which is what this warning warns about.
#if defined(__GNUC__) && (__GNUC__ >= 12)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winterference-size"
#endif
namespace dorado::... |
a1f39ab3797649a861289a60b822001782a4e6ce86b5b8420f3dea8b73580fce | C/C++ | 1,227 | 47 | #pragma once
#include <cstdint>
#include <iosfwd>
#include <span>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
namespace dorado::secondary {
struct Variant {
int32_t seq_id = -1;
int64_t pos = -1;
std::string ref;
std::vector<std::string> alts;
std::string filte... |
9387052f51ca4ab2e1ca78373b0dbf6e659917367431b67f39f61d8c8959b0ba | C/C++ | 1,231 | 36 | #pragma once
#include <spdlog/spdlog.h>
#include <string>
#include <unordered_map>
namespace dorado::utils {
namespace details {
extern std::unordered_map<std::string, std::pair<double, bool>> g_dev_options;
void extract_dev_options(const std::string& env_string);
} // namespace details
// This is intended for de... |
4d5fe1c53732df02268110faa402babc1efc5b909ef8ccdbbc44f6bb48d6acae | C/C++ | 1,236 | 35 | #pragma once
#include "hts_utils/hts_types.h"
#include "models/kits.h"
#include <filesystem>
#include <optional>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace dorado::file_info {
std::unordered_map<std::string, ReadGroup> load_read_groups(
const std::vector<... |
3739d9e68e97aa83d0b43faeb9380b2825e2c8015b0384f60e7816534b33b854 | C/C++ | 1,238 | 42 | #pragma once
#include "encoder_base.h"
#include "haplotag_source.h"
#include "secondary/features/kadayashi_options.h"
#include <cstdint>
#include <filesystem>
#include <memory>
#include <optional>
#include <string>
namespace dorado::secondary {
struct ModelConfig;
enum class FeatureEncoderType {
COUNTS_FEATURE... |
14816b4dc4fb74431edb8007e3253361d9c52252b9d4d211b41b3a8cd89ca3f6 | C/C++ | 1,246 | 35 | #pragma once
#include "read_pipeline/base/HtsReader.h" // for ReadMap
#include "read_pipeline/base/MessageSink.h"
#include <map>
#include <string>
namespace dorado {
// Duplex caller node receives a map of template_id to complement_id (typically generated from a pairs file),
// and a map of `read_id` to `dorado::Re... |
6cb8f419729798350300d21768a28c6991e597453ad4cf2b552123d24772884e | C/C++ | 1,251 | 45 | //
// Created by berry on 2020-08-11.
//
#ifdef _USEMGZIP
#ifndef SOAPNUKE_MGZIP_H
#define SOAPNUKE_MGZIP_H
#include<string>
#include <vector>
#include <zlib.h>
#include<iostream>
using namespace::std;
//only support SE data.
class threadDataInfo{
public:
//implicit construct function
threadDataInfo(){
... |
c1d34b14a21810159ac355b5fdf16f92a14584ed8faf6d7c4eeeb5206186577e | C/C++ | 1,260 | 30 | #pragma once
#include <edlib.h>
#include <string>
namespace dorado::utils {
/**
* @brief Generates a human-readable string representation of a pairwise sequence alignment.
*
* This function takes two C-style strings, `query` and `target`, and an `EdlibAlignResult`
* object, `result`, and returns a formatted str... |
c49b701fc40dddf9d10da2c46dc00c63fc789f54721460324bb159517f91bbe8 | C/C++ | 1,283 | 43 | #pragma once
#include "models/models.h"
#include <filesystem>
#include <memory>
namespace httplib {
class Client;
} // namespace httplib
namespace dorado::model_downloader {
class Downloader {
public:
Downloader(std::filesystem::path directory);
~Downloader();
bool download(const models::ModelInfo& i... |
724314730db1d4359f97f614f11eb5c678110f7dda15ad77af7912f16ac5e9be | C/C++ | 1,293 | 43 | #pragma once
#include "poly_tail_calculator.h"
#include <filesystem>
#include <iosfwd>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector>
namespace dorado::poly_tail {
class PolyTailCalculator;
class PolyTailCalculatorSelector {
public:
PolyTailCalculatorSelector(co... |
0aa253c14274e3ec00e0fe0bbcbd6674ed6a0abbd89228a90a546b4f1ef718a8 | C/C++ | 1,297 | 29 | #pragma once
#include "poly_tail/poly_tail_calculator.h"
namespace dorado::poly_tail {
class DNAPolyTailCalculator : public PolyTailCalculator {
public:
DNAPolyTailCalculator(PolyTailConfig config, const PolyTailCalibrationCoeffs& calibration)
: PolyTailCalculator(std::move(config), calibration) {}
... |
fa2f5f07ad439b9ea6253fe2555d3a1b405c7dd67fae7e4ef762b3b63b4df520 | C/C++ | 1,309 | 49 | #pragma once
#include "utils/concurrency/TaskPool.h"
#include <cassert>
#include <cstddef>
#include <stdexcept>
#include <utility>
namespace dorado::utils::concurrency {
// Executor that you can push tasks to.
class AsyncExecutor {
TaskPool* m_tasks = nullptr;
std::size_t m_q_idx = 0;
private:
AsyncExe... |
92b391aae985f5b7b6fcbfc37daf922842a683a44045b4d55712007e860ec0ef | C/C++ | 1,313 | 49 | /* USER CODE BEGIN Header */
/**
******************************************************************************
* @file gpio.h
* @brief This file contains all the function prototypes for
* the gpio.c file
******************************************************************************
* @... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.