sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
0a40349b203ee0f7c7c591c5b57321f2bf97d57bb7be806e535306e69db7ee20 | C++ | 1,046 | 52 | #include <string>
#include <iostream>
#include <iomanip>
#include <exception>
#include "../Griday.hpp"
#include "../Vector.hpp"
#include "../Random.hpp"
int
main(int argc, char* argv[])
try {
using namespace std;
if (argc < 3)
{
cerr << "./convert_cota GRID output"
<< endl;
... |
9cd50289c4d1f42936dddc3d4ddd380aae608c88efd0ed7b5afc0708b1db32d9 | C++ | 1,062 | 50 | /// \file funnel.cpp
///
/// Unit tests for the Funnel class.
///
#include <iostream>
#include <vector>
#include "../funnel.hpp"
#include "catch.hpp"
namespace vg {
namespace unittest {
using namespace std;
TEST_CASE("Funnel tracks tags correctly through merge_group", "[funnel]") {
Funnel funnel;
... |
a0302e3029188a46659a99ec9b22bbd27e5a7661d3fd39ee4427c2d2bc84ccc2 | C++ | 1,072 | 57 | #include "functions.h"
using namespace std;
using namespace Qwt3D;
void createCone(Qwt3D::TripleField& conepos, Qwt3D::CellField& conecell)
{
conepos.clear(); conecell.clear();
Cell cell;
conepos.push_back(Triple(0,0,0));
const unsigned int count = 17;
double r1 = 0.7;
double r2 = 0.9 * r1;
doub... |
87e4d33791b8d52c222c3bf75d184496e0b05177d0db04ef6ce734111b99fc03 | C++ | 1,093 | 44 | #include <QAction>
#include <QTextEdit>
#include "us3_gui_test_main.h"
#include "us_editor.h"
class US_EditorGuiTest : public QObject
{
Q_OBJECT
private slots:
void acceptsKeyboardInputAndClearsDocument()
{
US_Editor editor(US_Editor::DEFAULT);
editor.show();
QVERIFY(editor.isVis... |
32d01d8dbd59832971759b5e0f50d3c9b365b994947185d3e4def40c9a5142f4 | C++ | 1,101 | 50 | #include <cstdint>
#include <sstream>
#include <string>
#include <cereal/archives/binary.hpp>
#include <graphtyper/graph/snp_event.hpp>
namespace gyper
{
SnpEvent::SnpEvent(uint32_t _pos, char _base) : pos(_pos), base(_base)
{
}
std::string SnpEvent::to_string() const
{
std::ostringstream ss;
ss << pos << " " <... |
c3fc80711b03bf7d9fdb191d16a633e0a498ff41a38ae2b3c24f3dbe95cad01a | C++ | 1,103 | 30 | #include "qt_test_base.h"
#include "../../programs/us_xpn_viewer/us_xpn_export.h"
TEST(XpnExport, LaterSuccessPreservesEarlierOpticsFailures)
{
QStringList lastErrors;
QVector<int> visited;
const auto result = us_xpn_export_optics(QVector<int>{1, 0}, [&](int optics) {
visited << optics;
las... |
bf50198f5cdcf89ca1b95a0cf38df4e69e1eeff8e45ab9f5361d746a3815a339 | C++ | 1,106 | 41 | //! \file us_get_edit.cpp
#include "us_get_edit.h"
#include "us_widgets.h"
#include "us_settings.h"
#include "us_gui_settings.h"
US_GetEdit::US_GetEdit( int& i, QStringList& filenames )
: US_WidgetsDialog( nullptr, Qt::WindowFlags() ), index( i )
{
setWindowTitle( tr( "Load Edits From DB" ) );
setPalette( US_G... |
e2c8958c99ae9e7b920156669b737b21c22087ea8d35b2e3e024ef5830133618 | C++ | 1,114 | 40 | #include <string>
#include <vector>
#include <graphtyper/graph/graph.hpp>
#include <graphtyper/graph/haplotype.hpp>
#include <graphtyper/graph/label.hpp>
#include <graphtyper/graph/var_record.hpp>
#include <graphtyper/utilities/type_conversions.hpp>
#include <catch2/catch.hpp>
TEST_CASE("Haplotype with one genotype"... |
949d715ba8df9fa502d88e10ee5eecb9d994229fe39728a4a9b9d8a813057f3e | C++ | 1,130 | 54 | #include "distance_to_head.hpp"
#include <unordered_map>
namespace vg {
namespace algorithms {
using namespace std;
bool is_head_node(handle_t h, const HandleGraph* g) {
bool no_left_edges = true;
h = g->forward(h);
g->follow_edges(h, true, [&](const handle_t& ignored) {
// We found a left edge!
... |
2512275c8a2cfc2b69451c730cb289c8bb1fbc5443ad7cf1ae196bd15bc827cd | C++ | 1,135 | 52 | #include "distance_to_tail.hpp"
#include <unordered_map>
namespace vg {
namespace algorithms {
using namespace std;
bool is_tail_node(handle_t h, const HandleGraph* g) {
bool no_right_edges = true;
h = g->forward(h);
g->follow_edges(h, false, [&](const handle_t& ignored) {
// We found a right edge!
... |
a21d3d11989189cbadd4f88f3abfb78b1c28d8a1554238fe9173eeb2c725348b | C++ | 1,149 | 57 | #include "functions.h"
using namespace std;
using namespace Qwt3D;
void createCone(Qwt3D::TripleField& conepos, Qwt3D::CellField& conecell)
{
conepos.clear(); conecell.clear();
Cell cell;
conepos.push_back(Triple(0,0,0));
const unsigned int count = 17;
double r1 = 0.7;
double r2 = 0.9 ... |
906a3df347f10caa4f59524ed06b3ce6a9acb7250e5c9125668b54ec61ade9e2 | C++ | 1,169 | 51 | /**
* \file
* Allocator configuration procedure for the system allocator.
*/
#include "allocator_config.hpp"
#include <cstdlib>
#ifdef __GLIBC__
// We need a bunch of machinery for using glibc's malloc_info.
#include <atomic>
#include <cstdio>
#include <sstream>
#include <malloc.h>
#endif
namespace vg {
void All... |
f17ea9328603d8922cb26e123deeddcb9ec3f1caff4ea8ecb02df54c3b010bbe | C++ | 1,175 | 44 | /**
* \file register_loader_saver_zip_codes.cpp
* Defines IO for an ZipCode index from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_zip_codes.hpp"
#include "../zip_code.hpp"
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void register_loader_saver_z... |
f2b0d8f4d29584d2dde6f31f9b1c68371e54f7b6e22abcc8a023c1929a1ec058 | C++ | 1,204 | 44 | /**
* \file register_loader_saver_lcp.cpp
* Defines IO for a GCSA LCPArray from stream files.
*/
#include <vg/io/registry.hpp>
#include <gcsa/gcsa.h>
#include <gcsa/algorithms.h>
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void register_loader_saver_lcp() {
std::uint32_t magi... |
4a3307872f356e0371560bbb183e1eb77aa39556c82e9ab283567ace304cf611 | C++ | 1,207 | 42 | #include "path_string.hpp"
namespace vg {
namespace algorithms {
using namespace std;
using namespace vg::io;
void append_mapping_sequence(const Mapping& m, const string& node_seq, string& seq) {
size_t t = 0;
size_t f = m.position().offset();
for (size_t i = 0; i < m.edit_size(); ++i) {
auto& e ... |
c7cfbe2c752fb867aee6126f0f50e0a51c1dd2b041886e1a9852cd4ca836d86a | C++ | 1,216 | 46 | /*!
* \file MyStateValidityCheckerClass.cpp
*
* Created on: Nov, 22 2018
* Author: Florian Achermann, ASL
*/
#include "MyStateValidityCheckerClass.hpp"
#include <chrono>
#include <iostream>
#include <boost/math/constants/constants.hpp>
#include "MySE3StateSpace.hpp"
namespace intel_wind {
namespace pl... |
7969d944cc1b3ad83531d3818c954faaeddbc3af70c428fd911416968e2b5e0f | C++ | 1,228 | 63 | #include "qwt3d_color.h"
#include "qwt3d_plot.h"
using namespace Qwt3D;
StandardColor::StandardColor(Plot3D* data, unsigned size)
: data_(data)
{
Q_ASSERT(data_);
reset(size);
}
void StandardColor::reset(unsigned size)
{
colors_ = ColorVector(size);
RGBA elem;
double dsize = size;
f... |
6ee271ee87454752e117b21990d62c82b8c627f530b3eac5ef4123ab2ff88a2a | C++ | 1,236 | 44 | /**
* \file register_loader_saver_gcsa.cpp
* Defines IO for a GCSA index from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_gcsa.hpp"
#include <gcsa/gcsa.h>
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void register_loader_saver_gcsa() {
std::u... |
66664b174090749a211f2203d37a165c434d4a53acb053f3bdd1ea64a7132187 | C++ | 1,253 | 38 | /*
Thin C++ wrappers exposing fast_float::from_chars with C linkage.
fast_float provides IEEE 754 round-to-even (i.e. correctly rounded) parsing.
*/
#include "fast_float/fast_float.h"
#include <system_error>
extern "C" {
int fast_float_strtod(const char *start, const char *end, double *value,
c... |
1831b4621423eb4d22555d482b23d259177dbec4d9e3457271c9eabb88ad7db6 | C++ | 1,267 | 42 | /**
* \file register_loader_saver_gbz.cpp
* Defines IO for GBZ from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_gbz.hpp"
#include <gbwtgraph/gbz.h>
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void register_loader_saver_gbz() {
std::uint32_t ... |
100260e032f377d8d64e3032aa0e50ad10d1e54cc7376756a59068da932b3417 | C++ | 1,273 | 50 | /// \file hash_graph.cpp
///
/// Unit tests for the HashGraph class.
///
#include <iostream>
#include <sstream>
#include <random>
#include "vg/io/json2pb.h"
#include "support/random_graph.hpp"
#include "support/randomness.hpp"
#include "bdsg/hash_graph.hpp"
#include "catch.hpp"
namespace vg {
namespace unittest... |
dc69a7924472c2553660633087044b11985519841dcc3e7ec7c58b3006ab85e9 | C++ | 1,283 | 40 | #include "graph.hpp"
namespace vg {
void from_handle_graph(const HandleGraph& from, Graph& to) {
from.for_each_handle([&](const handle_t& h) {
Node* node = to.add_node();
node->set_id(from.get_id(h));
node->set_sequence(from.get_sequence(h));
});
from.for_each_edge([&](const edge_t... |
11d4482ed7330446f51dc37c948245a680f6773538aec387ba9c7f05a12b608d | C++ | 1,312 | 36 | #include "disjoint_components.hpp"
namespace vg {
namespace algorithms {
list<bdsg::HashGraph> disjoint_components(const HandleGraph& graph) {
vector<unordered_set<nid_t>> weak_comps = handlealgs::weakly_connected_components(&graph);
list<bdsg::HashGraph> comps;
for (const auto& weak_comp : weak... |
e99fa63b8aa23bd4cc440021103c937dc91bc2aeb68f11bc56eb98a904570da1 | C++ | 1,333 | 45 | /**
* \file register_loader_saver_r_index.cpp
* Defines IO for an r-index from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_r_index.hpp"
#include <gbwt/fast_locate.h>
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void register_loader_saver_r_index(... |
493dbd47b91195b65f8a65df86cf4120180636868bbce088af4d2bd92dda59da | C++ | 1,350 | 54 | /// \file longest_overlap.cpp
///
/// Unit tests for the longest overlap function
///
#include <iostream>
#include <string>
#include "../longest_overlap.hpp"
#include "../utility.hpp"
#include "catch.hpp"
namespace vg {
namespace unittest {
using namespace std;
TEST_CASE("Longest overlap algorithm works on curate... |
79c5e27f7656f0147f3c91a85b8fbfbe921c6f1ef103d9e20931943d46169e77 | C++ | 1,357 | 41 | /**
* \file register_loader_saver_minimizer.cpp
* Defines IO for a minimizer index from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_minimizer.hpp"
#include <gbwtgraph/minimizer.h>
namespace vg {
namespace io {
using namespace vg::io;
void register_loader_saver_minimizer() {
... |
2228df1c6f81e99f372572bd803b190952b9ec35cb9d86f50a5f5231fbb60489 | C++ | 1,361 | 61 | #include <cassert>
#include <iostream>
#include <cereal/archives/binary.hpp>
#include <cereal/types/vector.hpp>
#include <graphtyper/graph/node.hpp>
namespace gyper
{
RefNode::RefNode(Label && l, std::vector<TNodeIndex> && c) noexcept : label(std::move(l)), out_var_ids(std::move(c))
{
}
RefNode::RefNode(RefNode con... |
c0eead89275d5deff99dab69eb25240f441abfa094f97b86eda55180006db9bd | C++ | 1,362 | 52 | #include <cstdint>
#include <sstream>
#include <string>
#include <cereal/archives/binary.hpp>
#include <graphtyper/graph/graph.hpp>
#include <graphtyper/index/kmer_label.hpp>
namespace gyper
{
KmerLabel::KmerLabel(uint32_t const s, uint32_t const e) noexcept : start_index(s), end_index(e), variant_id(INVALID_ID)
{
}... |
60b54f10d992931dad17ec9598f9452ac508d60a82f29aff98e7ec1af3666d79 | C++ | 1,375 | 60 | #include "kmp.hpp"
#include <string>
#include <iostream>
namespace vg {
// TODO: these functions are very similar, could possibly merge into one?
vector<size_t> make_prefix_suffix_table(const char* pattern, size_t len) {
vector<size_t> table(len, 0);
for (size_t i = 1, j = 0; i < len;) {
... |
9155803abe9e7064ad05f557fa3f18aab33e9591c8130aac557fd35a881a8150 | C++ | 1,376 | 43 | /**
* \file register_loader_saver_gbzgraph.cpp
* Defines IO for GBZ in a handle graph proxy wrapper from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_gbzgraph.hpp"
#include <gbwtgraph/gbz.h>
#include "../gbzgraph.hpp"
namespace vg {
namespace io {
using namespace std;
using nam... |
040d83d9e4544f96f1469d56bc33106793a6e68ae18b266733debb6bc508caaa | C++ | 1,386 | 50 | /**
* \file register_loader_saver_xg.cpp
* Defines IO for an XG index from stream files.
*/
#include <arpa/inet.h>
#include <vg/io/registry.hpp>
#include "register_loader_saver_xg.hpp"
#include "handle.hpp"
#include "xg.hpp"
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void regist... |
75380970883e0392ccc24d0a078c06970d2a72126d800c90adf3ab22127a734f | C++ | 1,394 | 41 | /**
* \file find_translation.cpp
*/
#include "find_translation.hpp"
#include "../io/save_handle_graph.hpp"
#include "../gbzgraph.hpp"
namespace vg {
namespace algorithms {
const NamedNodeBackTranslation* find_translation(const HandleGraph* graph) {
if (!graph) {
// No graph means no translation.
... |
95531b7ce0ff41855f1713b628bd902f48d49a7cc7d842a437309cc7e51d5da3 | C++ | 1,397 | 67 | #include <iostream>
#include <string>
#include <graphtyper/utilities/hts_parallel_reader.hpp>
#include <graphtyper/utilities/hts_writer.hpp>
#include <htslib/sam.h>
namespace gyper
{
void HtsWriter::open(std::string const & path)
{
fp = hts_open(path.c_str(), "wb");
if (!fp)
{
std::cerr << "[graphtyper::h... |
8f19e93dd4fd4cb29852e329693c56cf1b6661406bd36458116417b303e187cb | C++ | 1,420 | 61 | #include <algorithm>
#include <sstream>
#include <cereal/archives/binary.hpp>
#include <graphtyper/graph/read_strand.hpp>
namespace gyper
{
long ReadStrand::get_weight() const
{
return r1_forward + r1_reverse + r2_forward + r2_reverse;
}
long ReadStrand::get_r1_count() const
{
return r1_forward + r1_reverse;
}
... |
84bfb0cb7e5435948f5afd069f2a9953d16c0b071195401abd02642dc2820584 | C++ | 1,427 | 45 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... |
db2fa4dcfa83198e8f1406977c70b73cb73f4a0034a292bd7960c89c6a9a4614 | C++ | 1,444 | 43 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... |
4aa7aec749f25bcb9ce0175388b7549d289283f3c17a683e3c612ab4a15c51df | C++ | 1,445 | 57 | /// \file mapping.cpp
///
/// unit tests for Mappings and their utility functions
///
#include <iostream>
#include <string>
#include "vg/io/json2pb.h"
#include <vg/vg.pb.h>
#include "../path.hpp"
#include "catch.hpp"
namespace vg {
namespace unittest {
using namespace std;
TEST_CASE("Mapping simplification workd w... |
097ea695eaf2b665d33e98ee493096c02f4a8a144262a80640faae6ed7d7ca54 | C++ | 1,458 | 57 | /** \file help_main.cpp
*
* Defines the "vg help" subcommand, which describes subcommands.
*/
#include <omp.h>
#include <unistd.h>
#include <getopt.h>
#include <stdlib.h>
#include <iostream>
#include "subcommand.hpp"
#include "../version.hpp"
using namespace std;
using namespace vg;
using namespace vg::subcomma... |
6715547f8377162ee11d1422bc6b365f6c818d0eb889e4eb5a4e9f58abe5fef2 | C++ | 1,462 | 46 | #include "catch.hpp"
#include "algorithms/disjoint_components.hpp"
#include "handle.hpp"
#include <bdsg/hash_graph.hpp>
namespace vg {
namespace unittest {
using namespace std;
TEST_CASE("disjoint_components produces correct results", "[handle]") {
bdsg::HashGraph graph;
handle_t h1 = graph.create_hand... |
a5503d68634dc063873ccaa959bfccb3573cd220aea3af550ea56f1003be7551 | C++ | 1,470 | 57 | #include <assert.h>
#include <cereal/archives/binary.hpp>
#include <cereal/types/vector.hpp>
#include <graphtyper/graph/label.hpp>
#include <graphtyper/graph/var_record.hpp>
namespace gyper
{
Label::Label() noexcept : order(INVALID_ID), dna(0), variant_num(INVALID_NUM)
{
}
Label::Label(Label const & l) noexcept : o... |
3fcce4a6c8e186cb78769fab78d4628648228746d291fcf7737cf08111fb65ea | C++ | 1,473 | 57 | /// \file cactus.cpp
///
/// Unit tests for Cactus graphs and conversions.
///
#include <iostream>
#include <string>
#include "../io/json2graph.hpp"
#include "../cactus.hpp"
#include <bdsg/hash_graph.hpp>
#include "catch.hpp"
namespace vg {
namespace unittest {
using namespace std;
TEST_CASE("We can convert a two-... |
89341c7f550d505d9f22113874278c5f816ca34cf58ebdfd36764854711861c1 | C++ | 1,475 | 47 | /**
* \file register_loader_saver_packed_graph.cpp
* Defines IO for a PackedGraph from stream files.
*/
#include <arpa/inet.h>
#include <vg/io/registry.hpp>
#include "register_loader_saver_packed_graph.hpp"
#include "handle.hpp"
#include "bdsg/packed_graph.hpp"
namespace vg {
namespace io {
using namespace std;
... |
a03078ef740b5336bb229f03a1a73a7d8821b114b161afb4ac87a7f4e1ccd4d9 | C++ | 1,498 | 42 | ////////////////////////////////////////////////////////////////////////////////
// Authors: Omen@LAPTOP-BUKIE434
// Description: Pipe definition for the ADM module.
////////////////////////////////////////////////////////////////////////////////
// This file defines which filters will be used, and the sequence i... |
d69fc2c7741117497243a9724aa97e2a67e05cbe4cc4c0ff0b340bc06cad120c | C++ | 1,527 | 49 | /**
* \file register_loader_saver_distance_index.cpp
* Defines IO for a SnarlDistanceIndex index from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_distance_index.hpp"
#include "../snarl_distance_index.hpp"
namespace vg {
namespace io {
using namespace std;
using namespace vg::i... |
d6d1bfd5679e72dae8ad14de8555776211bf5924b18d3bd6fadefbbcf4eb8abc | C++ | 1,538 | 81 | #include <fstream>
#include <qfileinfo.h>
#include <qfiledialog.h>
#include <qlayout.h>
#include <qpainter.h>
#include "colormapreader.h"
using namespace Qwt3D;
using namespace std;
#if QT_VERSION < 0x040000
ColorMapPreview::ColorMapPreview( QWidget *parent )
: QFrame( parent )
{
label_ = new Q... |
7a3b1b1999908b1eee509b1427e36c2a29585bef14eccf0c961439193322966c | C++ | 1,543 | 39 | #include "path_component_index.hpp"
#include <queue>
#include "sdsl/bit_vectors.hpp"
#include "algorithms/component.hpp"
//#define debug_component_index
namespace vg {
PathComponentIndex::PathComponentIndex() {
// Nothing to do
}
PathComponentIndex::PathComponentIndex(const PathHandleGraph*... |
f35572dc2afc3aa9c59b1349a1836bdb9b4b1d12938216fa45ce0cab99c0dcd4 | C++ | 1,548 | 57 | /**
* \file normalize.cpp
*
* Defines an algorithm to normalize a graph.
*/
#include "normalize.hpp"
#include "simplify_siblings.hpp"
#include <unordered_set>
#include <list>
#include <set>
#include <iostream>
#include <sstream>
namespace vg {
namespace algorithms {
using namespace std;
void normalize(handlegr... |
8c4a426c95e5f338782e35946479f6d84b11368b520597d225acfb8d296ee2b4 | C++ | 1,560 | 51 | /// \file annotation.cpp
///
/// Unit tests for the annotations system on Alignments and MultipathAlignments
///
#include <iostream>
#include <string>
#include "../kmp.hpp"
#include "../utility.hpp"
#include "catch.hpp"
namespace vg {
namespace unittest {
using namespace std;
TEST_CASE("Knuth-Morris-Pratt impleme... |
f67d6f398a1bd9639cf4aa29481d00b9a8305949b6e8312ca72f31b9fb3cc1b1 | C++ | 1,560 | 41 | #include "build_index.hpp"
#include "source_sink_overlay.hpp"
#include "utility.hpp"
namespace vg {
void build_gcsa_lcp(const HandleGraph& graph,
gcsa::GCSA*& gcsa,
gcsa::LCPArray*& lcp,
int kmer_size,
size_t doubling_steps,
... |
2d0d3c8de4e20c5005c47a18cf8902200f4cfd86e7d9fbb3723c54d07bf0028f | C++ | 1,580 | 53 | #include "extract_subchain.hpp"
#include <stack>
namespace vg {
//------------------------------------------------------------------------------
hash_set<nid_t> extract_subchain(const HandleGraph& graph, handle_t start, handle_t end) {
hash_set<nid_t> result;
nid_t start_id = graph.get_id(start);
bool s... |
5567d3da495027701394c6099f1f50dea44c2437b6a979f17d642037dad0eccb | C++ | 1,585 | 56 | #include <math.h>
#include <stdio.h>
#include "D_calc.h"
// For some reson WIN32 is not picking up M_PI from math.h...
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
static float R = 8.314e7;
static float T = (float) 293.15;
static float eta = (float) 0.01;
static float N = (float) 6.022e23;
s... |
7ce0ec389b8524ecaf80cea83b65b5e5c62e3001dba723b5495908c9b38b2729 | C++ | 1,607 | 53 | /**
* \file register_loader_gfaz.cpp
*/
#include "register_loader_gfaz.hpp"
#include <GFAz/core/codec/serialization.hpp>
#include <vg/io/registry.hpp>
#include "../algorithms/gfaz_to_handle.hpp"
#include "../gfa.hpp"
#include "../handle.hpp"
#include "save_handle_graph.hpp"
#include <iostream>
namespace vg {
na... |
beea0617ed0dd8c119668fecbac02cd8187b76ad1a831af4e5184c14b69de3c3 | C++ | 1,615 | 49 | /**
* \file register_loader_saver_gbwtgraph.cpp
* Defines IO for GBWTGraph from stream files.
*/
#include <vg/io/registry.hpp>
#include "register_loader_saver_gbwtgraph.hpp"
#include <gbwtgraph/gbwtgraph.h>
#include <arpa/inet.h>
namespace vg {
namespace io {
using namespace std;
using namespace vg::io;
void ... |
0d9624a8354a5f4a7bc311f2a7563703cda221717c3d1fa61a45919ba53de1d3 | C++ | 1,634 | 28 | // This file was generated by Rcpp::compileAttributes
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// Rtsne_cpp
Rcpp::List Rtsne_cpp(NumericVector I, NumericVector J, NumericVector V, int no_dims_in, double perplexity_in, double theta_in, bool verbose, int max_iter... |
035f4bf05cc165941c2c23e86fe8268c04e115bd6e955b22d041dce71216a2bd | C++ | 1,644 | 52 | #include "sorted_id_ranges.hpp"
namespace vg {
namespace algorithms {
using namespace std;
std::vector<std::pair<nid_t, nid_t>> sorted_id_ranges(const HandleGraph* graph) {
// Build the list of of all the node IDs to operate on
std::vector<nid_t> graph_ids;
graph->for_each_handle([&](handle_t handle) {
... |
55503e1f08e6a7653d190d44b3f6b78f9bbfdd74a27132ec8da8e0829c3063e6 | C++ | 1,666 | 78 | #include <fstream>
#include <qfileinfo.h>
#include <q3filedialog.h>
#include <qlayout.h>
#include <qpainter.h>
//Added by qt3to4:
#include <Q3GridLayout>
#include <QLabel>
#include <Q3Frame>
#include <iostream>
#include "colormapreader.h"
using namespace Qwt3D;
using namespace std;
ColorMapPreview::ColorMapPreview( ... |
79231889fe85ea749c9f628e8127ca9028ad17fa58d2138cc6e424c95104dfe4 | C++ | 1,676 | 55 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... |
d379195153c55fd0adb8d0188a04ef8b4cf044cefcfa4ffed2699934226b0a8d | C++ | 1,705 | 45 | /** \file
* Stepping from a traversal in a snarl decomposition to each neighboring net
* graph element.
*/
#include "decomposition_neighbors.hpp"
#include <algorithm>
#include <vector>
namespace vg {
using handlegraph::net_handle_t;
using handlegraph::SnarlDecomposition;
bool for_each_neighbor_impl(const SnarlD... |
77d9b0d99b95643f5a1721b837f1420610ef50a920af206eea35da89da6cff0d | C++ | 1,714 | 71 | /** \file version_main.cpp
*
* Defines the "vg version" subcommand, which evaluates graphs and alignments.
*/
#include <omp.h>
#include <unistd.h>
#include <getopt.h>
#include <iostream>
#include "subcommand.hpp"
#include "../version.hpp"
using namespace std;
using namespace vg;
using namespace vg::subcommand;... |
e565c889f70c287e6cbe4b4a92e76f9ff7d6652f23882843413d21e240b28b93 | C++ | 1,714 | 69 | #include <fstream>
#include <string>
#include <cereal/archives/binary.hpp>
#include <graphtyper/graph/absolute_position.hpp>
#include <graphtyper/graph/graph.hpp>
#include <graphtyper/graph/graph_serialization.hpp>
#include <graphtyper/utilities/logging.hpp>
namespace gyper
{
void save_graph(std::string const & grap... |
1f6256bc6ca69c209b0402d9e1ed8610c1989e485e3a818548a6d19ff10b8548 | C++ | 1,732 | 88 | #include "MAX14870.h"
//This Library is a fork to support standalone MAX14870 Drivers in TennScience Platform with fast writing
//Also rupport current reading from Analog pin
//R.Hormigo 2019
// Constructors
MAX14870::MAX14870() :
_DIR(7), _PWM(5),_CURRENT(A14), _nEN(24), _nFAULT(26)
{
init(); // initialize onc... |
d64d7e4189a29ba21804f5e9568cf8fad9a6eeed01c27f466f123e46406b2913 | C++ | 1,733 | 70 |
#include <cstdlib>
#include <iostream>
#include <string>
#include "GenomeInterval.hpp"
using namespace std;
using namespace Osprey;
namespace Osprey {
GenomeInterval::GenomeInterval() {
start = 0;
end = 0;
}
bool GenomeInterval::isNull() {
return seqname.empty();
}
sta... |
22875eb50fa5d296c3a29cde810d7afa53882b16bd07a5dad0ebd38154c83f71 | C++ | 1,742 | 72 | #include <iostream>
#include <iomanip>
#include <string>
#include <exception>
#include "../Griday.hpp"
int
main(int argc, char* argv[])
try {
using namespace std;
if (argc < 5)
{
cerr << "./make_egrid spacing atom_type "
"force_field input_cssr egrid_stem"
<< endl... |
97bb1323018bfd0e26ccec8ffbadca31250b24cb6b7b12f4ad394a0bdfe918b5 | C++ | 1,747 | 60 | /**
* \file register_libvg_io.hpp
* Includes calls to register all libvg types with libvgio.
*/
// Keep these includes in alphabetical order.
#include "register_loader_saver_distance_index.hpp"
#include "register_loader_saver_gbwt.hpp"
#include "register_loader_saver_r_index.hpp"
#include "register_loader_saver_gb... |
1cfcaf114660630c7192f9aa6c51d738a0eb91281738294edb0c71e410a1b647 | C++ | 1,777 | 83 | //-----------------------------------------------------------------
// simpleplot.cpp
//
// A simple example which shows how to use SurfacePlot
//-----------------------------------------------------------------
#include <math.h>
#include <qapplication.h>
#include <qwt3d_surfa... |
b5a0ecb975eff411eec6104f7d83e5b5ec5ff00ef8919e9eee50bf4709f75fd6 | C++ | 1,792 | 63 | #define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include <tobii/tobii.h>
#include <tobii/tobii_streams.h>
#include <stdio.h>
#include "string.h"
#include <assert.h>
#pragma warning(disable:4996)
void gaze_point_callback(tobii_gaze_point_t const* gaze_point, void* user_data)
{
if (gaze_p... |
d9e364b3fcb3e2cea0b2475ba81d3a454cf18cf65bbf2a3388ea6a8b35dd2e86 | C++ | 1,794 | 46 | #include <string> //std::string
#include <graphtyper/graph/absolute_position.hpp>
#include <graphtyper/graph/genomic_region.hpp>
#include <graphtyper/graph/graph.hpp>
#include <graphtyper/graph/label.hpp>
#include <graphtyper/utilities/type_conversions.hpp>
#include <catch2/catch.hpp>
/*
TEST_CASE("Getting absolute ... |
3462bbe47f40a004e33b1aab88689fb333d576604a4cac7ba4e581df14ae1070 | C++ | 1,818 | 79 | #include "mex.h"
#include <math.h>
/*
* This function computes
* A = 0;
* for i=1:length(beta), A = A + K(:,:,i)*beta(i); end
* for symmetric and not-symmetric K
*/
void mexFunction(int , mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
if (nrhs<2 || nrhs>3)
mexErrMsgTxt("Wrong number of i... |
f83b895e7c295c93fbb720fe3795fc28952cc69205ddd5cb1768b74ad876d896 | C++ | 1,820 | 88 | #include "MAX14870.h"
//This Library is a fork to support standalone MAX14870 Drivers in TennScience Platform with fast writing
//Also rupport current reading from Analog pin
//R.Hormigo 2019
// Constructors
MAX14870::MAX14870() :
_DIR(7), _PWM(5),_CURRENT(A14), _nEN(24), _nFAULT(26)
{
init(); // init... |
021007ebca1ad5cb11107686ec864d6aa90a26e17a8a0e8d9e665ca7ee0e2da4 | C++ | 1,826 | 66 | //! \file us_table.cpp
#include "us_choice.h"
#include "us_gui_settings.h"
#include "us_analyte.h"
US_Choice::US_Choice( const US_Solution& solution )
: US_WidgetsDialog( nullptr, Qt::WindowFlags() )
{
setPalette ( US_GuiSettings::frameColor() );
setAttribute( Qt::WA_DeleteOnClose );
int row = 0;
QG... |
c6cb391de0ecb357d47d5e49b4c047a4ea41657c3a87121ba1662cdf03e62b34 | C++ | 1,832 | 46 | ///
/// \file path_component_index.cpp
///
/// Unit tests for PathComponentIndex
///
#include "catch.hpp"
#include "path_component_index.hpp"
#include "xg.hpp"
#include "vg.hpp"
#include "../io/json2graph.hpp"
#include <bdsg/hash_graph.hpp>
#include <vg/vg.pb.h>
namespace vg {
namespace unittest {
TEST_CAS... |
56f47155c5fe389497c38058d745c388869743178e303cfac34fa60ff62af0ad | C++ | 1,842 | 1 | static const vector<double> init_firings{0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0... |
2d6f1b45d8ca904bd586a8710e2a105f164d0953fa03dcecc8b911efbb36e42b | C++ | 1,851 | 53 | /**
* \file locally_expand_graph.cpp
*
* Implementation for the locally_expand_graph algorithm.
*/
#include "locally_expand_graph.hpp"
#include <structures/rank_pairing_heap.hpp>
//#define debug_locally_expand_graph
namespace vg {
namespace algorithms {
using namespace structures;
void locally_expand_graph(co... |
e65a1ce712b3b242f3ba9f19ffccefedd41c0b4c0746164f181c02ba76db496d | C++ | 1,854 | 55 | // Verify tests and utilities use the same NO_DB setting; US_DB2 layout depends on it.
// DB builds persist us_debug in settings; NO_DB builds keep it in memory.
#include "qt_test_base.h"
#include "us_defines.h"
#include "us_settings.h"
#include <QSettings>
namespace
{
// Only DB-enabled utilities persist the debug ... |
a05386a12d6eed35251552f0faf2ac9e00dbbcd0f6a459c81a220100a5650bc7 | C++ | 1,888 | 52 | #include "us_fit_meniscus.h"
#include "us_license_t.h"
#include "us_license.h"
//! \brief Main program for US_FitMeniscus. Loads translators and starts
// the class US_FitMeniscus.
int main( int argc, char* argv[] )
{
QApplication application( argc, argv );
#include "main1.inc"
// License is OK. S... |
c3438eb3ead1b071e98880ce66e10c4b3f620d1a68c1073242977754dab0fd29 | C++ | 1,901 | 103 | #include "qwt3d_surfaceplot.h"
#include "qwt3d_function.h"
#include <stdio.h>
using namespace Qwt3D;
using namespace std;
Function::Function()
:GridMapping()
{
}
Function::Function(SurfacePlot& pw)
:GridMapping()
{
plotwidget_p = &pw;
}
Function::Function(SurfacePlot* pw)
:GridMapping()
{
p... |
52a8b946d5b7d17ed7d286477c39a4e8bb034203f283c81549ec78e7244fdd9b | C++ | 1,906 | 79 | #include <iostream>
#include <unordered_set>
#include <cereal/archives/binary.hpp>
#include <cereal/types/unordered_set.hpp>
#include <graphtyper/constants.hpp>
#include <graphtyper/graph/node.hpp>
namespace gyper
{
/**********
* PUBLIC *
**********/
// VarNode::VarNode(Label && l, TNodeIndex && ori, std::unorder... |
38fbb275bfae7efb5cc7c44a8713ae402588929b47ece39ba8a603b85029d925 | C++ | 1,914 | 98 | #include "memusage.hpp"
#include <istream>
#include <fstream>
#include <sstream>
#include <sys/time.h>
#include <sys/resource.h>
namespace vg {
using namespace std;
string get_proc_status_value(const string& name) {
ifstream status_file("/proc/self/status");
string line;
while (status_file.good()... |
7676f6cf050305e053a007fd9fbfdc61595f0fbe93ceae6210c61ad0ca6a9635 | C++ | 1,919 | 64 |
#include <iostream>
#include <stdexcept>
#include <string>
#include <vector>
#include "vcf.h"
#include "VCFWriter.hpp"
#include "format.hpp"
using namespace std;
using namespace Osprey;
namespace Osprey {
VCFWriter::VCFWriter(const std::string& outputFile) {
this->outputFile = outputFile;
pBcfH... |
60ee7e115bc69d9a2aed91066c6d0a531a4450ede8db10a32ebbdcf50290548d | C++ | 1,929 | 60 | #include <cstdlib>
#include <string>
#include <map>
#include <utility>
#include <iostream>
#include <fstream>
#include "MapInterpolater.hpp"
#include "FileUtils.hpp"
namespace Genetics {
using std::vector;
using std::string;
using std::pair;
using std::make_pair;
using std::map;
using std::cout;
using ... |
3d8ffbf5aa0e866e8e910c299edb4ec89de29edfb4ef0e7739ad82c02532a1c2 | C++ | 1,930 | 55 | #include "gcsa_helper.hpp"
#include <vg/io/vpkg.hpp>
namespace vg {
//------------------------------------------------------------------------------
void load_gcsa(gcsa::GCSA& index, const std::string& filename, bool show_progress) {
if (show_progress) {
std::cerr << "Loading GCSA from " << filename << ... |
9b1f332f12ec8124020a4e35fd7c4be87110559033a8cfa45d2f143a660a0211 | C++ | 1,972 | 58 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... |
21d5aad05dce0a09922bb860cbb163153cf59e1bdf08cc04244b2c4b4b182f29 | C++ | 1,979 | 58 | #include "preflight.hpp"
#include <cstdio>
#include <cstdlib>
#ifdef __x86_64__
#include <cpuid.h>
#endif
namespace vg {
using namespace std;
// Define our error message so we can be clear that we're working with its address.
const static char* PREFLIGHT_FAIL_MESSAGE = "error[vg::preflight_check]: The CPU does not... |
c48061191fe9a4560b59993bff59550cce04ca86213560269ae926de0f712496 | C++ | 1,992 | 56 | /// \file decomposition_neighbors.cpp
///
/// Unit tests for for_each_neighbor(), which gives one traversal of each
/// neighboring net graph element.
#include "catch.hpp"
#include "../decomposition_neighbors.hpp"
#include "../integrated_snarl_finder.hpp"
#include "../snarl_manager_decomposition.hpp"
#include <bdsg/h... |
a2124b6e18a570f1dd6edc34f48c20da799c92242bffef4336e486abfc487c6e | C++ | 2,014 | 71 | /**
* \file identity_overlay.cpp: contains the implementation of IdentityOverlay
*/
#include "identity_overlay.hpp"
namespace vg {
using namespace std;
IdentityOverlay::IdentityOverlay(const HandleGraph* graph) : graph(graph) {
}
bool IdentityOverlay::has_node(id_t node_id) const {
ret... |
de4b088eb29c7620adccae3fce5f18cbcc2a70600b89fc87a14d2b09bd2f46bd | C++ | 2,029 | 53 | /**
* \file decomposition_lineup.cpp
* Builds the SnarlDecomposition implementations that tests compare, and the
* random inputs they are tested on.
*/
#include "decomposition_lineup.hpp"
#include "../../integrated_snarl_finder.hpp"
#include "../../snarl_distance_index.hpp"
#include "../../snarl_manager_decomposi... |
7f0e4313f92b2bdc3c0c50f91bd4d188fd13d51dc3d73f7f39e8b094f926605f | C++ | 2,032 | 74 | /** \file test_main.cpp
*
* Defines the "vg test" subcommand, which runs unit tests.
*/
#include <omp.h>
#include <unistd.h>
#include <getopt.h>
#include <iostream>
#include "subcommand.hpp"
#define CATCH_CONFIG_RUNNER
#include "unittest/catch.hpp"
using namespace std;
using namespace vg;
using namespace vg::s... |
28ef82201d0de26c1ee4d1fda3a829feb5f67000e51423e6961fa823ff631a80 | C++ | 2,041 | 69 | /// \file protobuf.cpp
///
/// unit tests for Protobuf linking and usage
///
#include <vg/vg.pb.h>
#include <google/protobuf/descriptor.h>
#include "../version.hpp"
#include "catch.hpp"
#include <iostream>
namespace vg {
namespace unittest {
using namespace std;
TEST_CASE("Protobuf reflection works", "[protobuf... |
0175c5361640e329841249556d1aaea89fbdc1773459b174cf6d260f6b2db25d | C++ | 2,054 | 53 | /*
Copyright (c) 2006-2010, The Scripps Research Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... |
0b51354e06ac0b1ed62031bae7390a83b1b1ad6450753f21fda75136b714ebd3 | C++ | 2,093 | 76 |
#include <iostream>
#include <stdexcept>
#include <string>
#include <vector>
#include "vcf.h"
#include "VCFReader.hpp"
#include "format.hpp"
using namespace std;
using namespace Osprey;
namespace Osprey {
VCFReader::VCFReader(const std::string& inputFile) {
this->inputFile = inputFile;
pBcfFile... |
d17499010358e93e0b637e49f637e9a02a6e0e2526090dcb63489d6556e0c2b9 | C++ | 2,099 | 71 | #include "algorithms/prune_to_connecting_graph.hpp"
#include <unordered_set>
#include <queue>
//#define debug
namespace vg {
namespace algorithms {
void prune_to_connecting_graph(DeletableHandleGraph& graph,
const handle_t& from, const handle_t& to) {
// we use these to remem... |
867a5bebcc0ca6804ac716619e0499f5133d159c5ca4ea24b37c9ebbc8d0022d | C++ | 2,138 | 55 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
06c0de8761207b3a612126e2b59576910372390ca2db96705bcd26cfcd4a9a4b | C++ | 2,149 | 59 | /**
* \file register_loader_saver_snarl_manager.cpp
* Defines IO for a SnarlManager from stream files.
*/
#include <vg/io/registry.hpp>
#include <vg/io/protobuf_iterator.hpp>
#include "register_loader_saver_snarl_manager.hpp"
#include "../snarls.hpp"
namespace vg {
namespace io {
using namespace std;
using name... |
237c3a75d7f9cb343758fd81beca996da2fd1a4f3f1c49c331988b6ae54ddd16 | C++ | 2,161 | 60 | //------------------------------------------------------------------------------
//
// Intan Technologies RHX Data Acquisition Software
// Version 3.5.2
//
// Copyright (c) 2020-2026 Intan Technologies
//
// This file is part of the Intan Technologies RHX Data Acquisition Software.
//
// This program is free softw... |
9918674bebbaa2ca19b7c8aa2e1570c3970258caf33924d4e4307dc55fdc788a | C++ | 2,168 | 70 | // Verify GUI tests isolate settings before QApplication caches the store,
// keeping temporary paths out of the user's UltraScan preferences.
#include "us3_gui_test_main.h"
#include "us_settings.h"
namespace
{
bool isWithin(const QString& child, const QString& parent)
{
const QString cleanChild = QDir::cleanPat... |
9d6a0f7748cb5c516b327a5b9f63abc2a0981e44c133151c5a9a64fc0b53dcc9 | C++ | 2,177 | 88 | /*
Place cell functions
One modification to note compared to original formulas this work is
derived from is that boundary cell input to place cells is limited to
a local region around the active place cell. This prevents boundary cell
signal from simply making an increase in signal of all place cells
indiscrimi... |
dfe2b83d348b6ea8d1b5f3928478d62770dcf477aaad53e50a4ab2cc752145f6 | C++ | 2,204 | 82 | #include <climits>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <string>
#include <graphtyper/graph/graph_serialization.hpp> // load_graph()
#include <graphtyper/index/indexer.hpp> // load_index()
#include <graphtyper/typer/vcf.hpp>
#include <graphtyper/utilities/typ... |
667613adac0bfec081e26ce2c23cb0872a8e6931bfa704823df747498eb7a17a | C++ | 2,220 | 78 | #include <cassert>
#include <cstdlib>
#include <stdlib.h>
#include <string>
#include <graphtyper/constants.hpp>
#include <graphtyper/graph/absolute_position.hpp>
#include <graphtyper/graph/graph.hpp>
#include <graphtyper/utilities/logging.hpp>
namespace gyper
{
AbsolutePosition::AbsolutePosition(std::vector<Contig> c... |
837cc62ea070acb25e06a176ee1a560a743a59702ade8ed443c925fec5ec3308 | C++ | 2,229 | 115 | #include "us_pabs_common.h"
HSVcolormap::HSVcolormap(){}
HSVcolormap::HSVcolormap(int n_colors)
{
hstart = 300;
hstop = 0;
nc = n_colors;
saturation = 255;
value = 255;
}
HSVcolormap::HSVcolormap(int n_colors, int hue_start, int hue_stop)
{
hstart = hue_start;
hstop = hue_stop;
nc = n... |
60030843890ac150631ab5aaf2b3704a1b8fc836df010fd370d54c07f5e78f3e | C++ | 2,242 | 54 | #include "catch.hpp"
#include <stdio.h>
#include <iostream>
#include "../varint.hpp"
namespace vg{
namespace unittest{
using namespace std;
TEST_CASE("Array of ints", "[varint]") {
SECTION ("[0]") {
varint_vector_t varint_vector;
varint_vector.add_value(0);
pair<size_t,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.