You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: csq.c
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -554,7 +554,9 @@ void init_data(args_t *args)
554
554
if ( args->hdr_nsmpl )
555
555
bcf_hdr_printf(args->hdr,"##FORMAT=<ID=%s,Number=.,Type=Integer,Description=\"Bitmask of indexes to INFO/BCSQ, with interleaved first/second haplotype. Use \\\"bcftools query -f'[%%CHROM\\t%%POS\\t%%SAMPLE\\t%%TBCSQ\\n]'\\\" to translate.\">",args->bcsq_tag);
556
556
if ( bcf_hdr_write(args->out_fh, args->hdr)!=0 ) error("[%s] Error: cannot write the header to %s\n", __func__,args->output_fname?args->output_fname:"standard output");
557
-
if ( args->write_index&&init_index(args->out_fh,args->hdr,args->output_fname,&args->index_fn)<0 ) error("Error: failed to initialise index for %s\n",args->output_fname);
557
+
if ( init_index2(args->out_fh,args->hdr,args->output_fname,
558
+
&args->index_fn, args->write_index) <0 )
559
+
error("Error: failed to initialise index for %s\n",args->output_fname);
558
560
}
559
561
if ( args->verbosity>0 ) fprintf(stderr,"Calling...\n");
Copy file name to clipboardExpand all lines: mpileup.c
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -863,7 +863,9 @@ static int mpileup(mplp_conf_t *conf)
863
863
for (i=0; i<nsmpl; i++)
864
864
bcf_hdr_add_sample(conf->bcf_hdr, smpl[i]);
865
865
if ( bcf_hdr_write(conf->bcf_fp, conf->bcf_hdr)!=0 ) error("[%s] Error: failed to write the header to %s\n",__func__,conf->output_fname?conf->output_fname:"standard output");
866
-
if ( conf->write_index&&init_index(conf->bcf_fp,conf->bcf_hdr,conf->output_fname,&conf->index_fn)<0 ) error("Error: failed to initialise index for %s\n",conf->output_fname);
866
+
if ( init_index2(conf->bcf_fp,conf->bcf_hdr,conf->output_fname,
867
+
&conf->index_fn, conf->write_index) <0 )
868
+
error("Error: failed to initialise index for %s\n",conf->output_fname);
if ( args->out_fh==NULL ) error("Can't write to \"%s\": %s\n", args->output_fname, strerror(errno));
238
238
if ( bcf_hdr_write(args->out_fh, args->hdr_out)!=0 ) error("[%s] Error: cannot write to %s\n", __func__,args->output_fname);
239
-
if ( args->write_index&&init_index(args->out_fh,args->hdr_out,args->output_fname,&args->index_fn)<0 ) error("Error: failed to initialise index for %s\n",args->output_fname);
239
+
if ( init_index2(args->out_fh,args->hdr_out,args->output_fname,
240
+
&args->index_fn, args->write_index)<0 )
241
+
error("Error: failed to initialise index for %s\n",args->output_fname);
240
242
241
243
if ( args->max_AC_str )
242
244
{
@@ -485,12 +487,12 @@ int run(int argc, char **argv)
485
487
{"targets",1,0,'t'},
486
488
{"targets-file",1,0,'T'},
487
489
{"targets-overlap",required_argument,NULL,4},
488
-
{"write-index",no_argument,NULL,5},
490
+
{"write-index",optional_argument,NULL,'W'},
489
491
{NULL,0,NULL,0}
490
492
};
491
493
intc;
492
494
char*tmp;
493
-
while ((c=getopt_long(argc, argv, "O:o:i:e:r:R:t:T:0:1:a:f:",loptions,NULL)) >= 0)
495
+
while ((c=getopt_long(argc, argv, "O:o:i:e:r:R:t:T:0:1:a:f:W::",loptions,NULL)) >= 0)
494
496
{
495
497
switch (c)
496
498
{
@@ -536,7 +538,10 @@ int run(int argc, char **argv)
0 commit comments