repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
bravegnu/mzero
src/clock.h
#ifndef CLOCK_H #define CLOCK_H #include <vector> class ClockedIf { public: virtual void execute(void) = 0; }; class Clock { private: std::vector<ClockedIf *> m_clocked_list; public: Clock(); void add_clocked(ClockedIf *clocked); void tick(); }; #endif
bravegnu/mzero
src/alu.h
<reponame>bravegnu/mzero // -*- mode: c++ -*- #ifndef ALU_H #define ALU_H #include "decoder.h" #include <cstdint> class ALU; typedef void (ALU::*ALUOp)(); enum class ShiftType { LSL, LSR, ASR, RRX, ROR, }; class ALU { private: uint32_t *m_regs; bool *m_c; bool *m_v; bool *m_n; bool *m_z; ui...
bravegnu/mzero
src/utils.h
<reponame>bravegnu/mzero<filename>src/utils.h #ifndef UTILS_H #define UTILS_H #include <stdexcept> #include <cstring> #include <string> class IOError: public std::runtime_error { public: IOError(int err, std::string message): std::runtime_error(message + strerror(err)) {} }; #endif
bravegnu/mzero
src/sysbus.h
#ifndef SYSBUS_H #define SYSBUS_H #include <vector> #include <cstdint> #include "device.h" struct SysDevice { uint32_t base_addr; DeviceIf *device; }; class SystemBus: public DeviceIf { private: std::vector<SysDevice> m_devs; public: SystemBus(); void register_device(uint32_t base_addr, DeviceIf *dev); ...
bravegnu/mzero
src/arm.h
<reponame>bravegnu/mzero #ifndef ARM_H #define ARM_H #include <cstdint> #include "clock.h" #include "sysbus.h" #include "decoder.h" #include "alu.h" #include "debug.h" class CortexM0: public ClockedIf { private: static const int MAX_REGS = 16; uint32_t m_regs[MAX_REGS]; bool m_c; bool m_o; bool m_n; bool...
bravegnu/mzero
src/device.h
<filename>src/device.h #ifndef DEVICE_H #define DEVICE_H #include <cstdint> class DeviceIf { public: virtual uint32_t read32(uint32_t addr) = 0; virtual void write32(uint32_t addr, uint32_t data) = 0; virtual uint32_t get_size() = 0; }; #endif
bravegnu/mzero
src/memory.h
#ifndef MEMORY_H #define MEMORY_H #include "device.h" #include <string> #include <cstdint> class Memory: public DeviceIf { private: uint8_t *m_memory; unsigned int m_size_kb; uint32_t m_base_addr; public: Memory(unsigned int size_kb); void load_bin(std::string filename, uint32_t offset); uint32_t read32...
AUAC-Technologies/AUAC-Core-Telemetry
Pipeline/PACKAGE_JSON.h
<reponame>AUAC-Technologies/AUAC-Core-Telemetry<filename>Pipeline/PACKAGE_JSON.h /*MIT License Copyright (c) 2020 <NAME> 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, inclu...
UMM-CSci-3403-Fall-2018/lab-3-memory-management-and-multi-dimensional-arrays-in-c-megabittronmini
mergesort/mergesort.c
#include<stdlib.h> #include<stdio.h> #include"mergesort.h" //There's no need to sort an array less than size 2 bool needsSorting(int rangeSize) { return rangeSize >= 2; } void mergeRanges(int *values, int start, int midPoint, int end) { int rangeSize = end - start; int *destination = (int*) calloc(rangeSi...
UMM-CSci-3403-Fall-2018/lab-3-memory-management-and-multi-dimensional-arrays-in-c-megabittronmini
array_merge/array_merge.c
#include<stdlib.h> #include<stdio.h> #include"array_merge.h" #include"../mergesort/mergesort.c" int* array_merge(int num_arrays, int* sizes, int** values) { // Count how many elements are in all arrays int total_values = 0; for (int i = 0; i < num_arrays; i++) { total_values += sizes[i]; } // If there ...
Jakobimatrix/warning_guards
test/third_party_headers/register.h
void f(int x) { //register int y = 2 * x; }
Jakobimatrix/warning_guards
include/warning_guards/warning_guards.h
#ifndef COMMON_MACROS_H #define COMMON_MACROS_H // clang-format off /*! Suppresses warnings in third party header files. * Works with * - GCC (https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html) * - clang (http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas) * * For reasons ...
Jakobimatrix/warning_guards
test/third_party_headers/oldstyle_cast.h
<reponame>Jakobimatrix/warning_guards int f(double x) { return (int)x; }
HPTears/TimeSeparateHelper
XKTimeSeparateHelper/Classes/XKTimeSeparateHelper.h
<reponame>HPTears/TimeSeparateHelper // // XKTimeSeparateHelper.h // TimeSeparate // // Created by hupan on 2018/8/2. // Copyright © 2018年 Tears. All rights reserved. // #import <Foundation/Foundation.h> @interface XKTimeSeparateHelper : NSObject /** 根据NSDate 返回年月 字符串 通过汉字分割 @param date date @return 返回年月,通...
HPTears/TimeSeparateHelper
XKTimeSeparateHelper/Classes/XKTimeManager.h
<gh_stars>0 // // XKTimeManager.h // TimeSeparate // // Created by hupan on 2018/8/2. // Copyright © 2018年 Tears. All rights reserved. // #import <Foundation/Foundation.h> @interface XKTimeManager : NSObject @property (nonatomic, strong) NSDateFormatter *dateFormatter; + (instancetype)timeShareManager; @end
MartinPippel/DAmar
msa/realigner.c
<filename>msa/realigner.c /*****************************************************************************************\ * * * * * These routines improve a multi-alignment of DNA sequences * * * ...
MartinPippel/DAmar
utils/LAcheck.c
<filename>utils/LAcheck.c /******************************************************************************************* * * performs basic sanity checks on the overlaps * * Author: <NAME> * * Date : December 2014 * *******************************************************************************************/ #in...
MartinPippel/DAmar
db/fileUtils.c
#include "fileUtils.h" #include "DB.h" #include <stdio.h> #include <string.h> #include <stdlib.h> int isPacBioHeader(char* header) { char* c = header; char* nameEnd; char *pch; // check if pacbio header is available { nameEnd = strchr(c, ' '); if (nameEnd == NULL) ...
MartinPippel/DAmar
utils/LAmergeUtils.h
<reponame>MartinPippel/DAmar<filename>utils/LAmergeUtils.h #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <errno.h> #include <getopt.h> #include <sys/stat.h> #include "db/DB.h" #include "lib/pass.h" #include "dalign/align.h" #include "dalign/filter.h" #define...
MartinPippel/DAmar
lib/lasidx.h
#pragma once #include <stdio.h> #include <db/DB.h> typedef off_t lasidx; lasidx* lasidx_create(HITS_DB* db, const char* pathLas); lasidx* lasidx_load(HITS_DB* db, const char* pathLas, int create); void lasidx_close(lasidx* idx);
MartinPippel/DAmar
utils/CTtrim.h
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <errno.h> #include <getopt.h> #include <sys/stat.h> #include "db/DB.h" #include "lib/pass.h" #include "dalign/align.h" #include "dalign/filter.h" #define TRIM_BIONANO_SINGLETON (1 << 0) // was not inc...
MartinPippel/DAmar
lib/dmask.c
<filename>lib/dmask.c<gh_stars>10-100 #include <string.h> #include <stdlib.h> #include <assert.h> #include <netdb.h> #include <errno.h> #include "dmask.h" #include "dmask_proto.h" static int hostname_to_ip(const char* hostname, char* ip) { struct hostent *he; struct in_addr **addr_list; if ((he = getho...
MartinPippel/DAmar
lib/laz.h
<reponame>MartinPippel/DAmar #pragma once #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include "dalign/align.h" #define LAZ_MAGIC 0x254c415a typedef struct { uint32_t magic; uint16_t version; uint16_t twidth; uint64_t novl; uint64_t reserved1; uint64_t ...
MartinPippel/DAmar
dalign/daligner.c
/************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
lib/borders.c
/******************************************************************************************* * * Date : January 2014 * *******************************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/param.h> #include <assert.h...
MartinPippel/DAmar
dalign/align.h
<gh_stars>10-100 /************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
lib.ext/bitarr.h
/* bitarr.h */ /* Prototypes for bitarr.c IMPORTANT NOTE: A version of this code appeared in Dr. Dobb's Journal issue #233 (August 1995) Volume 20 Issue 8 in an article entitled `Implementing Bit Vectors in C' by <NAME> ...
MartinPippel/DAmar
scrub/qsort_r.h
#ifndef __QSORTR_HEADER #define __QSORTR_HEADER // qsort_r is not part of the POSIX standard and the various incarnations of the // function have different argument orders for the qsort_r call itself and the // comparison function #if defined (__APPLE__) || defined (__FreeBSD__) #define QSORT_R(A,B,C,D,E) qsort...
MartinPippel/DAmar
lib/trim.h
#pragma once #include "db/DB.h" #include "dalign/align.h" #include "lib/tracks.h" #include "lib/pass.h" #include "lib/read_loader.h" typedef struct { HITS_DB* db; HITS_TRACK* track; Read_Loader* rl; ovl_header_twidth twidth; // trace point spacing Work_Data* align_work; // worki...
MartinPippel/DAmar
db/FA2db.c
<reponame>MartinPippel/DAmar<filename>db/FA2db.c /************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
scrub/LAgap.c
/******************************************************************************************* * * Author : <NAME> * * Date : February 2016 * *******************************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys...
MartinPippel/DAmar
scrub/LAlocal.c
<filename>scrub/LAlocal.c /******************************************************************************************* * * creates a repeat annotation track (named -t) based on local alignments * * Date : February 2016 * * Author : <NAME> * ****************************************************************...
MartinPippel/DAmar
utils/gff2track.c
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <ctype.h> #include <unistd.h> #include <assert.h> #include <sys/param.h> #include "lib/colors.h" #include "lib/oflags.h" #include "lib/pass.h" #include "lib/tracks.h" #include "lib/utils.h" #include "lib/lasidx.h" #include "db/D...
MartinPippel/DAmar
scrub/Catrack.c
<filename>scrub/Catrack.c /************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
utils/txt2track.c
/* * txt2track.c * * Created on: 11 Jan 2017 * Author: pippelmn */ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <ctype.h> #include <unistd.h> #include <assert.h> #include <sys/param.h> #include "lib/colors.h" #include "lib/oflags.h" #include "lib/pass.h" #include...
MartinPippel/DAmar
scrub/TKmerge.c
/******************************************************************************************* * * merge multiple tracks of the same type into one * * Date : October 2016 * * Author : <NAME> * *******************************************************************************************/ #include <stdio.h> #in...
MartinPippel/DAmar
msa/msa_main.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <sys/stat.h> #include <sys/param.h> #include <assert.h> #include <unistd.h> #include "lib/oflags.h" #include "lib/tracks.h" #include "lib/pass.h" #include "lib/colors.h" #include "lib/utils.h" #include "msa.h" #include "db/DB.h"...
MartinPippel/DAmar
utils/LAneighbors.c
<reponame>MartinPippel/DAmar<gh_stars>10-100 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include "lib/pass.h" #include "db/DB.h" #include "lib/utils.h" #include "lib/tracks.h" #include "dalign/align.h" #include "lib/of...
MartinPippel/DAmar
utils/TKshow.c
<filename>utils/TKshow.c /******************************************************************************************* * * Date : February 2015 * *******************************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unist...
MartinPippel/DAmar
lib/pass.c
<reponame>MartinPippel/DAmar #include <stdio.h> #include <stdlib.h> #include <assert.h> #include "pass.h" #include "oflags.h" PassContext* pass_init(FILE* fileOvlIn, FILE* fileOvlOut) { PassContext* ctx = malloc(sizeof(PassContext)); ctx->fileOvlIn = fileOvlIn; ctx->trace = NULL; ctx->tmax = 0; ...
MartinPippel/DAmar
db/FA2dam.c
/************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
touring/OGlayout.c
/******************************************************************************************* * * Creates a Yifan Hu Layout from a given graph file. * * input : dot, graphml * output: dot, svg * parameter: adopted from Gephi (https://gephi.org/) * -R ... remove reverse edges from...
MartinPippel/DAmar
lib/lasidx.c
#include <stdio.h> #include <string.h> #include <strings.h> #include <stdlib.h> #include <sys/stat.h> #include <limits.h> #include <sys/param.h> #include <unistd.h> #include "lasidx.h" #include "pass.h" static char* lasidx_filename(const char* pathLas) { char* pathIdx = strdup(pathLas); char* pathDot = rind...
MartinPippel/DAmar
dalign/filter.c
/************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
touring/OGtour.c
/******************************************************************************************* * * Tours the overlap graph * (C implementation of touring_v2.py) * * Date : February 2016 * * Author : <NAME> * *******************************************************************************************/ #i...
MartinPippel/DAmar
utils/LAfilterMito.c
/******************************************************************************************* * * filters overlaps by various criteria * * Author : Martin * * Date : December 2018 * *******************************************************************************************/ #include <assert.h> #include <...
MartinPippel/DAmar
lib/tracks.c
<reponame>MartinPippel/DAmar #include "tracks.h" #include "pass.h" #include "tracks.h" #include "lib/compression.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <assert.h> #if defined(__APPLE__) #include <sys/syslimits.h> #else #include <linux/limits.h> #endif HITS_TRACK*...
MartinPippel/DAmar
db/DBsplit.c
<filename>db/DBsplit.c /************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
utils/CTanalyze.c
<filename>utils/CTanalyze.c /* * analyzeContigs.c * * assign contigs into following sets: haploid, alternative, repeat * * use: * self alignment information from contigs * union of fixed reads that map to the contigs (derived from fixedReadOverlaps) * * * Created on: 3 Aug 2017 * Author: pippel...
MartinPippel/DAmar
corrector/consensus.c
<reponame>MartinPippel/DAmar #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "consensus.h" #include "lib/colors.h" #define CONS_MIN_COV_FRACTION 0.5 // base calling threshold #undef DEBUG_SHOW_ADD typedef struct { char* B; // sequence that gets a...
MartinPippel/DAmar
utils/TKhist.c
/* * TKhist.c * * Created on: 30 Nov 2016 * Author: pippelmn */ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <ctype.h> #include <assert.h> #include <unistd.h> #include <math.h> #include <sys/param.h> #include "lib/colors.h" #include "lib/oflags.h" #include "lib/ut...
MartinPippel/DAmar
lib/stats.h
void ln_estimate(int* data, int n, double* mu, double* sig); double ln_invcdf(double p, double mu, double sig); double ln_p(double x, double mu, double sig); void n_estimate(int* data, int n, double* mu, double* sig); void n_estimate_double(double* data, int n, double* mu, double* sig);
MartinPippel/DAmar
utils/H5dextractUtils.h
#ifndef DEXTRACT_UTILS_H_ #define DEXTRACT_UTILS_H_ #include "stdio.h" #include <math.h> #include <sys/stat.h> #include <ctype.h> #include <hdf5.h> typedef unsigned long long uint64; typedef unsigned int uint32; typedef unsigned short uint16; typedef unsigned char uint8; typedef signed long long int6...
MartinPippel/DAmar
lib/oflags.c
<filename>lib/oflags.c #include <stdlib.h> #include "oflags.h" OverlapFlag2Label oflag2label[] = { {OVL_COMP, "complement", '<'}, {OVL_DISCARD, "discarded", 'x'}, {OVL_REPEAT, "r...
MartinPippel/DAmar
corrector/consensus.h
<filename>corrector/consensus.h #pragma once typedef struct { unsigned char counts[5]; // A C G T - } profile_entry; typedef struct { int* vector; int vecmax; int* trace; int ntrace; int* Stop; // Ongoing stack of alignment indels char* Babs; // Absolute base...
MartinPippel/DAmar
touring/OGlayout.h
<reponame>MartinPippel/DAmar<gh_stars>10-100 /* * OGLayout.h * * Created on: Jul 14, 2016 * Author: pippelmn */ #ifndef TOURING_OGLAYOUT_H_ #define TOURING_OGLAYOUT_H_ #define max(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a > _b ? _a : _b; }) #define min(a,b) \ ({ ...
MartinPippel/DAmar
utils/LAfilterChains.c
/******************************************************************************************* * * filters overlaps by various criteria * * Author : <NAME> * * Date : May 2015 * *******************************************************************************************/ #include <assert.h> #include <limit...
MartinPippel/DAmar
utils/TKtrim.c
<gh_stars>10-100 /******************************************************************************************* * * Date : November 2016 * *******************************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #i...
MartinPippel/DAmar
utils/LAindex.c
<gh_stars>10-100 /** * Index an overlap file. * - index is used in LAexplorer */ /** * Idea: add repeats track to contig database * * Input: * 1. Contig-db with reads track (readID,beg,end) * 2. database with interval track that should be added to Contig-db * 3. interval track */ #include <stdio.h> #incl...
MartinPippel/DAmar
dalign/align.c
<filename>dalign/align.c /************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
db/TKcat.c
<filename>db/TKcat.c /************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
lib/trim.c
<filename>lib/trim.c<gh_stars>10-100 #include <stdlib.h> #include <sys/param.h> #include <assert.h> #include <string.h> #include "trim.h" #include "lib/oflags.h" #include "lib/utils.h" #include "lib/colors.h" #undef DEBUG_VALIDATE #undef DEBUG_TRIM static void align(TRIM* trim, Overlap* ovl, int ab, int ae, int bb, ...
MartinPippel/DAmar
lib/anno.h
#pragma once #define ANNO_TYPE_FLIP 1 #define ANNO_TYPE_WEAK 2 #define ANNO_TYPE_GAP 3
MartinPippel/DAmar
scrub/datander.c
/*********************************************************************************************\ * * Find all local self-alignment between long, noisy DNA reads: * Compare sequences in each supplied blocks against themselves search for local alignments * of MIN_OVERLAP or more above the diagonal (A start coor...
MartinPippel/DAmar
db/fileUtils.h
<reponame>MartinPippel/DAmar<gh_stars>10-100 #ifndef _FASTA_UTILS #define _FASTA_UTILS #include <stdio.h> // checks if fasta header has pacbio format int isPacBioHeader(char* header); typedef struct { int argc; char **argv; FILE *input; int count; char *name; } File_Iterator; File_Itera...
MartinPippel/DAmar
lib/colors.h
#ifndef __COLOR_H #define __COLOR_H #define COLORIZE #ifdef COLORIZE #define ANSI_COLOR_RED "\x1b[31m" #define ANSI_COLOR_GREEN "\x1b[32m" #define ANSI_COLOR_YELLOW "\x1b[33m" #define ANSI_COLOR_BLUE "\x1b[34m" #define ANSI_COLOR_MAGENTA "\x1b[35m" #define ANSI_COLOR_CYAN "\x1b[36m" #define ANSI_COLOR_...
MartinPippel/DAmar
msa/msa.c
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/param.h> #include "lib/colors.h" #include "msa.h" #define CONS_MIN_COV_FRACTION 0.5 // base calling threshold typedef struct { char* B; // sequence that gets aligned to msa_profile_entry* A; // the prof...
MartinPippel/DAmar
db/DB2fa.c
/************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
db/QV2db.c
<reponame>MartinPippel/DAmar /************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
utils/LAshow.c
/******************************************************************************************* * * Displays the contents of a .las file * * Date : May 2015 * * Author : <NAME> * *******************************************************************************************/ #include <stdio.h> #include <stdlib...
MartinPippel/DAmar
utils/H5dextractUtils.c
#include "H5dextractUtils.h" #include <string.h> #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <limits.h> static char *Usage = " [options] -F file | <input:bax_h5> ..."; static void printUsage(char *prog, FILE* out) { fprintf(out, "\nUsage:\t%s\t%s\n\n", prog, Usage); ...
MartinPippel/DAmar
scrub/LArepeat.c
/******************************************************************************************* * * creates a repeat annotation track (named -t) based on coverage statistics * * intervals are tagged as repetitive when the -h coverage threshold is reached * and terminated when the coverage drops below -l * * -n ...
MartinPippel/DAmar
utils/LAstats.c
/******************************************************************************************* * * display basic stats on the overlaps contained in a .las file * * Author : <NAME> * * Date : May 2015 * *******************************************************************************************/ #include <a...
MartinPippel/DAmar
utils/LAcartoons.c
<reponame>MartinPippel/DAmar<filename>utils/LAcartoons.c<gh_stars>10-100 /******************************************************************************************* * * Prints an ASCII representation of the overlaps. Uses ANSI color codes. * Best used jointly with 'less -SR' * * Date : October 2014 * * A...
MartinPippel/DAmar
utils/CTanalyze.h
/* * analyzeContigs.h * * Created on: 3 Aug 2017 * Author: pippel */ #ifndef UTILS_LAANALYZE_H_ #define UTILS_LAANALYZE_H_ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include "db/DB.h" #include "dalign/align.h" // if abs(beg) > abs(end), i.e. overlap is in complement o...
MartinPippel/DAmar
msa/redriver.c
<reponame>MartinPippel/DAmar /*****************************************************************************************\ * * * This program improves a multi-alignment of DNA sequences * * ...
MartinPippel/DAmar
corrector/LAcorrect.c
/******************************************************************************************* * * Consensus based read correction * * Date : revisited April 2017 * * Author : <NAME> * *******************************************************************************************/ #include <assert.h> #include <...
MartinPippel/DAmar
dalign/DMserver.c
<filename>dalign/DMserver.c<gh_stars>10-100 /* maintains coverage statistics for all reads based on .las files produced by daligner and serves mask track Author: <NAME> Date: September 2016 overall usage: - create initial mask track with DBdust and split database into blocks with D...
MartinPippel/DAmar
corrector/LAconvert.c
<filename>corrector/LAconvert.c /******************************************************************************************* * * conversion from unccorected db to corrected db and las * * Author: <NAME> * * Date : March 2017 * ************************************************************************************...
MartinPippel/DAmar
scrub/LAq.c
/******************************************************************************************* * * calculate the quality and trim track * * Date : October 2015 * * Author : <NAME> * *******************************************************************************************/ #include <stdio.h> #include <std...
MartinPippel/DAmar
lib.ext/bitarr.c
/* bitarr.c */ /************************************************************************** Bit Vectors in C FILENAME: bitarr.c LANGUAGE: ANSI C REQUIRES: "types.h" (see below for minimal contents) AUTHOR: <NAME> <<EMAIL>> CREATED: 22 March 1995 MODIFIED: 20 July 1996 (see http://www.cs...
MartinPippel/DAmar
scrub/LAfilter.c
<reponame>MartinPippel/DAmar /******************************************************************************************* * * filters overlaps by various criteria * * Author : <NAME> * * Date : May 2015 * *******************************************************************************************/ #inclu...
MartinPippel/DAmar
utils/LAmerge.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <unistd.h> #include <math.h> #include "lib/pass.h" #include "dalign/align.h" #include "dalign/filter.h" #include "LAmergeUtils.h" #undef DEBUG // is only called once, and if the sort flag is enabled void sortFile(char* fout, char*...
MartinPippel/DAmar
utils/TKcombine.c
<gh_stars>10-100 /* takes two tracks containing intervals and merges them into a single track, removing contained/duplicate intervals in the process and merging overlapping ones. Source tracks and result track can be trimmed and/or untrimmed Date: March 2015 */ #include <assert.h> #include <stdio.h> #include <...
MartinPippel/DAmar
scrub/LAstitch.c
/******************************************************************************************* * * A->B overlaps can be split into multiple A->B records due to bad regions in either one * of the reads, causing the overlapper to stop aligning. Here we look for those records * (with a maximum gap of -f), join the tw...
MartinPippel/DAmar
lib/oflags.h
#pragma once #define OVL_COMP (1 << 0) // B on reverse strand #define OVL_DISCARD (1 << 1) // overlap tagged for removal #define OVL_REPEAT (1 << 3) // repeat induced overlap #define OVL_LOCAL (1 << 4) // local alignment #define OVL_DIFF (1 << 5) // too many ...
MartinPippel/DAmar
lib/utils.c
<gh_stars>10-100 #include <assert.h> #include <stdlib.h> #include <sys/param.h> #include <ctype.h> #include <string.h> #include "tracks.h" #include "lib/pass.h" /* fgetln is only available on bsd derived systems. getline on the other hand is only in gnu libc derived systems. if fgetln is miss...
MartinPippel/DAmar
utils/LAextract.c
<filename>utils/LAextract.c /******************************************************************************************* * * extract overlaps for specific a-read ids * * Author : <NAME> * * Date : September 2014 * *******************************************************************************************/...
MartinPippel/DAmar
msa/realigner.h
/*****************************************************************************************\ * * * This is the interface library for a restructured version of realigner * * ...
MartinPippel/DAmar
utils/LAexplorer.c
#include <gtk/gtk.h> #include <stdlib.h> #include <strings.h> #include <math.h> #include <string.h> #include "lib/oflags.h" #include "lib/utils.h" #include "lib/pass.h" #include "lib/tracks.h" #include "lib/lasidx.h" #include "db/DB.h" #include "dalign/align.h" // drawing area padding #define PADDING 20 #define H...
MartinPippel/DAmar
db/FA2x.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "DB.h" #include "lib/tracks.h" #include "FA2x.h" #ifdef HIDE_FILES #define PATHSEP "/." #else #define PATHSEP "/" #endif int find_track(CreateContext* ctx, const char* name) { int i; for (i = 0; i < ctx->t_cur; i++) { if (strcm...
MartinPippel/DAmar
lib/laz.c
<reponame>MartinPippel/DAmar #include "laz.h" #include <zlib.h> LAZ* laz_open(char* fpath, int create) { FILE* fin = NULL; LAZ* laz = NULL; if (create) { laz->file = fopen(fpath, "wb"); } else { laz->file = fopen(fpath, "rb"); } if (laz->file == NULL) { ...
MartinPippel/DAmar
utils/LAcount.c
/******************************************************************************************* * * validates the overlaps prior to sorting and merging * * Author: <NAME> * * Date : January 2015 * *******************************************************************************************/ #include <stdio.h> #inc...
MartinPippel/DAmar
msa/msa.h
<filename>msa/msa.h #pragma once #include "lib/pass.h" #include "dalign/align.h" typedef struct { unsigned long counts[5]; // A C G T - } msa_profile_entry; typedef struct { int* vector; int vecmax; int* trace; int ntrace; int* Stop; // Ongoing stack of alignment indels ...
MartinPippel/DAmar
utils/LAZtest.c
/******************************************************************************************* * * Displays the contents of a .las file * * Date : May 2015 * * Author : <NAME> * *******************************************************************************************/ #include <assert.h> #include <ctype...
MartinPippel/DAmar
scrub/tandem.c
/************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
scrub/TKhomogenize.c
<gh_stars>10-100 /******************************************************************************************* * * Reassign repeat intervals based on overlaps and an existing repeat annotation * * Date : January 2016 * * Author : <NAME> * *******************************************************************...
MartinPippel/DAmar
scrub/tandem.h
/************************************************************************************\ * * * Copyright (c) 2014, Dr. <NAME> (EWM). All rights reserved. * * ...
MartinPippel/DAmar
lib/read_loader.c
#include <stdlib.h> #include <string.h> #include <assert.h> #include "read_loader.h" #define BLOCK_BUFFER (10*1024*1024) Read_Loader* rl_init(HITS_DB* db, size_t max_mem) { Read_Loader* rl = malloc(sizeof(Read_Loader)); rl->db = db; rl->max_mem = max_mem; rl->index = (char**)malloc(sizeof(char*) *...
MartinPippel/DAmar
db/FA2x.h
typedef struct { int well; int beg; int end; int len; int hasPacbioHeader; int seqIDinFasta; int maxPrologLen; char *prolog; int maxSequenceLen; char *seq; int maxtracks; int ntracks; int maxName; char **trackName; int **trackfields; } pacbio_read; // used in fasta2DB and fasta2DAM...