Skip to content

Commit 3cb1d28

Browse files
committed
prepare new release 1.2
1 parent 64cc27a commit 3cb1d28

File tree

5 files changed

+65
-57
lines changed

5 files changed

+65
-57
lines changed

cov.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ double calc_avg_cov(cov_t *cov, sdict_t *sdict, double q_drop)
411411
return avg_cov;
412412
}
413413

414-
cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, uint32_t window, double q_drop)
414+
cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, double q_drop)
415415
{
416416
size_t i, j, k, s;
417417
int32_t c;
@@ -424,12 +424,12 @@ cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, uint32_t window, double q
424424
n = sdict->n;
425425
m = 0;
426426
for (i = 0; i < n; ++i)
427-
m += div_ceil(sdict->s[i].len, window);
427+
m += div_ceil(sdict->s[i].len, COV_NORM_WINDOW);
428428
norm_a = (double *) calloc(m, sizeof(double));
429429
norm = (double **) calloc(n, sizeof(double *));
430430
norm[0] = norm_a;
431431
for (i = 1; i < n; ++i)
432-
norm[i] = norm[i-1] + div_ceil(sdict->s[i-1].len, window);
432+
norm[i] = norm[i-1] + div_ceil(sdict->s[i-1].len, COV_NORM_WINDOW);
433433

434434
// calculate average base coverage
435435
avg_cov = calc_avg_cov(cov, sdict, q_drop);
@@ -441,16 +441,16 @@ cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, uint32_t window, double q
441441
for (j = 0; j < s; ++j) {
442442
p1 = (uint32_t) (a[j] >> 32);
443443
if (p1 > p) {
444-
if (p1 - p < window - w) {
444+
if (p1 - p < COV_NORM_WINDOW - w) {
445445
c1 += (int64_t) c * (p1 - p);
446446
w += p1 - p;
447447
p = p1;
448448
} else {
449449
while (p1 > p) {
450-
if (p1 - p >= window - w) {
451-
c1 += (int64_t) c * (window - w);
452-
norm[i][k++] = MIN(max_cov_scale, c1 > 0? avg_cov * window / c1 : DBL_MAX);
453-
p += window - w;
450+
if (p1 - p >= COV_NORM_WINDOW - w) {
451+
c1 += (int64_t) c * (COV_NORM_WINDOW - w);
452+
norm[i][k++] = MIN(max_cov_scale, c1 > 0? avg_cov * COV_NORM_WINDOW / c1 : DBL_MAX);
453+
p += COV_NORM_WINDOW - w;
454454
c1 = 0;
455455
w = 0;
456456
} else {
@@ -466,9 +466,9 @@ cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, uint32_t window, double q
466466

467467
p1 = sdict->s[i].len;
468468
while (p1 > p) {
469-
if (p1 - p >= window - w) {
470-
norm[i][k++] = MIN(max_cov_scale, c1 > 0? avg_cov * window / c1 : DBL_MAX);
471-
p += window - w;
469+
if (p1 - p >= COV_NORM_WINDOW - w) {
470+
norm[i][k++] = MIN(max_cov_scale, c1 > 0? avg_cov * COV_NORM_WINDOW / c1 : DBL_MAX);
471+
p += COV_NORM_WINDOW - w;
472472
} else {
473473
norm[i][k++] = MIN(max_cov_scale, c1 > 0? avg_cov * (p1 - p + w) / c1 : DBL_MAX);
474474
p = p1;
@@ -480,12 +480,12 @@ cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, uint32_t window, double q
480480
if (w > 0)
481481
norm[i][k++] = MIN(max_cov_scale, c1 > 0? avg_cov * w / c1 : DBL_MAX);
482482

483-
assert(k == div_ceil(p1, window));
483+
assert(k == div_ceil(p1, COV_NORM_WINDOW));
484484
}
485485

486486
cov_norm = (cov_norm_t *) malloc(sizeof(cov_norm_t));
487487
cov_norm->n = m;
488-
cov_norm->w = window;
488+
cov_norm->w = COV_NORM_WINDOW;
489489
cov_norm->norm = norm;
490490

491491
return cov_norm;

cov.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ typedef struct {
5353
double **norm;
5454
} cov_norm_t;
5555

56+
#define COV_NORM_WINDOW 1000
57+
5658
#ifdef __cplusplus
5759
extern "C" {
5860
#endif
@@ -64,7 +66,7 @@ uint64_t pos_compression(cov_t *cov);
6466
cov_t *bam_cstats(const char *bam, sdict_t *sdict, int match_header);
6567
cov_t *bed_cstats(const char *bed, sdict_t *sdict);
6668
double calc_avg_cov(cov_t *cov, sdict_t *sdict, double q_drop);
67-
cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, uint32_t window, double q_drop);
69+
cov_norm_t *calc_cov_norms(cov_t *cov, sdict_t *sdict, double q_drop);
6870
void print_cov_in_bed(cov_t *cov, sdict_t *sdict, FILE *fo);
6971

7072
#ifdef __cplusplus

link.c

+10-9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "sdict.h"
4141
#include "enzyme.h"
4242
#include "link.h"
43+
#include "cov.h"
4344
#include "asset.h"
4445

4546
#undef DEBUG_NOISE
@@ -639,7 +640,7 @@ inter_link_mat_t *inter_link_mat_from_file(const char *f, cov_norm_t *cov_norm,
639640
return link_mat;
640641
}
641642

642-
cov_norm_t *cov_norm_from_file(const char *f, sdict_t *dict, uint32_t window)
643+
cov_norm_t *cov_norm_from_file(const char *f, sdict_t *dict)
643644
{
644645
uint32_t i;
645646
uint64_t m, n;
@@ -667,13 +668,13 @@ cov_norm_t *cov_norm_from_file(const char *f, sdict_t *dict, uint32_t window)
667668
norm = (double **) malloc(sizeof(double *) * dict->n);
668669
norm[0] = norm_a;
669670
for (i = 1; i < dict->n; ++i)
670-
norm[i] = norm[i-1] + div_ceil(dict->s[i-1].len, window);
671+
norm[i] = norm[i-1] + div_ceil(dict->s[i-1].len, COV_NORM_WINDOW);
671672

672673
fclose(fp);
673674

674675
cov_norm = (cov_norm_t *) malloc(sizeof(cov_norm_t));
675676
cov_norm->n = n;
676-
cov_norm->w = window;
677+
cov_norm->w = COV_NORM_WINDOW;
677678
cov_norm->norm = norm;
678679

679680
return cov_norm;
@@ -1266,7 +1267,7 @@ static int parse_bam_rec1(bam1_t *b, bam_header_t *h, char **cname0, int32_t *s0
12661267
return (b->core.flag & 0x40)? 1 : 0;
12671268
}
12681269

1269-
void dump_links_from_bam_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t wd, double q_drop, const char *out)
1270+
void dump_links_from_bam_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, double q_drop, const char *out)
12701271
{
12711272
bamFile fp;
12721273
FILE *fo;
@@ -1511,7 +1512,7 @@ void dump_links_from_bam_file(const char *f, const char *fai, uint32_t ml, uint8
15111512
fprintf(stderr, "[I::%s] dumped %lu read pairs from %lu records: %lu intra links + %lu inter links \n", __func__, pair_c, rec_c, intra_c, inter_c);
15121513

15131514
// cov_t *cov = bam_cstats(f, dict, 0);
1514-
cov_norm_t *cov_norm = calc_cov_norms(cov, dict, wd, q_drop);
1515+
cov_norm_t *cov_norm = calc_cov_norms(cov, dict, q_drop);
15151516
fwrite(&cov_norm->n, sizeof(uint64_t), 1, fo);
15161517
fwrite(cov_norm->norm[0], sizeof(double), cov_norm->n, fo);
15171518
cov_destroy(cov);
@@ -1521,7 +1522,7 @@ void dump_links_from_bam_file(const char *f, const char *fai, uint32_t ml, uint8
15211522
fclose(fo);
15221523
}
15231524

1524-
void dump_links_from_bed_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t wd, double q_drop, const char *out)
1525+
void dump_links_from_bed_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, double q_drop, const char *out)
15251526
{
15261527
FILE *fp, *fo;
15271528
int fd;
@@ -1674,7 +1675,7 @@ void dump_links_from_bed_file(const char *f, const char *fai, uint32_t ml, uint8
16741675
fprintf(stderr, "[I::%s] dumped %lu read pairs from %lu records: %lu intra links + %lu inter links \n", __func__, pair_c, rec_c, intra_c, inter_c);
16751676

16761677
// cov_t *cov = bed_cstats(f, dict);
1677-
cov_norm_t *cov_norm = calc_cov_norms(cov, dict, wd, q_drop);
1678+
cov_norm_t *cov_norm = calc_cov_norms(cov, dict, q_drop);
16781679
fwrite(&cov_norm->n, sizeof(uint64_t), 1, fo);
16791680
fwrite(cov_norm->norm[0], sizeof(double), cov_norm->n, fo);
16801681
cov_destroy(cov);
@@ -1684,7 +1685,7 @@ void dump_links_from_bed_file(const char *f, const char *fai, uint32_t ml, uint8
16841685
fclose(fo);
16851686
}
16861687

1687-
void dump_links_from_pa5_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t rl, uint32_t wd, double q_drop, const char *out)
1688+
void dump_links_from_pa5_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t rl, double q_drop, const char *out)
16881689
{
16891690
FILE *fp, *fo;
16901691
int fd;
@@ -1817,7 +1818,7 @@ void dump_links_from_pa5_file(const char *f, const char *fai, uint32_t ml, uint8
18171818
fprintf(stderr, "[I::%s] dumped %lu read pairs from %lu records: %lu intra links + %lu inter links \n", __func__, pair_c, rec_c, intra_c, inter_c);
18181819

18191820
// cov_t *cov = bed_cstats(f, dict);
1820-
cov_norm_t *cov_norm = calc_cov_norms(cov, dict, wd, q_drop);
1821+
cov_norm_t *cov_norm = calc_cov_norms(cov, dict, q_drop);
18211822
fwrite(&cov_norm->n, sizeof(uint64_t), 1, fo);
18221823
fwrite(cov_norm->norm[0], sizeof(double), cov_norm->n, fo);
18231824
cov_destroy(cov);

link.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ intra_link_mat_t *intra_link_mat_init(void *dict, uint32_t resolution, int use_g
9090
inter_link_mat_t *inter_link_mat_init(asm_dict_t *dict, uint32_t resolution, uint32_t radius);
9191
intra_link_mat_t *intra_link_mat_from_file(const char *f, cov_norm_t *cov_norm, asm_dict_t *dict, re_cuts_t *re_cuts, uint32_t resolution, int use_gap_seq, uint8_t mq);
9292
inter_link_mat_t *inter_link_mat_from_file(const char *f, cov_norm_t *cov_norm, asm_dict_t *dict, re_cuts_t *re_cuts, uint32_t resolution, uint32_t radius, uint8_t mq);
93-
cov_norm_t *cov_norm_from_file(const char *f, sdict_t *dict, uint32_t window);
93+
cov_norm_t *cov_norm_from_file(const char *f, sdict_t *dict);
9494
intra_link_t *get_intra_link(intra_link_mat_t *link_mat, uint32_t i, uint32_t j);
9595
inter_link_t *get_inter_link(inter_link_mat_t *link_mat, uint32_t i, uint32_t j);
9696
norm_t *calc_norms(intra_link_mat_t *link_mat, uint32_t d_min_cell, double d_mass_frac);
@@ -107,9 +107,9 @@ void norm_destroy(norm_t *norm);
107107
double *get_max_inter_norms(inter_link_mat_t *link_mat, asm_dict_t *dict);
108108
int8_t *calc_link_directs_from_file(const char *f, asm_dict_t *dict, uint8_t mq);
109109
void calc_link_directs(inter_link_mat_t *link_mat, double min_norm, asm_dict_t *dict, int8_t *directs);
110-
void dump_links_from_bam_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t wd, double q_drop, const char *out);
111-
void dump_links_from_bed_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t wd, double q_drop, const char *out);
112-
void dump_links_from_pa5_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t rl, uint32_t wd, double q_drop, const char *out);
110+
void dump_links_from_bam_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, double q_drop, const char *out);
111+
void dump_links_from_bed_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, double q_drop, const char *out);
112+
void dump_links_from_pa5_file(const char *f, const char *fai, uint32_t ml, uint8_t mq, uint32_t rl, double q_drop, const char *out);
113113
long estimate_intra_link_mat_init_rss(void *dict, uint32_t resolution, int use_gap_seq);
114114
long estimate_inter_link_mat_init_rss(asm_dict_t *dict, uint32_t resolution, uint32_t radius);
115115
#ifdef __cplusplus

yahs.c

+35-30
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ int run_scaffolding(char *fai, char *agp, char *link_file, cov_norm_t *cov_norm,
198198
fprintf(stderr, "[I::%s] RAM limit: %.3fGB\n", __func__, (double) rss_limit / GB);
199199
fprintf(stderr, "[I::%s] RAM required: %.3fGB\n", __func__, (double) rss_intra / GB);
200200
re = ENOMEM_ERR;
201-
goto scaff_done;
201+
goto scaff_failed_0;
202202
}
203203
rss_limit -= rss_intra;
204204
fprintf(stderr, "[I::%s] starting norm estimation...\n", __func__);
@@ -213,9 +213,8 @@ int run_scaffolding(char *fai, char *agp, char *link_file, cov_norm_t *cov_norm,
213213
norm_t *norm = calc_norms(intra_link_mat, d_min_cell, d_mass_frac);
214214
if (norm == 0) {
215215
fprintf(stderr, "[W::%s] No enough bands for norm calculation... End of scaffolding round.\n", __func__);
216-
intra_link_mat_destroy(intra_link_mat);
217216
re = ENOBND_ERR;
218-
goto scaff_done;
217+
goto scaff_failed_1;
219218
}
220219

221220
rss_inter = no_mem_check? 0 : estimate_inter_link_mat_init_rss(dict, resolution, norm->r);
@@ -225,7 +224,7 @@ int run_scaffolding(char *fai, char *agp, char *link_file, cov_norm_t *cov_norm,
225224
fprintf(stderr, "[I::%s] RAM limit: %.3fGB\n", __func__, (double) rss_limit / GB);
226225
fprintf(stderr, "[I::%s] RAM required: %.3fGB\n", __func__, (double) rss_inter / GB);
227226
re = ENOMEM_ERR;
228-
goto scaff_done;
227+
goto scaff_failed_1;
229228
}
230229
rss_limit -= rss_inter;
231230
fprintf(stderr, "[I::%s] starting link estimation...\n", __func__);
@@ -242,8 +241,7 @@ int run_scaffolding(char *fai, char *agp, char *link_file, cov_norm_t *cov_norm,
242241
double la;
243242
re = inter_link_norms(inter_link_mat, norm, 1, max_noise_ratio, &la);
244243
if (re) {
245-
inter_link_mat_destroy(inter_link_mat);
246-
goto scaff_done;
244+
goto scaff_failed_2;
247245
}
248246

249247
int8_t *directs = 0;
@@ -310,7 +308,7 @@ int run_scaffolding(char *fai, char *agp, char *link_file, cov_norm_t *cov_norm,
310308

311309
asm_dict_t *d = make_asm_dict_from_graph(g, g->sdict);
312310
// write scaffolds to AGP file
313-
FILE *agp_out;
311+
FILE *agp_out = NULL;
314312
if (out) {
315313
char *agp_out_name = (char *) malloc(strlen(out) + 5);
316314
sprintf(agp_out_name, "%s.agp", out);
@@ -321,19 +319,23 @@ int run_scaffolding(char *fai, char *agp, char *link_file, cov_norm_t *cov_norm,
321319
}
322320
if (agp_out == NULL) {
323321
fprintf(stderr, "[E::%s] fail to open file to write\n", __func__);
324-
return 0;
322+
re = 1;
323+
} else {
324+
write_asm_dict_to_agp(d, agp_out);
325+
fclose(agp_out);
325326
}
326-
write_asm_dict_to_agp(d, agp_out);
327-
fclose(agp_out);
328-
327+
329328
asm_destroy(d);
329+
graph_destroy(g);
330330

331-
intra_link_mat_destroy(intra_link_mat);
331+
scaff_failed_2:
332332
inter_link_mat_destroy(inter_link_mat);
333+
334+
scaff_failed_1:
333335
norm_destroy(norm);
334-
graph_destroy(g);
335-
336-
scaff_done:
336+
intra_link_mat_destroy(intra_link_mat);
337+
338+
scaff_failed_0:
337339
asm_destroy(dict);
338340
sd_destroy(sdict);
339341

@@ -446,7 +448,7 @@ static void print_asm_stats(uint64_t *n_stats, uint32_t *l_stats, int all)
446448
#endif
447449
}
448450

449-
int run_yahs(char *fai, char *agp, char *link_file, uint32_t ml, uint8_t mq, uint32_t wd, char *out, int *resolutions, int nr, int rr, re_cuts_t *re_cuts, int8_t *telo_ends, uint32_t d_min_cell, double d_mass_frac, int no_contig_ec, int no_scaffold_ec, int no_mem_check)
451+
int run_yahs(char *fai, char *agp, char *link_file, uint32_t ml, uint8_t mq, char *out, int *resolutions, int nr, int rr, re_cuts_t *re_cuts, int8_t *telo_ends, uint32_t d_min_cell, double d_mass_frac, int no_contig_ec, int no_scaffold_ec, int no_mem_check)
450452
{
451453
int ec_round, resolution, re, r, rn, rc, ex;
452454
uint64_t n50;
@@ -468,8 +470,6 @@ int run_yahs(char *fai, char *agp, char *link_file, uint32_t ml, uint8_t mq, uin
468470
out_fn = (char *) malloc(strlen(out) + 35);
469471
out_agp = (char *) malloc(strlen(out) + 35);
470472
out_agp_break = (char *) malloc(strlen(out) + 35);
471-
472-
cov_norm = cov_norm_from_file(link_file, sdict, wd);
473473

474474
if (no_contig_ec == 0) {
475475
#ifdef DEBUG
@@ -521,6 +521,8 @@ int run_yahs(char *fai, char *agp, char *link_file, uint32_t ml, uint8_t mq, uin
521521
print_asm_stats(n_stats, l_stats, 1);
522522
asm_destroy(dict);
523523

524+
cov_norm = cov_norm_from_file(link_file, sdict);
525+
524526
r = rc = 0;
525527
rn = rr;
526528
ex = max_extra_try;
@@ -696,22 +698,27 @@ static void print_help(FILE *fp_help, int is_long_help)
696698
fprintf(fp_help, " -e STR restriction enzyme cutting sites [none]\n");
697699
fprintf(fp_help, " -l INT minimum length of a contig to scaffold [0]\n");
698700
fprintf(fp_help, " -q INT minimum mapping quality [10]\n");
701+
fprintf(fp_help, "\n");
702+
fprintf(fp_help, " --no-contig-ec do not do contig error correction\n");
703+
fprintf(fp_help, " --no-scaffold-ec do not do scaffold error correction\n");
704+
fprintf(fp_help, " --no-mem-check do not do memory check at runtime\n");
705+
fprintf(fp_help, " --file-type STR input file type BED|BAM|PA5|BIN, file name extension is ignored if set\n");
706+
fprintf(fp_help, " --read-length read length (required for PA5 format input) [150]\n");
707+
fprintf(fp_help, " --telo-motif STR telomeric sequence motif\n");
699708
if (is_long_help) {
709+
fprintf(fp_help, "\n");
700710
fprintf(fp_help, " --D-min-cells INT minimum number of cells to calculate the distance threshold [30]\n");
701711
fprintf(fp_help, " --D-mass-frac FLOAT fraction of HiC signals to calculate the distance threshold [0.99]\n");
712+
fprintf(fp_help, "\n");
702713
fprintf(fp_help, " --seq-ctype STR AGP output sequence component type [%s]\n", agp_component_type_val(DEFAULT_AGP_SEQ_COMPONENT_TYPE));
703714
fprintf(fp_help, " --gap-ctype STR AGP output gap component type [%s]\n", agp_component_type_val(DEFAULT_AGP_GAP_COMPONENT_TYPE));
704715
fprintf(fp_help, " --gap-link STR AGP output gap linkage evidence [%s]\n", agp_linkage_evidence_val(DEFAULT_AGP_LINKAGE_EVIDENCE));
705716
fprintf(fp_help, " --gap-size INT AGP output gap size between sequence component [%d]\n", DEFAULT_AGP_GAP_SIZE);
717+
fprintf(fp_help, "\n");
706718
fprintf(fp_help, " --convert-to-binary make a binary ouput file from the input and exit\n");
707719
fprintf(fp_help, " --print-telo-motifs print telomeric motifs in the database and exit\n");
708720
}
709-
fprintf(fp_help, " --no-contig-ec do not do contig error correction\n");
710-
fprintf(fp_help, " --no-scaffold-ec do not do scaffold error correction\n");
711-
fprintf(fp_help, " --no-mem-check do not do memory check at runtime\n");
712-
fprintf(fp_help, " --file-type STR input file type BED|BAM|PA5|BIN, file name extension is ignored if set\n");
713-
fprintf(fp_help, " --read-length read length (required for PA5 format input) [150]\n");
714-
fprintf(fp_help, " --telo-motif STR telomeric sequence motif\n");
721+
fprintf(fp_help, "\n");
715722
fprintf(fp_help, " -o STR prefix of output files [yahs.out]\n");
716723
fprintf(fp_help, " -v INT verbose level [%d]\n", VERBOSE);
717724
fprintf(fp_help, " -? print long help with extra option list\n");
@@ -754,7 +761,6 @@ int main(int argc, char *argv[])
754761
int *resolutions, nr, rr, mq, ml, rl;
755762
int no_contig_ec, no_scaffold_ec, no_mem_check, d_min_cell, print_telomotifs, convert_binary;
756763
int8_t *telo_ends;
757-
uint32_t wd;
758764
double q_drop, d_mass_frac;
759765
enum fileTypes f_type;
760766

@@ -770,7 +776,6 @@ int main(int argc, char *argv[])
770776
ml = 0;
771777
rl = 150;
772778
ecstr = 0;
773-
wd = 1000;
774779
q_drop = 0.1;
775780
d_min_cell = 30;
776781
d_mass_frac = 0.99;
@@ -1032,17 +1037,17 @@ int main(int argc, char *argv[])
10321037
link_bin_file = malloc(strlen(out) + 5);
10331038
sprintf(link_bin_file, "%s.bin", out);
10341039
fprintf(stderr, "[I::%s] dump hic links (BAM) to binary file %s\n", __func__, link_bin_file);
1035-
dump_links_from_bam_file(link_file, fai, ml, 0, wd, q_drop, link_bin_file);
1040+
dump_links_from_bam_file(link_file, fai, ml, 0, q_drop, link_bin_file);
10361041
} else if (f_type == BED) {
10371042
link_bin_file = malloc(strlen(out) + 5);
10381043
sprintf(link_bin_file, "%s.bin", out);
10391044
fprintf(stderr, "[I::%s] dump hic links (BED) to binary file %s\n", __func__, link_bin_file);
1040-
dump_links_from_bed_file(link_file, fai, ml, 0, wd, q_drop, link_bin_file);
1045+
dump_links_from_bed_file(link_file, fai, ml, 0, q_drop, link_bin_file);
10411046
} else if (f_type == PA5) {
10421047
link_bin_file = malloc(strlen(out) + 5);
10431048
sprintf(link_bin_file, "%s.bin", out);
10441049
fprintf(stderr, "[I::%s] dump hic links (PA5) to binary file %s\n", __func__, link_bin_file);
1045-
dump_links_from_pa5_file(link_file, fai, ml, 0, rl, wd, q_drop, link_bin_file);
1050+
dump_links_from_pa5_file(link_file, fai, ml, 0, rl, q_drop, link_bin_file);
10461051
} else if (f_type == BIN) {
10471052
if (convert_binary) {
10481053
fprintf(stderr, "[E::%s] Input is already in BIN format\n", __func__);
@@ -1083,7 +1088,7 @@ int main(int argc, char *argv[])
10831088

10841089
if (convert_binary) goto final_clean;
10851090

1086-
ret = run_yahs(fai, agp, link_bin_file, ml, mq8, wd, out, resolutions, nr, rr, re_cuts, telo_ends, d_min_cell, d_mass_frac, no_contig_ec, no_scaffold_ec, no_mem_check);
1091+
ret = run_yahs(fai, agp, link_bin_file, ml, mq8, out, resolutions, nr, rr, re_cuts, telo_ends, d_min_cell, d_mass_frac, no_contig_ec, no_scaffold_ec, no_mem_check);
10871092

10881093
if (ret == 0) {
10891094
agp_final = (char *) malloc(strlen(out) + 35);

0 commit comments

Comments
 (0)