-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
110 changed files
with
3,025 additions
and
885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* bam_sample.c -- group data by sample. | ||
Copyright (C) 2010, 2011 Broad Institute. | ||
Copyright (C) 2013, 2016-2018 Genome Research Ltd. | ||
Copyright (C) 2013, 2016-2022 Genome Research Ltd. | ||
Author: Heng Li <[email protected]>, Petr Danecek <[email protected]> | ||
|
@@ -281,7 +281,7 @@ int bam_smpl_add_samples(bam_smpl_t *bsmpl, char *list, int is_file) | |
|
||
int i, nsamples = 0; | ||
char **samples = hts_readlist(list, is_file, &nsamples); | ||
if ( !nsamples ) return 0; | ||
if ( !samples || !nsamples ) return 0; | ||
|
||
kstring_t ori = {0,0,0}; | ||
kstring_t ren = {0,0,0}; | ||
|
@@ -328,7 +328,7 @@ int bam_smpl_add_readgroups(bam_smpl_t *bsmpl, char *list, int is_file) | |
|
||
int i, nrows = 0; | ||
char **rows = hts_readlist(list, is_file, &nrows); | ||
if ( !nrows ) return 0; | ||
if ( !rows || !nrows ) return 0; | ||
|
||
kstring_t fld1 = {0,0,0}; | ||
kstring_t fld2 = {0,0,0}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* bcftools.h -- utility function declarations. | ||
Copyright (C) 2013-2021 Genome Research Ltd. | ||
Copyright (C) 2013-2022 Genome Research Ltd. | ||
Author: Petr Danecek <[email protected]> | ||
|
@@ -28,6 +28,7 @@ THE SOFTWARE. */ | |
#include <stdarg.h> | ||
#include <htslib/hts_defs.h> | ||
#include <htslib/vcf.h> | ||
#include <htslib/synced_bcf_reader.h> | ||
#include <math.h> | ||
|
||
#define FT_TAB_TEXT 0 // custom tab-delimited text file | ||
|
@@ -50,9 +51,11 @@ void error_errno(const char *format, ...) HTS_NORETURN HTS_FORMAT(HTS_PRINTF_FMT | |
|
||
void bcf_hdr_append_version(bcf_hdr_t *hdr, int argc, char **argv, const char *cmd); | ||
const char *hts_bcf_wmode(int file_type); | ||
const char *hts_bcf_wmode2(int file_type, char *fname); | ||
void set_wmode(char dst[8], int file_type, char *fname, int compression_level); // clevel: 0-9 with or zb type, -1 unset | ||
const char *hts_bcf_wmode2(int file_type, const char *fname); | ||
void set_wmode(char dst[8], int file_type, const char *fname, int compression_level); // clevel: 0-9 with or zb type, -1 unset | ||
char *init_tmp_prefix(const char *prefix); | ||
int read_AF(bcf_sr_regions_t *tgt, bcf1_t *line, double *alt_freq); | ||
int parse_overlap_option(const char *arg); | ||
|
||
void *smalloc(size_t size); // safe malloc | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* The MIT License | ||
Copyright (c) 2016 Genome Research Ltd. | ||
Copyright (c) 2016-2022 Genome Research Ltd. | ||
Author: Petr Danecek <[email protected]> | ||
|
@@ -43,6 +43,7 @@ bin_t *bin_init(const char *list_def, float min, float max) | |
int is_file = strchr(list_def,',') ? 0 : 1; | ||
int i, nlist; | ||
char **list = hts_readlist(list_def, is_file, &nlist); | ||
if ( !list ) error("Error: failed to read %s\n",list_def); | ||
bin->nbins = nlist; | ||
bin->bins = (float*) malloc(sizeof(float)*nlist); | ||
for (i=0; i<nlist; i++) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.