sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
7cf26e10894a2cf4fb5457d26aa3253a65711cabf3930cbe0b2470a25f304fc2 | C/C++ | 3,094 | 107 | #pragma once
#include "hts_types.h"
#include <filesystem>
#include <functional>
#include <map>
#include <string>
namespace dorado {
namespace utils {
using ProgressCallback = std::function<void(size_t percentage)>;
using DescriptionCallback = std::function<void(const std::string&)>;
class HtsFile {
public:
enu... |
fba131f0efe85e3352fa9f2b9db26717e8105967e81a761f4b6597a4bebef0c7 | C/C++ | 3,106 | 94 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <array>
#include <atomic>
#include <cstdint>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_set>
#include <vector>
namespace dorado {
struct ModBaseInfo;
namespace modbase {
class ModBaseRunner;
using RunnerPtr = std::uniqu... |
5e4fd95100bc23951c27c479c4648780fc571ddab08020ef44841d7b86752b9a | C/C++ | 3,124 | 114 | #ifndef BAMLITE_H_
#define BAMLITE_H_
#include <stdint.h>
#include <zlib.h>
#ifdef USE_MALLOC_WRAPPERS
# include "malloc_wrap.h"
#endif
#define USE_VERBOSE_ZLIB_WRAPPERS
typedef gzFile bamFile;
#ifdef USE_VERBOSE_ZLIB_WRAPPERS
/* These print error messages on failure */
# define bam_open(fn, mode) bamlite_gz... |
2f52fc71dd03d4cbccf364267124b1cefcfdfa2739957e50fee05d220f486e6b | C/C++ | 3,125 | 70 | #pragma once
#include "KitInfoProvider.h"
#include "hts_utils/hts_types.h"
#include "utils/barcode_kits.h"
#include "utils/types.h"
#include <string>
#include <string_view>
#include <vector>
namespace dorado {
namespace demux {
class BarcodeClassifier {
struct BarcodeCandidateKit;
public:
BarcodeClassifie... |
dd245248fab8f5d07c3b98b45133e38b5dcea952349c4e280fa85580eb6c5336 | C/C++ | 3,130 | 102 | #pragma once
#include <cassert>
#include <limits>
#include <memory>
#include <new>
#include <type_traits>
namespace dorado::utils {
template <typename Item>
class FixedSizeQueue {
// Fake item buffer so that items don't have to be default constructible.
struct ItemBuffer {
alignas(Item) std::byte dat... |
1f266803373cbb37d79569aab25c4b56956a8f674d8bcfee6efe29729688082c | C/C++ | 3,154 | 117 | #pragma once
#include "types.h"
#include <cstdint>
#include <filesystem>
#include <limits>
#include <string>
#include <vector>
#define BAM_THREAD_RATIO 3
#define BAM_THREAD_MULT 4
#define KADAYASHI_VERSION "v0.1-r76"
struct cliopt_t {
bool is_valid = true;
bool is_print_help = false;
std::filesystem::... |
a95cab781dff0fb2c516b6d3c2bfb91bc3c993e070e92f97fce536856b588dd3 | C/C++ | 3,163 | 77 | #pragma once
#include <iosfwd>
#include <optional>
#include <string>
#include <vector>
namespace dorado::utils::gpu_monitor {
/**
* Get the installed NVIDIA driver version.
* @return std::nullopt if no driver, otherwise the version string.
*/
std::optional<std::string> get_nvidia_driver_version();
struct DeviceS... |
9e8d24d6314121d81743810567b3171831628d200906c56119d9bcea50f00ddb | C/C++ | 3,180 | 89 | #pragma once
#include "detail/priority_task_queue.h"
#include "task_priority.h"
#include <atomic>
#include <condition_variable>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <thread>
#include <vector>
namespace dorado::utils::concurrency {
using TaskType = detail::TaskType;
// T... |
06a9a42635ddc648a966146c408bf74296ce1d517223dba1489171db24f1a77c | C/C++ | 3,185 | 94 | #pragma once
#include "utils/types.h"
#include <cxxpool.h>
#include <array>
#include <filesystem>
#include <functional>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace dorado {
class Pipeline;
class ReadCommon;
clas... |
67cc1e0b342c275d273721c9656c3e2fb3c7f9ae9fe8e32e1f246484aac0405e | C/C++ | 3,212 | 86 | #pragma once
#include "HtsFileWriter.h"
#include <memory>
namespace dorado::hts_writer {
class HtsFileWriter;
class HtsFileWriterBuilder {
protected:
HtsFileWriterBuilder(bool emit_fastq,
bool emit_sam,
bool emit_cram,
bool sort_request... |
093976ad5377d81be26b5bbc9a5e1ea52d2fafc93e86b584a5a3711c2952c895 | C/C++ | 3,226 | 72 | #pragma once
#include "interval.h"
#include "region.h"
#include <cstdint>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
namespace dorado::secondary {
/**
* \brief Utility function to determine partitions for multithreading. For example,
* num_items is the number of items... |
da7d19142cc0d858a1d954257a0f5f3d204b14ee3e5d1611da6038fc9d931101 | C/C++ | 3,252 | 102 | #pragma once
#include <nvtx3/nvtx3.hpp>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iterator>
#include <numeric>
#include <type_traits>
#include <vector>
namespace dorado::utils {
template <typename T>
T div_round_closest(const T n, const T d) {
return ((n < 0) ^ (d < 0)) ? ((n - d / 2) /... |
57e61dd2b9ccb6e5d273186370ad64250ab9502aff07e75dc1e9a3bec3bd6dd8 | C/C++ | 3,298 | 101 | #pragma once
#include "utils/dev_utils.h"
#include <nvtx3/nvtx3.hpp>
// Set this to >0 to enable output of GPU profiling information to stderr
// or use `dorado [basecaller|duplex] ... --devopts cuda_profile_level=<X> ...`
#define CUDA_PROFILE_LEVEL_DEFAULT 0
#if DORADO_CUDA_BUILD
#include "cuda_utils.h"
#include ... |
1074014895bf6b34166c39558fd80985e2e25641ba444e6cd0f8c70faca216a6 | C/C++ | 3,300 | 73 | #pragma once
#include <cstdint>
#include <string>
#include <vector>
namespace dorado::modbase {
class ModBaseEncoder {
private:
int m_bases_before;
int m_bases_after;
int m_kmer_len;
int m_block_stride;
int m_context_samples;
int m_context_samples_before;
int m_seq_len;
int m_signal_... |
e97620cc396dfc32a2422d5ad465cd6f652f785672c1544acd569eb27bc69765 | C/C++ | 3,315 | 72 | #pragma once
#include <ATen/core/TensorBody.h>
#include <c10/core/Device.h>
#include <cuda_runtime.h>
#include <mutex>
#include <string>
#include <vector>
namespace dorado::utils {
// Returns a lock providing exclusive access to the GPU with the specified index.
// In cases where > 1 model is being used, this can p... |
0827938902591ea0a188524be2b0ff3b43c9d229846211fbf7c39f3c3543bb99 | C/C++ | 3,337 | 97 | /* The MIT License
Copyright (c) 2018- Dana-Farber Cancer Institute
2009-2018 Broad Institute, Inc.
2008-2009 Genome Research Ltd. (GRL)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
... |
27cfaa8dfe18234323cbdb142c296a60198a823af21e66b35b07b1eafa5ec531 | C/C++ | 3,343 | 59 | #pragma once
#include <ATen/ATen.h>
#include <optional>
namespace dorado::secondary {
/**
* \brief Check whether FlashAttention3 can be used for the batched attention pathway.
* IMPORTANT: This tests against the currently bound device using at::cuda::getCurrentDeviceProperties()
* t... |
f4e7fbcbc629d0a4f4e739dbd8d51c3beadc235e55dda65ba4816ac878af3262 | C/C++ | 3,357 | 101 | #pragma once
#include "messages.h"
#include "terminate_options.h"
#include "utils/AsyncQueue.h"
#include "utils/stats.h"
#include <stdexcept>
#include <string>
#include <thread>
#include <type_traits>
#include <utility>
#include <vector>
namespace dorado {
// Base class for an object which consumes messages as part... |
1fb7c79d71865e626b43edfe01c1ffa627c5b3b1d3c86b04963a76e08dca3a10 | C/C++ | 3,392 | 88 | #pragma once
#include "secondary/consensus/consensus_result.h"
#include <ATen/ATen.h>
#include <span>
#include <string>
#include <vector>
namespace dorado::secondary {
enum class LabelSchemeType {
HAPLOID,
DIPLOID,
};
class DecoderBase {
public:
DecoderBase(const LabelSchemeType label_scheme_type);
... |
3335a0ceba76d6dad0bba5561c0bdaab01b1b4ab62a8c64a7eef83fba246859d | C/C++ | 3,400 | 117 | #ifndef _SEQUENCE_H
#define _SEQUENCE_H
#include "global_parameter.h"
#include "global_variable.h"
#include "zlib.h"
#include "process_argv.h"
#include <string>
#include <vector>
class C_sequence_stat_result{ //basic sequence stat information
public:
C_sequence_stat_result():seq_len(0),a_num(0),c_num(0),g_num(0),t_n... |
5aebc2159cdc21d0f1abaedbf436ec293a4081e06bd0538c2094752e013d224c | C/C++ | 3,403 | 73 | #pragma once
#include "Minimap2IndexSupportTypes.h"
#include "Minimap2Options.h"
#include <map>
#include <memory>
#include <mutex>
#include <string>
namespace dorado::alignment {
class Minimap2Index;
class IndexFileAccess {
mutable std::mutex m_mutex{};
using CompatibleIndicesLut = std::map<Minimap2Mapping... |
f10d13127919aef8aba5e1eb05384a692523516521e3415152bc42e2e3bf5d76 | C/C++ | 3,441 | 80 | #pragma once
#include <ATen/ATen.h>
#include <cstdint>
#include <iosfwd>
#include <string>
#include <utility>
#include <vector>
namespace dorado::secondary {
class DecoderBase;
/**
* \brief Type which holds the input data for variant calling. This includes _all_
* samples for the current batch of draft ... |
348579bf0eb2aeec8867079311730a38d91c5975ea5ad051a723dce5c0fa4641 | C/C++ | 3,456 | 109 | #pragma once
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include <vector>
namespace dorado {
class SimplexRead;
using SimplexReadPtr = std::unique_ptr<SimplexRead>;
namespace splitter {
using PosRange = std::pair<uint64_t, uint64_t>;
using PosRanges = std::vector<PosRange>;
template... |
edce7babe1ae5ca6d55cfa80109d8a7f787a3c6e24447b1d33b184d712f45e06 | C/C++ | 3,485 | 108 | #pragma once
#include "secondary/architectures/model_torch_base.h"
#include "secondary/features/encoder_base.h"
#include <ATen/ATen.h>
#include <torch/nn/modules/activation.h>
#include <torch/nn/modules/batchnorm.h>
#include <torch/nn/modules/container/sequential.h>
#include <torch/nn/modules/conv.h>
#include <torch/... |
d8af0bf4093da24be4ee763b38a01920bcefe5f20dd676161c9bae65a8f246ca | C/C++ | 3,570 | 101 | #pragma once
#include "utils/stats.h"
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <optional>
#include <thread>
namespace dorado {
class ReadOutputProgressStats {
public:
enum class StatsCollectionMode {
single_collector, // demux has a single pipeline into which all input ... |
6bbbab15ab83d9aa42632795417850905010ff74d9eca1811588eeacbd2dbbb0 | C/C++ | 3,573 | 110 | #pragma once
#include "secondary/common/batched_data.h"
#include <torch/nn/module.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_set>
#include <vector>
namespace dorado::secondary {
constexpr double MEMORY_ESTIMATE_UPPER_CAP = std::numeric_limits<double>::infinity();
class ModelTorchB... |
c9e3d6cd418fd59d3a017d2195940e542e9113132dab8aeed3fe56503b2cbad2 | C/C++ | 3,585 | 122 | #pragma once
#include "local_haplotagging.h"
#include "secondary/consensus/sample.h"
#include <ATen/ATen.h>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
namespace dorado::secondary {
enum class NormaliseType {
TOTAL,
FWD_REV,
};
st... |
de1491acfa530e1102570b3a4ce1555d81b9a5cb0038257096cf5fd6b201c195 | C/C++ | 3,601 | 103 | #pragma once
#include <atomic>
#include <chrono>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include <functional>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
#include <iosfwd>
#include <option... |
43b49cbbd3fb6ea9115fb01715ce67cf73cc035d43be4123877cd6a9aa35fe17 | C/C++ | 3,636 | 123 | #pragma once
#include <map>
#include <memory>
#include <stdexcept>
#include <type_traits>
#include <typeindex>
namespace dorado {
namespace details {
class ContextBase {
public:
virtual ~ContextBase() = default;
virtual bool is_const() const = 0;
};
template <typename T>
class ContextHolder final : public ... |
3fa2d00c103c63771ab10912a6173c769d4747101765ef65d21e513338acfdb3 | C/C++ | 3,672 | 93 | #pragma once
#include "model_resolver/ModelSources.h"
#include "models/kits.h"
#include "models/models.h"
#include <filesystem>
#include <functional>
#include <optional>
#include <string>
#include <vector>
namespace dorado::model_resolution {
std::optional<std::filesystem::path> get_models_directory(
const ... |
271f1c1e4451832eacfb8553a1f72902fa8795040c1e36aa282f08d214f1aa6e | C/C++ | 3,731 | 84 | #pragma once
#include <ATen/core/TensorBody.h>
#include <string>
namespace dorado::nn {
enum class TensorLayout { NTC, TNC, CUTLASS_TNC_F16, CUTLASS_TNC_I8, CUBLAS_TN2C, CUBLAS_TNC };
std::string to_string(const TensorLayout & layout);
// `WorkingMemory` encapsulates a backing tensor from which we create tensor vi... |
ecae35a7e58ab4e4a59aa537d2748bdb498e9d64075fd2928ef49cb81d37e42c | C/C++ | 3,757 | 156 | //
// Created by berry on 2020-04-08.
//
#ifndef SOAPNUKE_PROCESSHTS_H
#define SOAPNUKE_PROCESSHTS_H
#include <htslib/sam.h>
#include <htslib/cram.h>
//#include <cram/cram_samtools.h>
#include <htslib/bgzf.h>
#include <string.h>
#include <thread>
#include <limits.h>
#include "global_parameter.h"
#include "seprocess.h"... |
03bdc354864e94f490463f94bc3b21ed85fba89f075c179314e19f176210240e | C/C++ | 3,821 | 105 | #pragma once
#include "poly_tail_config.h"
#include <memory>
#include <optional>
#include <utility>
#include <vector>
namespace dorado {
class SimplexRead;
}
namespace dorado::poly_tail {
enum class SearchDirection {
BACKWARD = 1,
FORWARD = 2,
};
struct SignalAnchorInfo {
// Search direction from the ... |
dcdbcd875419bb5995c97eb56b4b2f11e75aae84473145d81cce6519a19a1d89 | C/C++ | 3,833 | 153 | #ifndef BWTALN_H
#define BWTALN_H
#include <stdint.h>
#include "bwt.h"
#define BWA_TYPE_NO_MATCH 0
#define BWA_TYPE_UNIQUE 1
#define BWA_TYPE_REPEAT 2
#define BWA_TYPE_MATESW 3
#define SAM_FPD 1 // paired
#define SAM_FPP 2 // properly paired
#define SAM_FSU 4 // self-unmapped
#define SAM_FMU 8 // mate-unmapp... |
19c79587ca54f4c5c3e739df6bd08c6baafbd5bc86e8e51c9ab3a7087e09a1dc | C/C++ | 3,858 | 99 | #pragma once
#include <array>
#include <map>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
/** Helper class for managing modified base context.
*
* Basic string encoding is as follows:
*
* [motif_for_A]:[motif_for_C]:[motif_for_G]:[motif_for_T]
*
* The motifs substitute an X... |
4a833be15283fec4e0c732f575f89d1545a91b980e478e4eb4da1cd14a703fec | C/C++ | 3,864 | 93 | #pragma once
#include <ATen/core/TensorBody.h>
#include <c10/core/Device.h>
#include <cstdint>
#include <span>
#include <vector>
namespace dorado::nn {
class KoiThreads;
class AuxiliaryData {
public:
AuxiliaryData(at::Tensor workspace,
std::int32_t batch_size,
std::int32_t c... |
0285233496cd2be1733f62d9d95940f1f7cf7c618026618e3ac9a74b1df36a86 | C/C++ | 3,916 | 111 | /* The MIT License
Copyright (c) 2018- Dana-Farber Cancer Institute
2009-2018 Broad Institute, Inc.
2008-2009 Genome Research Ltd. (GRL)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
... |
b90c4ea77bb625b2a4522b592ddcb13e5ee6af60fd684e440685adc7578c86f4 | C/C++ | 3,916 | 97 | #pragma once
#include "hts_utils/hts_types.h"
#include "hts_writer/HtsFileWriter.h"
#include <filesystem>
#include <memory>
#include <unordered_map>
namespace dorado::hts_writer {
class IStructure {
public:
virtual ~IStructure() = default;
virtual std::string get_path(const HtsData &item) = 0;
};
class Sin... |
62e8704747b297e6b4723b165348c42f8f933d627d97a8618863c3f3844cd436 | C/C++ | 4,012 | 113 | #pragma once
#include "DecodedChunk.h"
#include "ModelRunnerBase.h"
#include "config/BasecallModelConfig.h"
#include "nn/AuxiliaryData.h"
#include "nn/KoiThreads.h"
#include "utils/stats.h"
#include <c10/cuda/CUDAStream.h>
#include <torch/nn.h>
#include <atomic>
#include <memory>
#include <optional>
#include <string... |
ec84d7752927a3892deacd8be1200beeeae37625264a70f23a405b2ed2627713 | C/C++ | 4,027 | 103 | #pragma once
#include "hts_utils/FastxRandomReader.h"
#include "secondary/common/bam_file.h"
#include "secondary/consensus/sample.h"
#include "secondary/features/encoder_base.h"
#include "secondary/features/haplotag_source.h"
#include "secondary/features/kadayashi_options.h"
#include <ATen/ATen.h>
#include <cstdint>... |
02e0459c784b5ad6c4064fe4ebdf654898668afdb81936a2c944a6301b0473e0 | C/C++ | 4,098 | 173 | /* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : usbd_conf.h
* @version : v1.0_Cube
* @brief : Header for usbd_conf.c file.
******************************************************************************
... |
5456dfe2664a2885f485981ef609a8531d689d981db98d0622364277569e3c86 | C/C++ | 4,119 | 109 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include <atomic>
#include <cstdint>
#include <memory>
#include <mutex>
#include <string>
#include <thread>
#include <unordered_set>
#include <vector>
namespace dorado {
namespace basecall {
class ModelRunnerBase;
using RunnerPtr = std::unique_ptr<ModelRunner... |
a8c7431e29aca69c73bd20fd2666876d29a644460feaa46c41003ddf874a10cd | C/C++ | 4,186 | 153 | #pragma once
/**
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* H E A D E R O N L Y I M P L E M E N T A T I O N
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*
* Must remain a header only implementation as depended
* upon by ont_core basecall client code which cannot
* have a de... |
774bd832612049942075edfc9bb81c9554591a66e604bc19720e7b55f11c12e4 | C/C++ | 4,248 | 144 | #ifndef _GLOBAL_VARIABLE_H
#define _GLOBAL_VARIABLE_H
#include <string>
#include <set>
#include "global_parameter.h"
// #include <map>
using namespace ::std;
#define READ_MAX_LEN 1000
#define MAX_QUAL 42
#define MIN_QUAL 0
// #define REAL_MAX 50
class C_filter_stat
{
public:
C_filter_stat()
{
in_adapter_list_num =... |
1b1640be0bba804aa877784896bb3acab6d048d870e56c2a17ba2705a7fe0e4f | C/C++ | 4,260 | 114 | #pragma once
#include "secondary/common/bam_file.h"
#include "secondary/features/haplotag_source.h"
#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
struct faidx_t;
namespace dorado::secondary {
static constexpr int8_t DEL_VAL = 5; // Value representing deletion in base channel.
//... |
677a60c17300c8cd3e1b16d50157b0a1f500c1b12261218ae50b1a4d149240f4 | C/C++ | 4,313 | 105 | #pragma once
#include "kits.h"
#include "metadata.h"
#include <filesystem>
#include <optional>
namespace dorado::models {
enum class ModelType { SIMPLEX, STEREO, MODBASE, CORRECT, POLISH, VARIANT };
std::string_view to_string(ModelType model_type);
// Model info identifies models and associates additional metadat... |
2456e3a917b0f4d20b850f634581916812404d38dae9cfb0254e23fd56481300 | C/C++ | 4,324 | 84 | #pragma once
#include "local_haplotagging.h"
#include "secondary/common/bam_file.h"
#include <cstdint>
#include <filesystem>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
namespace kadayashi {
int util_modify_tag_given_tsv(const std::filesystem::path &fn_bam,
... |
e651694a5edc489bb75f582c2ff9aaff53ceab46d7f50381c10cc9b0a617fb32 | C/C++ | 4,358 | 147 | #pragma once
#include "AuxiliaryData.h"
#include "config/BasecallModelConfig.h"
#include "nn/RMSNorm.h"
#include "torch_utils/tensor_utils.h"
#include <c10/core/Device.h>
#include <c10/core/TensorOptions.h>
#include <torch/nn.h>
#include <cstdint>
#include <unordered_map>
#include <utility>
#include <vector>
namesp... |
48e030eb66c03e37125ade90e659e873589320634c12db6143f4fbca37f1fb85 | C/C++ | 4,426 | 104 | #pragma once
#include "hts_utils/MergeHeaders.h"
#include "hts_utils/header_utils.h"
#include "hts_utils/hts_types.h"
#include <filesystem>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <vector>
struct sam_hdr_t;
struct bam1_t;
namespace dorado::util... |
f3a375800406b314e0bb5f0748fc555ef87c5e9fc3fd9ca0983aa6fae4ecfd3b | C/C++ | 4,463 | 93 | #pragma once
#include "secondary/common/interval.h"
#include "types.h"
#include "utils/cigar.h"
#include "utils/overlap.h"
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
namespace dorado {
struct CorrectionAlignments;
}
namespace dorado::correction {
struct CigarPoint {
int32_t idx =... |
f305d035483c631c77a54097e758572f537171a531467df9563ee8f222c427fc | C/C++ | 4,482 | 114 | #pragma once
#include "secondary/common/interval.h"
#include "secondary/common/interval_tree_types.h"
#include <ATen/core/TensorBody.h>
#include <cstdint>
#include <iosfwd>
#include <string>
#include <vector>
namespace dorado::secondary {
struct Sample {
int32_t seq_id = -1;
at::Tensor features;
std::v... |
f97266f044dfe84a0e8f880b442a9103fc0433b7bb8412d1e8fb3db04b09a48c | C/C++ | 4,646 | 192 | #ifndef _SEPROCESS_H
#define _SEPROCESS_H
#include <iostream>
#include <string>
#include <vector>
#include <mutex>
#include <queue>
#include <thread>
#include "process_argv.h"
#include "global_parameter.h"
#include "global_variable.h"
#include "sequence.h"
#include "BloomFilter.h"
#include <algorithm>
#include <fstrea... |
c24b6061373fc802807738fdcee35b07ccb2162fd33c6627cbb3ce0623ac1bfb | C/C++ | 4,687 | 149 | #pragma once
#include "hts_utils/HeaderMapper.h"
#include "read_pipeline/base/messages.h"
#include <htslib/sam.h>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace dorado {
using ReadMap = s... |
26434a10c3afbab9873b76ab3b048ce8c7c43c2ed1984f947bd896f768559e02 | C/C++ | 4,704 | 124 | #pragma once
#include "MessageSink.h"
#include "utils/stats.h"
#include <spdlog/spdlog.h>
#include <memory>
#include <utility>
#include <vector>
namespace dorado {
using NodeHandle = int;
// Object from which a Pipeline is created.
// While this currently embodies constructed pipeline nodes, the intent is that th... |
e72a55203c311c4cc0b176bcad36a0d261e97323fd6f9b883941aaf3851c15df | C/C++ | 4,707 | 115 | #pragma once
#include "medaka_bamiter.h"
#include "secondary/common/bam_file.h"
#include <array>
#include <cstdint>
#include <iosfwd>
#include <string_view>
#include <vector>
namespace dorado::secondary {
// medaka-style base encoding
static constexpr std::string_view PILEUP_BASES{"acgtACGTdD"};
static constexpr in... |
d14ad6bf7db1fa8f9c382b6bdf0544df4e6861a02c849aa65a55dea07ab633b9 | C/C++ | 4,725 | 150 | #ifndef _PEPROCESS_H
#define _PEPROCESS_H
#include <iostream>
#include <string>
#include <vector>
#include <mutex>
#include <queue>
#include <thread>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <algorithm>
#include <string.h>
#include "process_argv.h"
#include "global... |
1a851ee2d0b9d60918523d4e92f674ca08a1f0a6989a3b3504945aaf7c994450 | C/C++ | 4,785 | 118 | #pragma once
#include "kits.h"
#include "metadata.h"
#include "models.h"
#include <optional>
#include <string>
#include <vector>
namespace dorado::models {
struct ModelComplex {
public:
// Parse the model argument
static ModelComplex parse(const std::string& raw);
// Enumerated styles for how the user ... |
ab372fee2eb666558e2ef06def0e159444f85bf7d45f7823290993f73061edd8 | C/C++ | 4,966 | 132 | #pragma once
#include "model_latent_space_lstm.h"
#include "secondary/architectures/model_torch_base.h"
#include "secondary/features/encoder_base.h"
#include <ATen/ATen.h>
#include <torch/nn/modules/embedding.h>
#include <torch/nn/modules/normalization.h>
#include <torch/nn/modules/rnn.h>
#include <cstdint>
#include... |
800f3b4e4ba2986e37d910ab6f84555d5993a1f5f1d2a1e52a462edb5e0b9043 | C/C++ | 5,067 | 149 | #ifndef KETOPT_H
#define KETOPT_H
#include <string.h> /* for strchr() and strncmp() */
#define ko_no_argument 0
#define ko_required_argument 1
#define ko_optional_argument 2
typedef struct {
int ind; /* equivalent to optind */
int opt; /* equivalent to optopt */
char *arg; /* equivalent to opta... |
b0c532182a16481e6fb5579ad863f71fcab6d2a205a2d9caaee7413f76b28776 | C/C++ | 5,081 | 132 | /* The MIT License
Copyright (c) 2018- Dana-Farber Cancer Institute
2009-2018 Broad Institute, Inc.
2008-2009 Genome Research Ltd. (GRL)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
... |
2cb4e45f6fbf514b081049c3633df521cfe1896f86fdba58e486899c3c0b500c | C/C++ | 5,091 | 114 | #ifndef __AC_KSW_H
#define __AC_KSW_H
#include <stdint.h>
#define KSW_XBYTE 0x10000
#define KSW_XSTOP 0x20000
#define KSW_XSUBO 0x40000
#define KSW_XSTART 0x80000
struct _kswq_t;
typedef struct _kswq_t kswq_t;
typedef struct {
int score; // best score
int te, qe; // target end and query end
int score2, te2; /... |
ac1ca7364a57a9927864de173b83e8e9415cf7ae8be97d550973a25e13eea596 | C/C++ | 5,127 | 179 | /**
******************************************************************************
* @file usbd_cdc.h
* @author MCD Application Team
* @brief header file for the usbd_cdc.c file.
******************************************************************************
* @attention
*
* Copyright (c) 2... |
94b115c0e1b6da014075aa319d278b86cc400d73118003a0fdb1e1effca57ab0 | C/C++ | 5,152 | 192 | #ifndef _GLOBAL_PARAMETER_H
#define _GLOBAL_PARAMETER_H
#include <string>
#include <functional>
#include <vector>
// #include "mGzip.h"
using namespace ::std;
class C_global_parameter
{
// common parameter
public:
/*
PROCESS_THREAD_NUM(2), IS_STREAMING(false), filterTile_(false), tileIsFov_(false), misMatch_(1), mat... |
f566f7c1f7d354a0c92019b3aad8476f26e3e2a08be9186b727288b33060418b | C/C++ | 5,360 | 126 | #pragma once
#include "read_pipeline/base/MessageSink.h"
#include "utils/sequence_utils.h"
#include "utils/types.h"
#include <atomic>
#include <cstdint>
#include <deque>
#include <list>
#include <map>
#include <mutex>
#include <string>
#include <thread>
#include <tuple>
#include <unordered_map>
#include <vector>
nam... |
cfdc680951cffb204370e46e640f72e8ddd6fa195a0f15d8c9225fda114bf4b0 | C/C++ | 5,390 | 131 | #pragma once
// Some NS types make use of tagged pointers which aren't aligned and trip up UBSan.
// NS::SharedPtr also incorrectly uses the no_sanitize attribute since it should be on the inner class.
#pragma clang attribute push(__attribute__((no_sanitize("alignment"), no_sanitize("null"))), \
... |
d061b015594ef1916059179594c4c36fb338b30f97c217468e94b680118a20a4 | C/C++ | 5,429 | 105 | #pragma once
#include "hts_utils/FastxRandomReader.h"
#include "sample.h"
#include "secondary/common/interval.h"
#include "secondary/common/region.h"
#include "secondary/common/variant.h"
#include "secondary/features/decoder_base.h"
#include "variant_calling_sample.h"
#include <array>
#include <cstdint>
#include <mem... |
1c15b080a2c10b760d5cc5d4f5e79960ad28e42751e555fc7f16314e17896219 | C/C++ | 5,434 | 139 | #pragma once
#include <array>
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include <functional>
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic pop
... |
72b1dd0512e44e541a51b40198b460cf5db81bd422b6639c75ae97e2b767e4c9 | C/C++ | 5,472 | 161 | /*<html><pre> -<a href="qh-qhull_r.htm"
>-------------------------------</a><a name="TOP">-</a>
qhull_ra.h
all header files for compiling qhull with reentrant code
included before C++ headers for user_r.h:QHULL_CRTDBG
see qh-qhull.htm
see libqhull_r.h for user-level defi... |
f593c1b9628eb67229edd59164c970e699d91d40691efc9956bb82efe4d3964e | C/C++ | 5,595 | 172 | /**
******************************************************************************
* @file usbd_core.h
* @author MCD Application Team
* @brief Header file for usbd_core.c file
******************************************************************************
* @attention
*
* Copyright (c) 2015... |
55f5abcc032582d23370ff54c6b7645d1914dc9c458e0f57d56b0d15d23be5d8 | C/C++ | 5,731 | 179 | #pragma once
#include "BatchParams.h"
#include "config/common.h"
#include "models/kits.h"
#include <cmath>
#include <filesystem>
#include <optional>
#include <string>
#include <utility>
#include <vector>
namespace dorado::config {
enum class ScalingStrategy : std::uint8_t { MED_MAD, QUANTILE, PA };
std::string to_s... |
83b054bcfaca4a2252d2936ecc7334e16ef4564080e69e24795095b3d1018b0b | C/C++ | 5,731 | 130 | #pragma once
#include "utils/types.h"
#include <bitset>
#include <string>
#include <unordered_map>
#include <vector>
namespace dorado::utils {
class SampleSheet {
public:
enum class Type { none, barcode };
enum IndexBits {
FLOW_CELL_ID = 0,
POSITION_ID,
};
SampleSheet();
// Cal... |
89b0971fd4ac11f3ebf8771db182e547121f4f7e102c1f3b58b9256fa134a66d | C/C++ | 5,999 | 157 | #pragma once
#include "common.h"
#include "utils/types.h"
#include <cstddef>
#include <filesystem>
#include <optional>
#include <string>
#include <vector>
namespace dorado::config {
enum class ModelType : std::uint8_t { CONV_LSTM_V1, CONV_LSTM_V2, CONV_LSTM_V3, CONV_V1, UNKNOWN };
std::string to_string(const ModelT... |
ada13fc46424ba0d068075012b90dc267dce058d8c2a5d6d591b00820f634c6c | C/C++ | 6,210 | 162 | #pragma once
#include <array>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <tuple>
#include <vector>
struct mm_tbuf_s;
namespace dorado {
struct MmTbufDestructor {
void operator()(mm_tbuf_s*);
};
using MmTbufPtr = std::unique_ptr<mm_tbuf_s, MmTbufDes... |
9407bedb3862fdbb0b1501170534f1cc2f030eca5ece9246728a538eefc2a988 | C/C++ | 6,356 | 222 | /**
******************************************************************************
* @file usbd_conf_template.h
* @author MCD Application Team
* @brief Header file for the usbd_conf_template.c file
******************************************************************************
* @attention
*
... |
a8ff4bced80c61f07070d6f5ed17ad3c2367c4f7d2a4564f54b5a7e47aec01cb | C/C++ | 6,507 | 164 | #pragma once
#include "hts_utils/hts_types.h"
#include "models/kits.h"
#include <ATen/core/TensorBody.h>
#include <array>
#include <cstdint>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
namespace dorado {
class ClientInfo;
struct AlignmentResult;
st... |
9eb1a34e113c5226c8f9200eccd53548ebe6d1e469095a90374e86771e569e52 | C/C++ | 6,540 | 132 | /****************************************************************************
**
** Copyright (c) 2008-2018 C.B. Barber. All rights reserved.
** $Id: //main/2015/qhull/src/libqhullcpp/Qhull.h#5 $$Change: 2549 $
** $DateTime: 2018/12/28 22:24:20 $$Author: bbarber $
**
****************************************************... |
7fe1c1578805df68ea6c4d916202bce5fffc0c4cf655ff0e4172855c1b630df2 | C/C++ | 6,644 | 266 | #pragma once
#include <cstdint>
#include <map>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
namespace dorado::models {
/*
Flowcell product codes that we want to support in auto model selection.
Hyphens replaced with underscores in enumeration but kept in the string representation
to ... |
6bf10319e7717d19590d46a936ef645f54c8f8d232156c4456f635d7d933ae88 | C/C++ | 6,961 | 210 | #pragma once
// Backport of std::move_only_function.
#include <functional>
#include <new>
#include <type_traits>
#include <utility>
namespace dorado::utils {
namespace detail {
// Arbitrarily chosen small functor size.
static inline constexpr std::size_t kSmallFunctorAlignment = alignof(std::size_t);
static inline... |
ff53dd57be86ed2b3b80d4134f1efa9e86127b4b164a1f8bd7453e8a5c3d16ed | C/C++ | 7,154 | 151 | /****************************************************************************
**
** Copyright (c) 2008-2018 C.B. Barber. All rights reserved.
** $Id: //main/2015/qhull/src/libqhullcpp/QhullFacet.h#6 $$Change: 2549 $
** $DateTime: 2018/12/28 22:24:20 $$Author: bbarber $
**
***********************************************... |
a46e8f2cb56248590bcf50b7dcbb0d5c1810700c25040979ce1985d51f8c22bb | C/C++ | 7,604 | 214 | #pragma once
#include <algorithm>
#include <cctype>
#include <charconv>
#include <cstdlib>
#include <limits>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <vector>
// libcxx doesn't implement from_chars<float> on macOS yet.
// TODO: this can be remov... |
67a5db105b223ae09dcffbc47500d18222bc583a0f855382152446f9f5bbbf7c | C/C++ | 7,725 | 183 | #pragma once
#include "modbase/ModBaseRunner.h"
#include "read_pipeline/base/MessageSink.h"
#include <spdlog/spdlog.h>
#include <array>
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <mutex>
#include <optional>
#include <thread>
#include <unordered_set>
#include <vector>
namespac... |
aed5c769c9354fed407723dbb082b5b6d8fb3b1bca454f242e89c9571230b633 | C/C++ | 7,895 | 182 | #pragma once
#include "hts_types.h"
#include <array>
#include <cassert>
#include <cstdint>
#include <limits>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
namespace kadayashi {
constexpr bool DEBUG_LOCAL_HAPLOTAGGING = false;
constexpr uint8_t VAR_OP_INVALID = 0;
constexpr uint8_t V... |
2bbd7ae5683721f3d7eb9dbfd7e7a9aa1faa7d69e4f748472690feb72d53181a | C/C++ | 7,975 | 199 | #pragma once
#include "hts_types.h"
#include <map>
#include <optional>
#include <set>
#include <string>
#include <vector>
struct sam_hdr_t;
namespace dorado::utils {
class MergeHeaders {
public:
/** Construct an object for merging headers.
* @param strip_alignment If set, no SQ lines will be included in t... |
5a6fe2135245780d49d4276390e851e862dcc21b5f121e7e23b0e8d422e08c03 | C/C++ | 8,049 | 161 | /****************************************************************************
**
** Copyright (c) 2009-2018 C.B. Barber. All rights reserved.
** $Id: //main/2015/qhull/src/libqhullcpp/PointCoordinates.h#6 $$Change: 2549 $
** $DateTime: 2018/12/28 22:24:20 $$Author: bbarber $
**
*****************************************... |
20d395ea93ba4bcc81556a02cee9d27147e8e044d8cd01ab97f03974283a06a7 | C/C++ | 8,149 | 189 | /*<html><pre> -<a href="qh-geom_r.htm"
>-------------------------------</a><a name="TOP">-</a>
geom_r.h
header file for geometric routines
see qh-geom_r.htm and geom_r.c
Copyright (c) 1993-2018 The Geometry Center.
$Id: //main/2015/qhull/src/libqhull_r/geom_r.h#10 $$Chan... |
b479def3e9e037f39850b8798c9cd6a734f28d8ce9e0bb489dc91604c8554b68 | C/C++ | 8,287 | 170 | #pragma once
#include "local_haplotagging.h"
#include "polish/decode_data.h"
#include "polish/inference_data.h"
#include "polish/polisher_resources.h"
#include "secondary/architectures/model_config.h"
#include "secondary/architectures/model_torch_base.h"
#include "secondary/common/batched_data.h"
#include "secondary/c... |
653f2f71de8bc57847349154bd45a6f66120cb56fcaf847a8ccc9b694a1ae65b | C/C++ | 8,366 | 276 | #pragma once
#include "utils/string_utils.h"
#include <cassert>
#include <cstdint>
#include <memory>
#include <stdexcept>
#include <string>
#include <utility>
struct bam1_t;
struct bcf1_t;
struct bcf_hdr_t;
struct sam_hdr_t;
struct htsFile;
namespace dorado {
inline const std::string UNCLASSIFIED_STR = "unclassifi... |
18ebdb0d5af3dc6a909492b5b2591965f38f269aae8039cdb28512b984c8500a | C/C++ | 8,707 | 168 | /*<html><pre> -<a href="qh-io_r.htm"
>-------------------------------</a><a name="TOP">-</a>
io_r.h
declarations of Input/Output functions
see README, libqhull_r.h and io_r.c
Copyright (c) 1993-2018 The Geometry Center.
$Id: //main/2015/qhull/src/libqhull_r/io_r.h#7 $$Ch... |
fe21f813c5d3a6a8355f96c18ed47f5d2ed51f3a00947408e74aad85a1211271 | C/C++ | 8,857 | 239 | /* The MIT License
Copyright (c) 2008, 2009, 2011 Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without lim... |
fd35c73c6b013a1668b3d50d2ddf86ca4e7ec96d8595127c3770e2da4b06d66a | C/C++ | 9,180 | 236 | /*<html><pre> -<a href="qh-mem_r.htm"
>-------------------------------</a><a name="TOP">-</a>
mem_r.h
prototypes for memory management functions
see qh-mem_r.htm, mem_r.c and qset_r.h
for error handling, writes message and calls
qh_errexit(qhT *qh, qhmem_ERRmem, NULL... |
0b7253a1490813c569c1ef60f142ff38e7ccc7bfb231835cf1628e2ce9bce648 | C/C++ | 9,284 | 213 | /* The MIT License
Copyright (c) 2018- Dana-Farber Cancer Institute
2009-2018 Broad Institute, Inc.
2008-2009 Genome Research Ltd. (GRL)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
... |
12091e71e12723a8475dddf99a057eb72f59158a5a848b2b8474577fee63622d | C/C++ | 9,434 | 267 | // Add some utilities for CLI.
#pragma once
#include "config/BatchParams.h"
#include "dorado_version.h"
#include "hts_utils/bam_utils.h"
#include "hts_utils/hts_types.h"
#include "torch_utils/auto_detect_device.h"
#if DORADO_CUDA_BUILD
#include "torch_utils/cuda_utils.h"
#endif
#include "utils/dev_utils.h"
#include ... |
4ee9fa96447dc52edfb4333f8d56399887e35923c4c1e8c6896c781fef7754fa | C/C++ | 9,718 | 273 | /* The MIT License
Copyright (c) 2008, by Attractive Chaos <attractivechaos@aol.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limita... |
9c58cdb6733f9974452768c61dffeb3f04ec30a466048797a70e351b1c92bcc5 | C/C++ | 11,437 | 299 | #pragma once
#include "hts_utils/hts_types.h"
#include <map>
#include <span>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
struct sam_hdr_t;
struct kstring_t;
struct bam1_t;
namespace dorado::utils {
class SampleSheet;
using sq_t = std::vector<std::pair<std::string, uint32_t>>;
... |
bf6d318a404a84a7f9d64ae8979dad36ec01293ac974148dc1ce4406f6e17272 | C/C++ | 11,835 | 346 | #ifndef __INTERVAL_TREE_H
#define __INTERVAL_TREE_H
#include <vector>
#include <algorithm>
#include <iostream>
#include <memory>
#include <cassert>
#include <limits>
#define USE_INTERVAL_TREE_NAMESPACE
#ifdef USE_INTERVAL_TREE_NAMESPACE
namespace interval_tree {
#endif
template <class Scalar, typename Value>
class I... |
de5ba9e302475c12b75b0ca488a9fb2161753598561e5a9057fafe2cf3b1194c | C/C++ | 12,127 | 306 | /*<html><pre> -<a href="qh-poly_r.htm"
>-------------------------------</a><a name="TOP">-</a>
poly_r.h
header file for poly_r.c and poly2_r.c
see qh-poly_r.htm, libqhull_r.h and poly_r.c
Copyright (c) 1993-2018 The Geometry Center.
$Id: //main/2015/qhull/src/libqhull_r/... |
6ba4c311adbd65e961ac850157cee1d35f235f4baa4995e4112dfce5e8e87c5d | C/C++ | 12,247 | 251 | /*<html><pre> -<a href="qh-merge_r.htm"
>-------------------------------</a><a name="TOP">-</a>
merge_r.h
header file for merge_r.c
see qh-merge_r.htm and merge_r.c
Copyright (c) 1993-2018 C.B. Barber.
$Id: //main/2015/qhull/src/libqhull_r/merge_r.h#25 $$Change: 2549 $
... |
032d63f7c7c55a37485fd3534556c2d374d12b91ed48e95223f4f8d1092a0436 | C/C++ | 12,533 | 533 | /*<html><pre> -<a href="qh-stat_r.htm"
>-------------------------------</a><a name="TOP">-</a>
stat_r.h
contains all statistics that are collected for qhull
see qh-stat_r.htm and stat_r.c
Copyright (c) 1993-2018 The Geometry Center.
$Id: //main/2015/qhull/src/libqhull_... |
1d176600b0a33c5127b3f29e6a07c47d3357c8ed820308c1a1548d6256f7732f | C/C++ | 12,636 | 329 | #pragma once
#include "utils/FixedSizeQueue.h"
#include <algorithm>
#include <cassert>
#include <condition_variable>
#include <mutex>
#include <string>
#include <unordered_map>
namespace dorado::utils {
// Status return by push/pop methods.
enum class AsyncQueueStatus { Success, Timeout, Terminate };
// Whether to... |
1103e4b345dca3ee062f4b13478dc5cafcace5fde53e25fe378fba8347fbe0cc | C/C++ | 15,358 | 383 | #pragma once
#include "flash_attention_module.h"
#include "model_latent_space_lstm.h"
#include "nn/RMSNorm.h"
#include "secondary/architectures/model_torch_base.h"
#include "secondary/features/encoder_base.h"
#include <ATen/ATen.h>
#include <c10/core/Device.h>
#include <torch/nn/modules/embedding.h>
#include <torch/n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.