sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
3fc9064b4484a6b04c571aa1652faa0b77ec1a9e44da484d4b0175ceec23c6b1
C
7,842
242
/* Written by Ruibin Xi */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <ctype.h> #include <time.h> #include <sys/time.h> #include "../lib/read.h" #include <getopt.h> #include <math.h> #include <unistd.h> #include "ITree.h" typedef struct args_countRead_t{ FILE *rea...
339798a528348f3b27ca6d2a13c7e86d3c9a83f6d4dc39e81a5c0c8c5e26f0a7
C
7,848
198
/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* This file contains character tables that are used when no external tables are passed to PCRE by the application that calls it. The tables are used only for charact...
71e8aacca5991f6909bffa163417dd1facfb59e226d61f462dbbfc359626d521
C
7,929
241
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
53a6ec779050b87092bf679f509f39268c8f51f51a6b3c6873f42035d3c0fa94
C
8,031
260
/* * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may select,...
abb035cce76f3ba665b4f433ff36ae9dc99585e6f50d3bcd8a5aadad3b4aaccb
C
8,056
333
/* * Copyright 2018, Chanhee Park <parkchanhee@gmail.com> and Daehwan Kim <infphilo@gmail.com> * * This file is part of HISAT 2. * * HISAT 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either versio...
5521169ff964e1b9535b762c1893f006d54e55d53a546cb5f31b64765c7d3718
C
8,097
213
/** * Copyright 2019-2023 by XGBoost contributors * * \file c-api-demo.c * \brief A simple example of using xgboost C API. */ #include <assert.h> #include <stddef.h> #include <stdint.h> /* uint32_t,uint64_t */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <xgboost/c_api.h> #define safe_xgbo...
2d5c2cec300d961f9a86e8591b55d2f4ce0e5bbda50b60b5e89a5e0de3adba07
C
8,126
319
#include "utils.h" #include "number.h" #include "fml.h" #include "fastq.h" #include "htslib/thread_pool.h" #include "htslib/kseq.h" #include "htslib/kstring.h" #include <zlib.h> KSEQ_INIT(gzFile, gzread) static int usage() { fprintf(stderr, "assem in.fq\n"); fprintf(stderr, " -t Threads.\n"); fpri...
6d478555cbf5ec3fec1328790395215edbdda742f98833c84c7e87cc1cc2e6de
C
8,231
149
#include "utils.h" #include "version.h" #include "pisa_version.h" #include <string.h> int usage() { fprintf(stderr, "\n\x1b[1mPISA\x1b[0m - a collection of tools for single cell data pre-processing and interpretation.\n"); fprintf(stderr, "Version: %s + htslib: %s\n", PISA_VERSION, HTS_VERSION_TEXT); fprint...
62abed5895582b11e8905df7e9325cab9960e14cac47eb01c9f0a5b19d78c7eb
C
8,544
203
/* ****************************************************************** hist : Histogram functions part of Finite State Entropy project Copyright (C) 2013-present, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, wit...
3b3f44e71fe9a48eca4f95687c73e6d9ddc364758f3c796bfeed034fc9039aa4
C
8,616
333
/* Copyright (C) 2016,2017 BGI Research Author: Shi Quan (shiquan@genomics.cn) 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...
4c08d219fe7ed275ad224e5f1d8eb84a64363b01940002690d7ecd71c564ab65
C
8,630
259
/* timeBEPeriod( BE , ms ) * [ BE , ms ] = timeBEPeriod * * MEX wrapper for Windows system calls timeBeginPeriod and timeEndPeriod. * These can be used to request higher precision timers for the calling * process. * * Input argument BE is a scalar char. If it is 'b' then timeBeginPeriod * is used. O...
2a4df22380cc7f5760ab62a0a31b01fe7937685ab0c66622efb8a9d310b2408e
C
8,699
217
#include <stdio.h> #include <string.h> #include "block_aligner.h" // max block size, assume that two seqs will not have a larger gap than this #define MAX_SIZE 4096 // threshold number of iterations where the score does not change for terminating alignment #define ITER 2 // compute traceback, which is slightly slowe...
90da6fcef4dfd36096a5e88f37c5b980cb220071ab760e873a1c824c1d492ca5
C
8,748
353
#include "dict.h" #include "htslib/khash.h" #include "htslib/kseq.h" #include "htslib/kstring.h" #include <zlib.h> typedef struct dict_val { int idx; int ref; } dict_val_t; KHASH_MAP_INIT_STR(name, dict_val_t) KSTREAM_INIT(gzFile, gzread, 8193) struct dict { int n, m; char **name; kh_name_t ...
4fdbfc06cad63b038f2c725be268b015baca41705ae3dcbf478e22a3c0607a0a
C
8,754
352
#include "dict.h" #include "htslib/khash.h" #include "htslib/kseq.h" #include "htslib/kstring.h" #include <zlib.h> typedef struct dict_val { int idx; int ref; } dict_val_t; KHASH_MAP_INIT_STR(name, dict_val_t) KSTREAM_INIT(gzFile, gzread, 8193) struct dict { int n, m; char **name; kh_name_t ...
0ac9d8b07b74c27bbca27c4be4d53c095fef93426c38848f6711a679224b750f
C
8,834
242
/* * Copyright (c) 2008 Yuta Mori All Rights Reserved. * 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 * restr...
3a6db6d07df28532920bf64f7a02b86f57ea610db7cc747a238643d69c6984d9
C
8,845
344
/* Copyright (C) 2016,2017 BGI Research Author: Shi Quan (shiquan@genomics.cn) 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...
84185f56d5fd2c34dd7108793801c4d5cc563a7291e2469d0433329bc4363baf
C
8,869
240
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
59d438b332563376a4465ebf8de4fde3610004143720182b9bd6fb47c043aeca
C
8,883
288
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
2e7c9184d16d3c00168b335fbecba704d4db54dcd22a6a61dde3a9ac7aead80e
C
8,950
339
#include "udf.h" #include "mem.h" #include "stdio.h" #include "stdlib.h" #include "time.h" #define C0 0.154 #define C1 1.9 #define C2 2.1 #define C4 0.88 #define rho 998.2 #define D0 0.00001003 #define SC 0.9 #define alpha_max 600000 /*900000*/ DEFINE_DIFFUSIVITY(Diff,c,t,i) { real De; real D...
c6d7b1a29b325110d5ee99cf4aebd54a8cd1ac2b0d1b86c222cddf524f5e6b7a
C
9,002
295
/* * Copyright (c) 2000-2008 Marc Alexander Lehmann <schmorp@schmorp.de> * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * ...
ef93a5858ae0ff3c455994d156eed86a31b359192d2c747be288cf25497e9e8f
C
9,185
155
/* Copyright (c) 2015 by Contributors * * This file was initially generated using the following R command: * tools::package_native_routine_registration_skeleton('.', con = 'src/init.c', character_only = F) * and edited to conform to xgboost C linter requirements. For details, see * https://cran.r-project.org/doc/m...
7d0d66cf8de3419564dffbcc5058d782a071f91859ac73a00b3d7a979b9ac42d
C
9,243
329
#include "dna_pool.h" #include "htslib/kstring.h" static const unsigned char seq_nt16_table[256] = { 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 1, 2, 4, 8, 15,15,15,15, 15,15,15,15, 15, 0 /...
15d99972073dad90c08a74f5d7504d70d7af0019d4a4eccbf8929a5ed261430b
C
9,248
283
/* The MIT License Copyright (C) 2010, 2013-2014 Genome Research Ltd. Copyright (C) 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 wit...
edb4d763af13f5d447cd09c463fbb321753456ff637f63bfc5d12a90a27bd392
C
9,253
277
/* * Stack-less Just-In-Time compiler * * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source ...
e695587b3e4ce0f74b864b983d0587fc9c2386f371e38634825e4b9accbafd83
C
9,404
274
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"...
cc8351c2e3ed8a019e22dc0856f981e955c4c96ef5acbd8b75c3d35d7130a33f
C
9,428
263
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
fe88069224e5053747225b85cd532c52d34c00eb80088c4b1fcd30d1ff6cd416
C
9,487
271
// Annotate bed files with GTF annotation. // Required a 6-column bed file, with format as "chr, start, end, name, score, strand". // Annotated tags such as genes and functional region will be put into extra columns, // therefore the output file is not exactly a formal bed file; the format of output file is // "chr, st...
b940c4313dd2436a63ed873126fb68e25a14033af38d7b66d401e14ee385d7cc
C
9,554
236
/* Common functions of New Generation Entropy library Copyright (C) 2016, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
a0c37b93fc957b9465c6d8bc467a77671b3ece54bde97c72b937ff86f3be27a7
C
9,560
335
#ifdef _OPENMP #include <omp.h> #endif #include<R.h> #include<Rdefines.h> #include <Matrix.h> extern int *random_idx(const int n); extern int shuffle(double tmp[], int const idx[], const int n); SEXP association_test1(SEXP A, SEXP B, SEXP C, SEXP _W, SEXP _perm, SEXP return_arr) { int n_perm = asInteger(_perm); ...
b2ceacdab4201d4f61600f11829f6159ff6b39cf2f36f9737576de259404105d
C
9,570
225
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
a804c35a93d3eeae4354af7b8b936faa83462d0a8e0020970f2bc49dc8b7a756
C
9,607
329
/* htsfile.c -- file identifier and minimal viewer. Copyright (C) 2014-2019 Genome Research Ltd. Author: John Marshall <jm18@sanger.ac.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 Softwar...
d3c18abd95ec868b0edd21edec246da5e3895df5342108c791e76e93646cb570
C
9,627
308
#define eps 2.2204460492503131e-16 #define doublemax 1e50 #define INF 2e50 #define listINF 2.345e50 #ifndef min #define min(a,b) ((a) < (b) ? (a): (b)) #endif #ifndef max #define max(a,b) ((a) > (b) ? (a): (b)) #endif /* Find minimum value of an array and return its index */ int minarray(doub...
8e03aaa00b35676d0c5457aa4bfec3fb6d8fccc37953fb7a4be8be17cab6f7c1
C
9,630
312
#include "utils.h" #include "htslib/sam.h" #include "coverage.h" #include "bed.h" #include "number.h" #ifdef _OPENMP #include <omp.h> #endif static struct args { const char *input_fname; const char *output_fname; const char *bc_list; const char *tag; const char *umi_tag; struct dict *barcodes;...
f4688aeb5e6f60d34d934173d7c379fe84edfd0fa5b13237da4c70332fb90b0e
C
9,631
357
#include "utils.h" #include "dict.h" #include "htslib/thread_pool.h" #include "htslib/sam.h" #include "htslib/bgzf.h" #include "htslib/kstring.h" #include "number.h" static struct args { const char *input_fname; const char *output_fname; const char *report_fname; int file_thread; int keep_dup;...
eb9f7db649b14e2005bdca6a065954760fb1f5e2e2c7fe2a92287f07206fb945
C
9,729
332
#include <R.h> #include <Rdefines.h> #include <Rinternals.h> #include <string.h> #include "utils.h" #include "htslib/sam.h" #include "htslib/hts.h" #include "htslib/bgzf.h" #include "htslib/tbx.h" #include "htslib/kstring.h" #include "coverage.h" #include "dict.h" SEXP depth2matrix(SEXP _fname, SEXP _name, SEXP _star...
f89d8531ca584ccc496366a2a11de992ce05090e53cadcb3822fd6fd33fd71e7
C
9,730
368
/*written by Ruibin Xi April 26 2010*/ #include "pos_cnt_lst.h" static COUNT_LST_NODE cnt_node_create(int read_count); /*creat a new node of type COUNT_LST_NODE given a read_count at certain position*/ static POS_LST_NODE pos_node_create(int pos, int read_cnt); static void LST_add(LST lst, int pos, int read_cnt); st...
bb574a799f8cf9fcaeaeb202dab5247f349569dd46eedbc09d0e6e0f37afbce3
C
9,918
310
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"...
3d2ffd7f6e0eb35d374620b184f59bfbcafca4c5263ac38eb3c73a476ab7f09d
C
10,021
424
/* The MIT License Copyright (C) 2011 by Attractive Chaos <attractor@live.co.uk> Copyright (C) 2013-2018 Genome Research Ltd. 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 withou...
0648da0c676f7a1602046e802916fc57546edfc9998c6e6971541899902803d0
C
10,131
299
/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
ac7f5dbc0322776db1f7c591236d9a9dfdf7818d2323722f76832e8911142d12
C
10,229
378
#include "utils.h" #include "htslib/tbx.h" #include "htslib/bgzf.h" #include "htslib/kstring.h" #include "dict.h" #include "bed.h" #include "region_index.h" #include "number.h" #include "pisa_version.h" #ifdef _OPENMP #include <omp.h> #endif static struct args { const char *input_fname; const char *bed_fname; ...
0bc114471610d7c375adc6310e41686ded1124cea350cee15deaef091b7377e4
C
10,386
321
/* Written by Ruibin Xi */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <ctype.h> #include <time.h> #include <sys/time.h> #include "../lib/read.h" #include "../lib/gamma.h" #include <getopt.h> #include <math.h> #include <unistd.h> static int HghLevelBinCount = 100; /*For com...
7b08f32e9f30ee1d11ae6cbe7d79bef62d15b8d89db72d0f7f6579110d37745e
C
10,475
432
/* * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be us...
9be391b16fb7b6c9676dabac497496eac7f3f53a474a7836329ff78abfaff834
C
10,616
445
#include "utils.h" #include "htslib/khash.h" #include "htslib/kstring.h" #include "sim_search.h" #define BASE_TERM 0x0 #define BASE_A 0x1 #define BASE_C 0x2 #define BASE_G 0x3 #define BASE_T 0x4 #define BASE_N 0x5 //static int kmer_min = 5; static int kmer_max = 21; static int kmer_size = 5; typedef struct ss_...
92e7da9aeb572bdf9885ace5b66819558062e98d583efd3a2f8ec3eeca27a43d
C
10,640
401
#include "utils.h" #include "number.h" #include "htslib/kstring.h" SEXP parse_var_names(SEXP name) { int l = Rf_length(name); SEXP sl = PROTECT(allocVector(VECSXP, 5)); SEXP chr = PROTECT(allocVector(STRSXP, l)); SEXP start = PROTECT(allocVector(INTSXP, l)); SEXP ref = PROTECT(allocVector(STRSXP, ...
efeb27120383b8a9b817dbe8c7f3a86ffb72bc6f6abe6c6fdafec68825e094b4
C
10,713
448
/* textutils.c -- non-bioinformatics utility routines for text etc. Copyright (C) 2016, 2018-2019 Genome Research Ltd. Author: John Marshall <jm18@sanger.ac.uk> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), ...
d604c6badd66303a2b6e0c81c60cfa80f79c7ddb16b5c1ddccff23ea2880da86
C
10,750
254
/* fitblk.c contains minimal changes required to be compiled with zlibWrapper: * - #include "zlib.h" was changed to #include "zstd_zlibwrapper.h" * - writing block to stdout was disabled */ /* fitblk.c: example of fitting compressed output to a specified size Not copyrighted -- provided t...
9f1f0dfdc3bcf8876214ff3b9d2c52a022ae39da1bab6105ac8f6b60e756aa54
C
10,769
366
/* * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). */ #include <std...
5b23ed2215907a69acd66df7a1377e6e8d9b6df611d544a9b98e27ebdc0f83d9
C
10,909
332
/* * FSE : Finite State Entropy decoder * Copyright (C) 2013-2015, Yann Collet. * * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * ...
131e56f996ad3227632cc656eccadb352c2a2a160b7d830df540cccf80deeec2
C
10,951
340
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
9759747705f1dc9344cdc7e954b8dc2158ccf887cb1a9bdfce63d45aeaab63c4
C
10,955
422
/* Title: Read Illumina Barcode Author: Alexandre Schoepfer Version: 28rd July 2021, 10:15 (GMT+1) Notes: */ #include <stdio.h> #include <string.h> #include <stdlib.h> #define NOT_FOUND 0 #define FOUND 1 #define LOW_QUALITY 2 #define WRONG_SIZE 3 unsigned long lookupTableLength = 0; unsigned long dataLength = 0...
557cd621ebc3776773290f027d63ad564803cb118d24c370b1cc1bd874c4095c
C
11,057
362
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
5c668d5353627f450af6286b205c9b879f736dce24e3662a5eca1bb41fbe8db0
C
11,065
381
// gene_fusion.c -- intepret gene fusions based on UMI tagged cDNA library. // // #include "utils.h" #include "htslib/sam.h" #include "htslib/kstring.h" #include "number.h" #include "dict.h" static struct args { const char *input_fname; int qual_thres; const char *gene_tag; const char *cell_tag; co...
b288251a1cb24fbc069375ccdbe2e87d73f68be8b3a75f8fb7230199665fd157
C
11,088
432
/* * Copyright 2018, Chanhee Park <parkchanhee@gmail.com> and Daehwan Kim <infphilo@gmail.com> * * This file is part of HISAT 2. * * HISAT 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either versio...
d3e03bd0fdc0228861873c6165cb1fd7e2775f1545ae334a78fb2978ae66b385
C
11,172
355
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * qr.c * * Code generation for function 'qr' * */ /* Include files */ #include "qr.h" #include "eml_int_forl...
70ee245827e72d7e94f67d14403e376446a81177e9c3ce1f9d59a1459acfc343
C
11,179
309
/* ****************************************************************** FSE : Finite State Entropy decoder Copyright (C) 2013-2015, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are p...
00dbed8d15a08249d18dfddcd9cf64f3a8330736b1312b5d46326d38fe82cb0b
C
11,485
401
/* Copyright (C) 2016,2017 BGI Research Author: Shi Quan (shiquan@genomics.cn) 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...
eb28ca6ecf4d7c4e96e197502a1bfde0c89e016b4cc9f23e65770527febfa6d1
C
11,661
284
#include <stdio.h> /* fprintf */ #include <stdlib.h> /* malloc, free, qsort */ #include <string.h> /* strcmp, strlen */ #include <errno.h> /* errno */ #include <ctype.h> #include "io.h" #include "fileio.h" /* stdinmark, stdoutmark, ZSTD_EXTENSION */ #include "platform.h" /* Large Files support */ #inclu...
f026c1464b04682c46377c2a1508b18f4bccc3c0bc0c3c02e671a50c4e61fd2e
C
11,748
290
/* realn.c -- BAQ calculation and realignment. Copyright (C) 2009-2011, 2014-2016, 2018 Genome Research Ltd. Portions copyright (C) 2009-2011 Broad Institute. Author: Heng Li <lh3@sanger.ac.uk> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated d...
4687fea6053f3145e724a3a239f7e851a701067c68338c670cf1c63cb05ee23b
C
11,772
404
// Count all reads and reads with predefined tag for each cell barcode in the bam file #include "utils.h" #include "number.h" #include "htslib/khash.h" #include "htslib/kstring.h" #include "htslib/sam.h" #include "htslib/kseq.h" #include "dict.h" #include <zlib.h> #include "biostring.h" #include "read_anno.h" static s...
5db0b964ad4cb338d29e6917bfb41433b53efd07f327079856da0fb3d67a9fdb
C
11,994
455
/* Title: Parse PacBio Alignement main Author: Alexandre Schoepfer Version: 28th July 2021, 10:15 (GMT+1) Notes: - TODO: memory allocation checks - TODO: dynamic memory for parseCS */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #include "libsccod...
5abc4088d4a6b1b647b5d180ee448bf5ad2afca1768cb69d9e424f2a03110ecc
C
12,014
400
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * sum.c * * Code generation for function 'sum' * */ /* Include files */ #include "sum.h" #include "eml_int_f...
a2934f6599d5d195c492ef0933979cd3c118cf55fcaa8e51d5667adcea3256dc
C
12,262
312
/* The MIT License Copyright (C) 2003-2006, 2008-2010 by Heng Li <lh3lh3@live.co.uk> Copyright (C) 2016-2017 Genome Research Ltd. 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 wi...
6d5d8182454ecf41a4eb465eda47fbc40e8acd3e4df8fc48f4a66a0a5b09147a
C
12,271
426
/* Copyright (c) 2009 the authors listed at the following URL, and/or the authors of referenced articles or incorporated external code: http://en.literateprograms.org/Red-black_tree_(C)?action=history&offset=20090121005050 Permission is hereby granted, free of charge, to any person obtaining a copy of this software an...
9d25065060492914bae7daeb459d71a7042c56c20bebdfe5148d7713ac122737
C
12,539
432
#include "utils.h" #include "htslib/sam.h" #include "htslib/hts.h" #include "htslib/kstring.h" #include "htslib/tbx.h" #include "htslib/bgzf.h" #include "dict.h" #include "number.h" #include "region_index.h" #include "bed.h" #include "bam_region.h" // TN5 offsett // reads aligning to the + strand were offset by +4 bps...
735ddcf58a64c15b01068c97c22bd76e2fb800210fde03fed44eb70e5c85f3de
C
12,747
454
#include "bin.h" static double lambda = 1; static double N = 0.0,logN = 0.0; /*total number of reads and log total number of reads*/ static int num_sample=1; /*number of samples*/ static int flag_BIC_diff = 1; /*flag if it's the first time to call the function BIC_diff*/ static bin_list * bin_from_array(double *lin...
4f41dafc8f0f28a3341d0699d120d9038f6765efcc7610bb6b5046dcaebd088f
C
12,978
500
/* * xxHash - Extremely Fast Hash algorithm * Copyright (C) 2012-2016, Yann Collet. * * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met:...
d7deebd14e809c57ce737dbf4a5a594c6e2ff73c93fd08c560d564fe99c4885d
C
13,059
343
#include "mex.h" #include "math.h" /* RK4 is a function which performs one step of the Runge-Kutta 4 ray tracing * * EndPoint = RK4(StartPoint, GradientVolume, StepSize); * * inputs : * StartPoint: 2D or 3D location in vectorfield * GradientVolume: Vectorfield * Stepsize : The stepsize * * outp...
10ceb44e7d5572c639a25333e2578e7631b5f427265348de731d6f1c3715e267
C
13,184
419
#include "utils.h" #include "htslib/sam.h" #include "htslib/kstring.h" #include "dict.h" #include "number.h" #include "bed.h" #include "coverage.h" const static int ws1m = 1000000; static struct args { const char *input_fname; const char *output_fname; const char *bc_list; const char *tag; // cell bar...
ef8af3c43623c7a204cd384ff5a2422e1021822e1da033bae39fbaf1f7570a4a
C
13,326
369
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * _coder_multitaper_spectrogram_coder_api.c * * Code generation for function '_coder_multitaper_spectrogram_cod...
677ea4ed6fc7f8da555d8bff659f552a76c18ecee0be662a6c0790cd51214af9
C
13,437
396
/* Copyright (c) 2015, 2018-2019 Genome Research Ltd. Author: James Bonfield <jkb@sanger.ac.uk> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, th...
7628fe76409c474618998c38419730130c90db090cab90798cd3d80331da25fa
C
13,500
458
#include "utils.h" #include "fastq.h" #include "number.h" #include "dict.h" #include "fastq.h" #include "read_tags.h" #include "htslib/thread_pool.h" /* #ifdef _OPENMP #include <omp.h> #endif */ static struct args { const char *input_fname; const char *output_fname; const char *report_fname; const char ...
f7af2f04198de56258749fb62a17580e06f4b5db61d75a6cfe7322b921b53a1b
C
13,996
437
/* Author: James Bonfield Copyright (c) 2000-2001 MEDICAL RESEARCH COUNCIL All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, th...
c1b951c54181ab85131dc38511f9cac8a5c690141d5edaf45d70adf06f51bb19
C
14,148
467
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <math.h> #include <time.h> #include <getopt.h> #include "../lib//read.h" #include "pos_cnt_lst.h" #define GAP_ERROR 2 static int min_dist_to_gap = 1000000; static int tt_read_mp = 0; /*total reads processed on the mappable position...
be41e0fca3780505640b03d1b969a2b3e1414e58a9f45d795a5b25e2d7dcb06a
C
14,358
443
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * multitaper_spectrogram_coder_emxutil.c * * Code generation for function 'multitaper_spectrogram_coder_emxutil...
1d17109e9fa66fca6d526682d2db498d2fc82d20b8bbc37d5be81040f2944880
C
14,616
462
/* tbx.c -- tabix API functions. Copyright (C) 2009, 2010, 2012-2015, 2017-2019 Genome Research Ltd. Copyright (C) 2010-2012 Broad Institute. Author: Heng Li <lh3@sanger.ac.uk> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation file...
d8432be186d2ccc69b0f1b19ad63ab1db44b7d3d8beafa11db647cb556d8ec75
C
14,672
517
/* * Stack-less Just-In-Time compiler * * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source ...
92d5d813e344fcc25505c99946db79eb24503299eb19e7530e7a0162b8febbe7
C
14,684
534
#include <R.h> #include <Rdefines.h> #include <Rinternals.h> #include <Matrix.h> #include "utils.h" #include "dict.h" #include "perm.h" #include "variant_type.h" #include "htslib/kstring.h" #include "htslib/hts.h" #include "htslib/vcf.h" #include "htslib/tbx.h" #include "htslib/bgzf.h" #include "htslib/faidx.h" SEXP v...
8ec28145eb6c0b8b08e7c71149801e62723f42f9a1e788d2ebaa655d50b222a0
C
15,107
428
#include "utils.h" #include "coverage.h" #include "bed.h" struct depth *depth_init() { struct depth *d = malloc(sizeof(*d)); if (d == NULL) error("Failed to allocate memory."); memset(d, 0, sizeof(*d)); d->id = -1; return d; } void depth_destroy(struct depth *d) { for (;d;) { struct dep...
4bc819287a3475e30366a9b439ecae4b66548cf657347fa59e378b354ee7dec8
C
15,193
546
#ifdef _OPENMP #include <omp.h> #endif #include<R.h> #include<Rdefines.h> #include <Matrix.h> #include <assert.h> #define CACHE_PER_BATCH 10000 #define MIN_HIT 1 extern int *random_idx(const int n); extern int shuffle(double tmp[], int const idx[], const int n); double *sp_colsums(CHM_SP A, Rboolean mn) { dou...
be3e1ef8101a0ddb21769b0a4afa9f12e926039b8c446aa4c4ef3eab9c3859f2
C
15,329
440
#ifdef _OPENMP #include <omp.h> #endif #include<R.h> #include<Rdefines.h> #include <Matrix.h> extern int *random_idx(const int n); extern int shuffle(double tmp[], int const idx[], const int n); extern void smooth_W(double * const a, double *s, const int N, CHM_SP W); struct val { int v1; // feature int v2;...
b76891623a31f1957f8693e9e4ca9ac2ea5dac8cb1d246cdde26d8dc17be8f19
C
15,495
640
/* minigzip.c contains minimal changes required to be compiled with zlibWrapper: * - #include "zlib.h" was changed to #include "zstd_zlibwrapper.h" */ /* minigzip.c -- simulate gzip using the zlib compression library * Copyright (C) 1995-2006, 2010, 2011 Jean-loup Gailly. * For conditions of distribution and...
1e16dbac4fad141b8e061b1ff68c8862da45bda2a9b6f3cf0e6d52114a93bfe6
C
15,524
464
/* * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may select,...
660ad1e4998bf1604da1eed166c2673c97d6d24917ad89bbde665643bf419225
C
15,526
422
/* bgzip.c -- Block compression/decompression utility. Copyright (C) 2008, 2009 Broad Institute / Massachusetts Institute of Technology Copyright (C) 2010, 2013-2019 Genome Research Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentat...
d2367d1728758afbe17c80cac9d8f4bf1854b299da26757a008090e3912e43f6
C
15,779
442
#include <stdio.h> /* fprintf */ #include <stdlib.h> /* malloc, free, qsort */ #include <string.h> /* strcmp, strlen */ #include <errno.h> /* errno */ #include <ctype.h> #include <time.h> #include "random.h" #include "dictBuilder.h" #include "zstd_internal.h" /* includes zstd.h */ #include "io.h" #include "util.h...
55aa3e1389111772e951d530acc9d9568e23957ec7d2f42e179d9fbd3bbcdfd6
C
15,897
371
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
3923b923a08f375027d94fcd96f2ad38f79068192f37824f0562adce53e281b5
C
16,215
617
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
3a473ff676555c24f9c480da860973c0fa22ae590c1d5ef415f8bff9698bf4dc
C
16,286
590
#include <assert.h> #include <err.h> #include <strings.h> #include "blast_defline.h" #include "blast_utils.h" asn1_t *init_asn1(const char *filename, uint32_t *block_lens, uint32_t num_oids) { asn1_t *asn1 = alloc_memory(NULL, sizeof(asn1_t), 0, 1); asn1->asn1_file = open_file(filename, "r"); asn1->buffer = NUL...
773bec541ea8358a969f389f7176853296756ea2e271d0583666a685c5eb9088
C
16,500
671
#include "gamma.h" static void gser(double *gamser, const double a, const double x, double *gln); static void gcf(double *gammcf, const double a, const double x, double *gln); static double betacf(const double a, const double b, const double x); double gammln(const double xx) { int j; double x,y,tmp,ser; stati...
1de368d854938a30e34a7a2d2c40dc5d3bbda921789fde88b20a908e3999c441
C
17,239
668
/* Copyright (c) 2005-2006, 2008-2009, 2013, 2015, 2017-2019 Genome Research Ltd. Author: James Bonfield <jkb@sanger.ac.uk> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain th...
9480dd570daea2d27ddf7fa0265744b33213b9a04e5998e3bc548651cc8d4084
C
17,599
640
/* gzlib.c contains minimal changes required to be compiled with zlibWrapper: * - gz_statep was converted to union to work with -Wstrict-aliasing=1 */ /* gzlib.c -- zlib functions common to reading and writing gzip files * Copyright (C) 2004-2017 Mark Adler * For conditions of distribution and use, see http://...
bd20fd6582621b44b6fd78f23232db7c44ea8c4f2f7a61795f05e8689607c535
C
17,604
618
/* example.c -- usage example of the zlib compression library */ /* Copyright (c) 1995-2006, 2011 Jean-loup Gailly This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to a...
a52a5025aedbc913015901679bd6c958cce80c59bdf8501e5f92df9573e0e0fb
C
17,987
687
#include "utils.h" #include "rld0.h" #include "rle.h" #include "mrope.h" #include "htslib/kstring.h" #include "htslib/thread_pool.h" #include "read_thread.h" #include "read_tags.h" #include "ksw.h" #include "fml.h" #include "number.h" #include "mag.h" extern int ksa_sa(const unsigned char *T, int *SA, int n, int k); e...
8954bcbc0aec5b2d05c828b3da8f819712ff578cdafb006e4a64eebd80bbc067
C
18,231
391
/* * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * Yo...
f08ac45953f32f6b2cdd45bbe6be104f7b11dfaa6a5cb566ec28ebb2b7d4e075
C
18,239
629
/* example.c contains minimal changes required to be compiled with zlibWrapper: * - #include "zlib.h" was changed to #include "zstd_zlibwrapper.h" * - test_flush() and test_sync() use functions not supported by zlibWrapper therefore they are disabled while zstd compression is turned on */ /* example.c -- us...
920599393e47b11f040e98dc64efd3c06421fbdc917e5aa706ab50788a97143e
C
18,289
636
/* uSynergy client -- Implementation for the embedded Synergy client library version 1.0.0, July 7th, 2012 Copyright (c) 2012 Alex Evans This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Per...
7898e849f2f8da931288acfff2f74669cb04337a14bba4137e86e7b025211416
C
18,352
640
#include "utils.h" #include "htslib/sam.h" #include "htslib/kstring.h" #include "htslib/hts.h" #include "htslib/bgzf.h" #include "number.h" #include <sys/stat.h> #include "dict.h" #include "pisa_version.h" struct fp_out { BGZF *barcode_fp; BGZF *feature_fp; BGZF *mex_fp; }; struct files { char *path; ...
8f18b3c43721572a2a02578d67bc9bfb57fdd8673513c327a8b88afd17957a56
C
18,362
786
/* * TINYEXPR - Tiny recursive descent parser and evaluation engine in C * * Copyright (c) 2015, 2016 Lewis Van Winkle * * http://CodePlea.com * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of ...
6e3a3b069892610b0c0dc88a7c88c3b8bbb4b82ed79257f0a9bc23c8eb1d19a2
C
18,424
423
#include "uthash.h" #include <stdbool.h> typedef struct _UndirectedEdge UndirectedEdge; typedef struct _DirectedEdge DirectedEdge; typedef struct _Node Node; typedef struct _NodeIndexPair NodeIndexPair; typedef struct _LongToDirectedEdgeList LongToDirectedEdgeList; typedef struct _ReturnElems2 ReturnElems2; // NOTE: ...
f9937c46184c3e2efe5746ea9501efd134b4ddc0611ce31a6c872f06f1483b68
C
18,429
692
#include "utils.h" #include "rld0.h" #include "rle.h" #include "mrope.h" #include "htslib/kstring.h" #include "htslib/thread_pool.h" #include "read_thread.h" #include "read_tags.h" #include "ksw.h" #include "fml.h" #include "number.h" #include "mag.h" static unsigned char nt6_tab[256] = { 5, 5, 5, 5, 5, 5, 5, 5, ...
894106f47295130015951f9e1f3a1494b1b970f2be0ff305b6adc38cfa7a8bc7
C
18,822
513
#include "mex.h" #include "math.h" #include "common.c" /* * This function MSFM2D calculates the shortest distance from a list of * points to all other pixels in an image, using the *Multistencil Fast Marching Method (MSFM). This method gives more accurate *distances by using second order derivatives and cross neig...