sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
7b7d1f2f69b9b5c378b1cb34b3c4b8a8964f2bbfbc2357840ce80e6dc587bd1e | C | 3,341 | 125 | /*
* 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... |
16557ca876909f1d896f540d3e0c1ac3f368f673aa6de4072f12ed5c6ac80e60 | C | 3,378 | 107 | #include <R.h>
#include <Rdefines.h>
#include <Rinternals.h>
#include "utils.h"
#include "dict.h"
#include "gtf.h"
#include "bed.h"
#include "htslib/kstring.h"
SEXP anno_bed(SEXP _chr, SEXP _st, SEXP _ed, SEXP _strand, SEXP _db, SEXP _up, SEXP _down)
{
int upstream = asInteger(_up);
int downstream = asInteger(... |
1122bc9b6b2d83e7d6a43235e191abba1eb96512b69c7848eead4777b87b7d3b | C | 3,415 | 97 | /*************************************************
* 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.
... |
00542f4e5f2b3bd040c4654d24c44efe8acb70884ce4e9629f04c880dace4917 | C | 3,434 | 130 | #include "utils.h"
#include "bed_lite.h"
#include "htslib/khash.h"
#include "htslib/kseq.h"
#include "htslib/kstring.h"
#include "number.h"
#include <zlib.h>
KSTREAM_INIT(gzFile, gzread, 8193);
KHASH_MAP_INIT_STR(name, int)
static int name2id(kh_name_t *hash, const char *name)
{
khiter_t k;
if (hash == NULL) ... |
d79546d9e68a4c95035b43a3678ff720763af241f8d0b90dca038763066b6f62 | C | 3,442 | 95 | /*************************************************
* 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.
... |
989bbffb2c62a28b600d3cba245b722f3888360604c4a97aeeb1686d81280200 | C | 3,455 | 151 | /*
* Squashfs - a compressed read only filesystem for Linux
*
* 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
* as published by the Free Software Foundation; either... |
3a4268e7c898ddfbfe6195eb30e9964b1a4fe4a28453133a90930d6a51440a40 | C | 3,483 | 125 | #include <R.h>
#include <Rinternals.h>
#include "utils.h"
#include "dict.h"
#include "Matrix/Matrix.h"
SEXP merge_matrix(SEXP x)
{
int N = length(x);
struct dict *rns = dict_init();
struct dict *cns = dict_init();
int nzmax = 0;
static const char *valid[] = {"dgCMatrix", ""};
for (int i = 0; i... |
6d9e552864a0717edd72d623ab8a93ed8c482d8b3123422e9d742ef78ae30618 | C | 3,497 | 111 | /*
* 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.
*
* warning.c
*
* Code generation for function 'warning'
*
*/
/* Include files */
#include "warning.h"
#includ... |
d061a386715e4a857db528e028b6fb7628051f916bd48679fb7484c2c6b83e53 | C | 3,508 | 89 | /*
* 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... |
4163223a7cfbc38ab0295b6718dfba7d8f217d3d6e78f0c791fd5719520e853f | C | 3,553 | 119 | #include "utils.h"
#include "number.h"
#include "bed.h"
static struct args {
int n_file;
const char **input_fnames;
const char *output_fname;
int upstream;
int downstream;
int stranded;
int check_name;
} args = {
.n_file = 0,
.input_fnames = NULL,
.output_fname = NULL,
.upst... |
70b3a29c03da5c249ef75fba5b895b3320a8a6a802757b484ae8e9e9f7326b4a | C | 3,554 | 128 | /*
* 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.
*
* find.c
*
* Code generation for function 'find'
*
*/
/* Include files */
#include "find.h"
#include "eml_in... |
f94ac14e6f7877c49a6635eb2876164fc7d6cbe9d7f020f6a858017d61763509 | C | 3,633 | 89 | /*************************************************
* 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.
... |
65693c8c7c1445ddf5cc1ff842380e41f49877b37be8187281d0db68e2142b9d | C | 3,643 | 201 | /*
Title: Process illumina data
Author: Alexandre Schoepfer
Version: 28th July 2021, 10:15 (GMT+1)
Notes: For Saccharomyces Cerevisiae
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BCHAR 4096
#define NCHAR 512
#define BCLEN 15
#define CIGCOL 5
#define ILLCOL 9
#define IQLCOL... |
03ea46198cba5fd5a04f1730827c0ec9d04adb18d7f302134812054c82a05cd3 | C | 3,656 | 139 | //
#include "utils.h"
#include "htslib/khash.h"
#include "region_index.h"
struct binlist {
int n, m;
void **a;
};
KHASH_MAP_INIT_INT(bin, struct binlist)
struct region_index {
khash_t(bin) *idx;
int size;
};
struct region_index *region_index_create()
{
struct region_index *idx = malloc(sizeof(st... |
2765909d779df986fb1b6bdf7cc7ed15885e4614f19afbcec1b1736b17f1bcd3 | C | 3,717 | 85 | /*************************************************
* 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.
... |
833e3f08556eb767417773b8ab32557cfcb3048de6407cf7c77617b8ec4b2369 | C | 3,721 | 110 | /*
* 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_data.c
*
* Code generation for function 'multitaper_spectrogram_coder_data'
*
... |
5fc9dbffab49110923cce9c6c7115fb779dce58f18f5fd2c7a61374a7038b385 | C | 3,729 | 135 | /*
* 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... |
53742625750de9dedc11b2cdf77010aca372e7bf59e2a4bc31103c5d0fc50295 | C | 3,763 | 116 | /*
* 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... |
5fc83bf96506e5856c33aa4d510539654cc392b68564f8ca5eeeb3d15f5b514b | C | 3,781 | 135 | /*
* 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.
*
* div.c
*
* Code generation for function 'div'
*
*/
/* Include files */
#include "div.h"
#include "multitape... |
6c4ff1aa60d33b8d4e4c48fc142e61607f81de07f0d983783c2dd81a7922b1dc | C | 3,849 | 131 | /*
* 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... |
cfb305bb60640eee4b9f7e6eb309e7b2e47ed2600cbd0005f2faf785fa370fcf | C | 3,854 | 185 | /*
* Copyright (c) 2016-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).
*/
/* DO_XXH sho... |
25ca3b513223c9d9dc1be12b9cc1735808948b9801017321d4bcf3b735c20515 | C | 3,901 | 138 | /*
* 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 <st... |
cdde5bebca0457a6fa246ae5b74464a8a9abe670442769b071ea7b260dc75fd5 | C | 3,931 | 125 | #include <stdio.h>
#include <string.h>
#include "block_aligner.h"
void example1(void) {
// global seq-seq alignment
const char* a_str = "AAAAAAAA";
const char* b_str = "AARAAAA";
size_t a_len = strlen(a_str);
size_t b_len = strlen(b_str);
SizeRange range = {.min = 32, .max = 32};
Gaps gaps... |
075c9c6333b95348cc6c6fc5d0ea3bf86c6c80281da53a95fd4143b28a924df9 | C | 3,956 | 122 | #include "utils.h"
#include "pisa_version.h"
#include <string.h>
typedef struct {
const char *version;
const char *date;
const char *note;
} pisa_release_t;
static const pisa_release_t releases[] = {
{"v1.8", "2026-06-02", ""},
{"v1.7", "2026-04-15", ""},
{"v1.6", "2025-05-29", ""},
{"v1.5... |
9060f808f6ba79ce43f1db2670da030d22949fd38aaaa637a3187e41f5f405cc | C | 3,996 | 151 | //
// main.c
// igv-launcher
//
// Created by Jim Robinson on 9/14/24.
//
// Launch IGV on MacOS (https://github.com/igvteam/igv).
//
// Code adapted from https://incenp.org/notes/2023/universal-java-app-on-macos.html
//
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <stri... |
27ce5bbab8949a7c5eacd6926ddc323a5b7b4569ed45b051aed2fadb3f91f839 | C | 4,076 | 95 | /*************************************************
* 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.
... |
1c7c442716f3856da3fe0c9f19d4e3ea0a53160120caf1dc92ff738d3161f17a | C | 4,113 | 143 | #include "utils.h"
#define compA 0x1
#define compC 0x2
#define compG 0x4
#define compT 0x8
#define compN 0xf
#define compR 0xa // 10, A or G
#define compY 0x5 // C or T
#define compS 0x6 // G or C
#define compW 0x9 // A or T
#define compK 0x3 // G or T
#define compM 0xc // 12, A or C
#define compB 0x7 // C or ... |
91db90cc761ea8378c9364df318f0ead0e75dea14291bcf9436106e0b7e49d9a | C | 4,144 | 164 | /*
* 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... |
6d65961af83c5615f23ce793126fdf5736ba9fdd894370e9c18b1787ad45cace | C | 4,157 | 156 | /* This is the read data program written by Ruibin Xi Oct 12, 2009.
* Modify the function read_table. The function read_table will ignore any lines that doesn't start from numbers
* Dec 27 2009
* Modified on Feb 1 2012 (In the earliear version, when the input file contains no numeric value, this program will freeze)... |
0d94f1794cac0690664fd6638bd6f363b2a06ae67b1d0e2849b8d2a0202e532f | C | 4,163 | 109 | #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
void align_prefix(BlockHandle block, PaddedBytes* a, PaddedBytes* a_3di, PosBias* a_bias, PaddedBytes* b, PaddedBytes* b_3di, PosBias* b_bias, const AAM... |
49538f9d84db26979b96a322b38bd76312cee3ec84e18762e643c8fc63860ad9 | C | 4,399 | 180 | /* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2005
Free Software Foundation, Inc.
NOTE: This source is derived from an old version taken from the GNU C
Library (glibc).
This program is free software; you can redistribute it and/or mo... |
eaa93c3190b77a3ef359fd843c5d59b5c7055ff2fd7a579ef6bd4953a8ecc6cc | C | 4,415 | 153 | /*
* Copyright (c) 2000-2007 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,
* ... |
88f39af8054463e9421427388da3439dce3d4e5be0e0de9782aa21cb79da49a7 | C | 4,426 | 138 | /* hfile_gcs.c -- Google Cloud Storage backend for low-level file streams.
Copyright (C) 2016 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 d... |
3c59ddbfd33f03499118ca7b286039686160be17c320bbbd0fa2d09fd9c4d073 | C | 4,427 | 162 | /*
Copyright (c) 2010, 2013, 2018-2019 Genome Research Ltd.
Author: Andrew Whitwham <aw7@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 not... |
536bd0d7ff0e36b5deda27315b1d6ae241a6756b61177929338fa95b9887cd62 | C | 4,428 | 79 | #include <R.h>
#include <Rinternals.h>
#include <R_ext/Rdynload.h>
/* Declare all .Call entry points */
SEXP alt_exp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
SEXP anno_bed(SEXP, SEXP, SEXP, SEXP);
SEXP anno_conseq(SEXP, SEXP, SEXP, SEXP, SEXP);
SEXP anno_gene(SEXP, SEXP, SEXP, SEXP);
SEXP anno_vcf(SEXP, SEXP, SEXP, ... |
264eb67435ebee27c0ccace8447e2147803264b3a598596714d80b2c20fc2ca8 | C | 4,435 | 162 | /* This is the read data program written by Ruibin Xi Oct 12, 2009.
* Modify the function read_table. The function read_table will ignore any lines that doesn't start from numbers
* Dec 27 2009
* Modified on Feb 1 2012 (In the earliear version, when the input file contains no numeric value, this program will freeze)... |
6fe1548281047e7f77511bcb6033089d30da377117a3aee22a225886db067e14 | C | 4,454 | 129 | /*
* 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).
*/
... |
4a1766ee6c65d28320deeb350a96e276c57c8214a5ec95a94177c69b69521802 | C | 4,464 | 170 | /*************************************************
* 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.
... |
a650d9215f5d4302a448d85b19c63d098048d7f49c65cbcc8b764b96a56ba096 | C | 4,523 | 130 | /*
* Copyright (c) 2015-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... |
638835594a6e7b0821bb3572df3796703a9500f4a1cf4c19430dca18b235b34a | C | 4,548 | 157 | /*
* 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... |
b910a3bf711e519c5d94f641ccdf3a973904a14448b1965b66e8f80da49e7ee0 | C | 4,623 | 168 | /*************************************************
* 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.
... |
5045b9f953afa1382ddd32bc44ef896d22b8107bc6e14b9f7a34b513e8f2901b | C | 4,655 | 141 | /*
* 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... |
09ce16fbe3b1747568ef8de9ef49a86c582f182fed96a460fab8292e238207e3 | C | 4,723 | 123 | /*
Copyright (c) 2010-2013, 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 the above copyright notic... |
44bf7e6a5c79b2b514b3e471950f4e953564286e0e837c221a454b1c072baef8 | C | 4,737 | 133 | /*
* 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... |
ed83ba85078b9ff833a2f64198a1ec452d006f9a76c23c09258eedcda9420a7d | C | 4,747 | 146 | /*************************************************
* 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.
... |
eb8914f517085837434d2a238a064150a57c048e85d5297df4ed782a5f32c2ad | C | 4,888 | 192 | // this file contains functions to query and update TAG and values in the name of FASTQ+
// TAG consist of two characters, [A-Za-z][A-Za-z0-9]
// Value is a string or type(on character):string. ACGTN or Z:ACGTN
#include "read_tags.h"
#include "htslib/kstring.h"
#include <ctype.h>
struct dict *str2tag(const char *seq... |
ceaf81f8ed056c4c4f618fb05629af45dfe6a0ceeadd834cd594005615e77aba | C | 4,905 | 211 | // Correct UMI for each cell barcode at one gene
#include "utils.h"
#include "htslib/khash.h"
#include "htslib/kstring.h"
#include "number.h"
#include "umi_corr.h"
/*
UMI structure
*/
struct kmer {
int cnt;
int idx; // correct to idx
char *kmer;
};
KHASH_MAP_INIT_STR(name, int)
static int check_sim... |
d7764c66acb114f758c0e239198acb2193ed78fbbe2ee6a5aa2d3a1bb4ccdc98 | C | 4,910 | 165 | #include "utils.h"
#include "htslib/hts.h"
#include "htslib/sam.h"
#include "htslib/kstring.h"
#include "number.h"
static struct args {
const char *input_fname;
const char *output_fname;
int file_th;
int n_tag;
int print_rname;
char **tags;
int all_value;
int mapq_thres;
} args = {
... |
894d82aaf335d8b78d8bc8c516a67e3546852f03384ba5b0d7177c61c1a041c7 | C | 4,919 | 162 | /*
* Copyright (c) 2016-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).
*/
/**
* This f... |
b16bdd8352119eaf4bde354a6d941dafffda0ddcdb4a1061324969c54244b1b5 | C | 5,012 | 173 | #include "htslib/kstring.h"
#include "bam_files.h"
#include "htslib/sam.h"
#include "htslib/hts.h"
struct bam_files *init_bam_line(const char *bams, int n_thread)
{
struct bam_files *files = malloc(sizeof(struct bam_files));
memset(files, 0, sizeof(struct bam_files));
files->n_thread = n_thread;
... |
aca90884e2454dc9f1c609063d78e6f44f845c058eb2462483c661ba1a75e0f2 | C | 5,042 | 204 | /*
Copyright (c) 2009, 2013, 2015, 2018-2019 Genome Research Ltd.
Author: Rob Davies <rmd@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 no... |
53cbd3ded9a830fd0f303e95f9e2534a2f8542007a5509a442acda8f8c5522b7 | C | 5,142 | 155 | #include "utils.h"
#include "gtf.h"
#include "htslib/kstring.h"
#include "bed.h"
int gtf_format_usage()
{
fprintf(stderr, "# Format and reorder GTF file.\n");
fprintf(stderr, "\n");
fprintf(stderr, "\x1b[36m\x1b[1m$\x1b[0m \x1b[1mPISA\x1b[0m gtffmt in.gtf\n");
fprintf(stderr, "\nOptions:\n");
fprin... |
0ad8c5e024cc910aa10154b4f074c5c6aa339e7afb946bc08a901077fe195cda | C | 5,268 | 166 | /*
* 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... |
2d9aacdff59106cd4f63f21e6a3f52f9554ad79a66d55787752d1cf3e109f4f8 | C | 5,294 | 212 | /*
* 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.
*
* sumMatrixIncludeNaN.c
*
* Code generation for function 'sumMatrixIncludeNaN'
*
*/
/* Include files */
#inc... |
0dad7338fb7920390196d792989cfa015e4096289e1492634b628c5b989973eb | C | 5,300 | 228 | /*
Written by Ruibin Xi
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <getopt.h>
#include <math.h>
#include <unistd.h>
#include "../lib/read.h"
typedef struct Interval_t{
int start, end;
} Interval;
typedef struct IntervalSet_t{
Interv... |
5213374799b16dbb521e432cb8c1b27517e7611e6c9149968c170b20093c960a | C | 5,305 | 165 | /*
* 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.
*
* fft.c
*
* Code generation for function 'fft'
*
*/
/* Include files */
#include "fft.h"
#include "multitape... |
101ce2e66ca637aff2794553f2c16ba5d67d0e628d2cd00db0c32aac265d8da8 | C | 5,324 | 162 | /**
* 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).
*/
... |
a04fa0619cf8c4a7a9b105870a339b9b383f5d6f043ff0ab20cf61274815191d | C | 5,334 | 147 | /*
* 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... |
f6ceb5f77be6aadfcb077bf0451fff04d8637d55703471b7d3fcb655fe47097f | C | 5,357 | 194 | /*
* 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).
*/
/*
* A simpl... |
da81a319650b8ba04bbcd299ecc0f988069db85b79fdf761b08d4a9b36470f55 | C | 5,390 | 163 | /*-*************************************
* Dependencies
***************************************/
#include <stdio.h> /* fprintf */
#include <stdlib.h> /* malloc, free, qsort */
#include <string.h> /* memset */
#include <time.h> /* clock */
#include "random.h"
#include "util.h"... |
6211f644c7a9e8cad88ba8fa71cb6a3d03cba0649264144dbb2ee34765b0084c | C | 5,520 | 161 | #include <stdio.h> /* fprintf */
#include <stdlib.h> /* malloc, free, qsort */
#include <string.h> /* strcmp, strlen */
#include <errno.h> /* errno */
#include <ctype.h>
#include "random.h"
#include "io.h"
#include "util.h"
#include "zdict.h"
/*-*************************************
* Console display
*********... |
d4c1b33c761fec8bfd73bfcc79effa6828a964345092d2484ac9168fd3313e27 | C | 5,550 | 188 | /* vcf_sweep.c -- forward/reverse sweep API.
Copyright (C) 2013-2014, 2019 Genome Research Ltd.
Author: Petr Danecek <pd3@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 Software w... |
adfcb3dea1ce47980a2cec9717b87f32d4e12f39ac90fec379f7556da3723842 | C | 5,600 | 148 | /*************************************************
* 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.
... |
7b5f3925187ce9a396405dd0c36153782dad9df6b8259f23a4575844deee7c3c | C | 5,650 | 185 | /* plugin.c -- low-level path parsing and plugin functions.
Copyright (C) 2015-2016 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... |
ab0790582bd24650587fa5f5be8ebe059f852f640d53c21e5ebfcb31aa2b9f54 | C | 5,659 | 250 | /*
* Copyright (c) 2016-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).
*/
/* Compressio... |
6b7b47d8c845bc7f100b945e6f5a50616f2c0d3fa0f7b704be411d5d28878421 | C | 5,679 | 220 | /* Written by ruibin Xi
* The input file should be of the form
*
* bin start | bin end | tumor1 count |matched normal1 count| ... | tumorK count
| matched normalK count|
Modified on Feb 18 2009 so that the tumor or normal count could be non-integer
* */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
... |
11bfdf4720e17b559a4304371e468adeaea935e5165e0a279c9d1f16994efc0a | C | 5,743 | 203 | #include "utils.h"
#include "bed.h"
#include "htslib/vcf.h"
#include "htslib/sam.h"
#include "htslib/kstring.h"
#include "number.h"
// return -1 on out of range
// -2 on intron region
// -3 on deletion
static int bam_seqpos(bam1_t *a, int pos)
{
int st = 0;
int i;
const bam1_core_t *c = &a->core;
int q... |
3cd99b73ef7979ae8d4a6351f67766c7164fb7458596bdc256e507aff6d973cf | C | 5,789 | 207 | #include "ITree.h"
static BElem find_max_subrbtree(rbtree_node node);
/*Given a node in the ITree (used a rbtree data structure)
find the maximum of the endpoints of the intervals rooted at the given node;
Here I use recursion to achieve the goal. Later, I may want to use non-recursion method
*/
static void ITre... |
24ecd0745ac902cb0c75f0ef7fd6a8b8737cb25edbbe4a5392d7590969bf5fe8 | C | 5,804 | 189 | #include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#define DEVICE_NAME "memristor_array"
#define CLASS_NAME "mem... |
1fee7f180bbbc22f21dcaafd19cbe1d77a96d1f96714c7caece63580bfbec9e8 | C | 5,835 | 209 | /*
* 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.
*
* eml_setop.c
*
* Code generation for function 'eml_setop'
*
*/
/* Include files */
#include "eml_setop.h"
#... |
97773b19d78dbfcf005ac5e389c18a83047cb966e8d1730972901127fdd3ab20 | C | 5,931 | 218 | #include "utils.h"
#include "htslib/sam.h"
#include "htslib/kstring.h"
#include "number.h"
#include "htslib/kseq.h"
static struct args {
const char *input_fname;
const char *output_fname;
int mapq_thres;
htsFile *in;
int n_tag;
kstring_t *tag_str;
int *s;
int n_thread;
} args = {
.... |
0547f0035ae15dac621a13549b46658460edd80aeb345d5cc4610da65091a0fa | C | 6,023 | 182 | /*
* 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... |
e237480148065f550320b35a85490eff5a0a66cb09e5433ef262a6b08d627dae | C | 6,031 | 208 | #ifdef _OPENMP
#include <omp.h>
#endif
#include<R.h>
#include<Rdefines.h>
#include <Matrix.h>
// # nocov end
extern int *random_idx(const int n);
extern int shuffle(double tmp[], int const idx[], const int n);
SEXP alt_exp(SEXP _A, SEXP _B, SEXP idx1, SEXP idx2, SEXP _mode, SEXP _perm, SEXP _threads)
{
CHM_SP A ... |
7984aa38ed5e321faf6e9a92437cac9e47e07c13cde9fc6e8d4f08f92c581cd0 | C | 6,046 | 215 | /*
* 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... |
15f60bf4c7f80f7451eace480724a567e83fd75eb778a8774d2fdf0dd1f35a5e | C | 6,067 | 167 | /*
C code written by Sabyasachi Sutradhar, Yale university (sabyasachi.Sutradhar@yale.edu) 2022
This code simulates a mean field approximation of branching morphogensis of Drosophila class-IV dendritic arbor.
branches are generates from a random point with rate k inside a box of length L and then allowed to grow with a... |
617a8c2da340c5c3ddc2b913172c73a7700a332b3531898591bd9f618351e9ba | C | 6,069 | 151 | /*
* Copyright (c) 2017-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... |
3a3c2226dc54a938589a4170845fe9a85ca2a01b7c45774c21acb1069b483d98 | C | 6,085 | 198 | /*************************************************
* 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.
... |
21d8a3019ec9d2dbd0ad0e8d6ab31d980bea33bf19ab2c673d03b8940915483a | C | 6,156 | 234 | // pick alignment reads by cell barcodes
#include "utils.h"
#include "number.h"
#include "htslib/khash.h"
#include "htslib/kstring.h"
#include "htslib/sam.h"
#include "htslib/khash_str2int.h"
#include "htslib/kseq.h"
#include "dict.h"
#include <zlib.h>
KSTREAM_INIT(gzFile, gzread, 8193);
static struct args {
cons... |
aa6d0275c1984492357c1473a0e164b6c8a149a30a281ced2e273b0bacdb2bc7 | C | 6,182 | 205 | /*
Copyright (c) 2012-2014, 2016, 2018 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 noti... |
69b5ed5f45998f36a67228f81013384ca242c3f43184de8038acf6146ebfa677 | C | 6,183 | 181 | #include "utils.h"
#include <string.h>
#include "htslib/hts.h"
#include "htslib/faidx.h"
#include "variant_type.h"
// Return the location of terminal codon on the sequence.
// Return -1 if no found.
int check_stop_codon(char *seq, char *p_end, int mito)
{
char *ss = seq;
char *se = p_end;
int i, l = 0;
... |
a16bf818e4c3e6ea5b0c6a68911b7e274a8d7339d53e929d88e4cd9628af853f | C | 6,213 | 279 | /*
* Copyright (c) 2016-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).
*/
/* Compressio... |
180fac55d108c333d49b4e700c3b67a3fe576d129ba9fe2f6501208559b2f03c | C | 6,278 | 184 | /*************************************************
* 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.
... |
4f4971ef38ff4d1b51685060d2adbc1fa4ddcfd3d0a6ca28d222723967e6de1a | C | 6,414 | 214 | // Calculate genomic coverage per cell/group tag
#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;
cons... |
8527da5103acaf27b024ba0a4305b0c310340ac2fe13859574be0c14e576850b | C | 6,500 | 232 | /**
* 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"... |
c7142128f936ecd2c127e474289d4a240ff1bbf943570deef1297eb6a0dec6ba | C | 6,582 | 202 | /*************************************************
* 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.
... |
c36aa2c1c15f92a48e4067e4c41d8eafe6093d591ea46b8cb4e088c6a49a5def | C | 6,591 | 209 | #include "utils.h"
#include "ksw.h"
#include "htslib/kstring.h"
#define MAX_SCORE_RATIO 0.9f
unsigned char nst_nt4_table[256] = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, ... |
83ba16fd39032f84976a4d4635eaa129721550f544f626273f813a902b4f1fb4 | C | 6,621 | 248 | /*
* 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.
*
* colon.c
*
* Code generation for function 'colon'
*
*/
/* Include files */
#include "colon.h"
#include "eml... |
fe3968e57bbd744b4a7dbdb923ef15105e5362a121b9d53a69f18afd48533ec7 | C | 6,631 | 183 | #include <stdio.h> /* fprintf */
#include <stdlib.h> /* malloc, free, qsort */
#include <string.h> /* strcmp, strlen */
#include <errno.h> /* errno */
#include <ctype.h>
#include "fastCover.h"
#include "io.h"
#include "util.h"
#include "zdict.h"
/*-*************************************
* Console display
******... |
cb6febabbaa983d9fea9ce968c955934a7ab51930ccbaeabeb0a2d7441283ec2 | C | 6,737 | 259 | /*
* 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... |
6b9a8ef26330aa843db8e385395b1df6a2a22489e4190240bf5fb78dc71d1298 | C | 6,764 | 244 | #include "utils.h"
#include "htslib/sam.h"
#include "htslib/kstring.h"
#include "htslib/hts.h"
#include "number.h"
static struct args {
const char *input_fname;
const char *output_fname;
htsFile *in;
FILE *out;
int filter;
int file_th;
int fasta;
int n_tag;
char **tags;
} args = {
... |
7417de6a2716cc27d248af85eca6fb388bb8edc1487705be5ed96879fb1b32cd | C | 6,782 | 253 | #include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include "kson.h"
/*************
*** Parse ***
*************/
kson_node_t *kson_parse_core(const char *json, long *_n, int *error, long *parsed_len)
{
long *stack = 0, top = 0, max = 0, n_a = 0, m_... |
420d621781303b01936d5fa1ef31a1574ed8b433a149bab4cf0f85add83ec487 | C | 6,784 | 224 | #ifdef _OPENMP
#include <omp.h>
#endif
#include<R.h>
#include<Rdefines.h>
#include <Matrix.h>
/* declared in cor_test.o via Matrix_stubs.c, resolved at link time */
extern int M_cholmod_free_sparse(CHM_SP *A, cholmod_common *Common);
SEXP imputation1(SEXP _X, SEXP idx, SEXP _W, SEXP _filter)
{
cholmod_common c;
... |
5107114a33bedf119489eafc37c58cd376af4910507829aceba1b7a04eb7bf6e | C | 6,854 | 256 | #include <pthread.h>
#include <stdlib.h>
#include <limits.h>
/************
* kt_for() *
************/
struct kt_for_t;
typedef struct {
struct kt_for_t *t;
long i;
} ktf_worker_t;
typedef struct kt_for_t {
int n_threads;
long n;
ktf_worker_t *w;
void (*func)(void*,long,int);
void *data;
} kt_for_t;
static... |
d98285ac250d78c18b2f922cbf2faa29741066a95843812beaa24f48d96c127c | C | 6,911 | 229 | /*
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... |
5bb526063e0f37741cb86d9e08c2ec1d7f9c3a6567759d03576032538a5e8aa1 | C | 7,067 | 233 | #include<R.h>
#include<Rdefines.h>
#include<Rinternals.h>
#include <assert.h>
#include "dict.h"
#include "gtf.h"
#include "htslib/kstring.h"
static int cmpfunc1 (const void *_a, const void *_b)
{
const struct gtf *a = *(const struct gtf**)_a;
const struct gtf *b = *(const struct gtf**)_b;
if (a->seqname !... |
aa592b3c6a5f63174c6217ccd9fc81995b4d59ffd8bb435c739197510c0f140e | C | 7,146 | 244 | /*
* 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 ... |
7e97a0ff02e46a3721c9a871bd96761e1df28f4fc009ee8332d12638f28adf15 | C | 7,226 | 254 | #include "read_thread.h"
#include "htslib/kstring.h"
#include "read_tags.h"
static char *copy_str(char *a)
{
if (a == NULL) return NULL;
return strdup(a);
}
void read_block_clear(struct read_block *b)
{
int i;
for (i = 0; i < b->n; ++i) {
struct read *r = &b->b[i];
if (r->name) free(r->... |
cb134a5fdea6c3151ff2bdb8618eb661e5b99bbf8c52f07653d6ac6f6b20521f | C | 7,239 | 264 | /***** Preamble block *********************************************************
*
* This file is part of h5py, a low-level Python interface to the HDF5 library.
*
* Copyright (C) 2008 Andrew Collette
* http://h5py.org
* License: BSD (See LICENSE.txt for full license)
*
* $Date$
*
****** End preamble block ************... |
200f74556ab910f9f017332a54234376ca3ab6f99d36cb734d57cb340da6deb2 | C | 7,260 | 264 | /*
* Copyright (c) 2017 rxi
*
* 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 limitation the
* rights to use, copy, modify, merge, publish, distri... |
7432d1356c611fa471b7fdaf1538dd8515bbbad42b40bc79573d331fa4a5c78e | C | 7,778 | 243 | /*
* 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
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.