Skip to content

Commit

Permalink
default stdout VCF
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasrausch committed Aug 3, 2022
1 parent b76fddf commit 5defe1c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modvcf.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,9 @@ vcfOutput(TConfig const& c, std::vector<TStructuralVariantRecord> const& svs, TJ
bam_hdr_t* bamhd = sam_hdr_read(samfile);

// Output all structural variants
//htsFile *fp = hts_open(c.outfile.string().c_str(), "wb");
htsFile *fp = hts_open(c.outfile.string().c_str(), "w");
std::string fmtout = "wb";
if (c.outfile.string() == "-") fmtout = "w";
htsFile *fp = hts_open(c.outfile.string().c_str(), fmtout.c_str());
bcf_hdr_t *hdr = bcf_hdr_init("w");

// Print vcf header
Expand Down Expand Up @@ -652,9 +653,9 @@ vcfOutput(TConfig const& c, std::vector<TStructuralVariantRecord> const& svs, TJ
hts_close(fp);

// Build index
//bcf_index_build(c.outfile.string().c_str(), 14);
if (c.outfile.string() != "-") bcf_index_build(c.outfile.string().c_str(), 14);
}


}

Expand Down

0 comments on commit 5defe1c

Please sign in to comment.