예제 #1
0
    void
    process_block(const bool is_in_region,
                  const unsigned end,
                  VcfRecord& vcfr) const {

        if(end>vcfr.GetPos()) {
            vcfr.SetInfoVal("END",_intstr.get32(end));
        } else {
            vcfr.DeleteInfoKeyVal("END");
        }
        if(is_in_region) make_record_haploid(vcfr);
        vcfr.WriteUnaltered(_opt.outfp);
    }
예제 #2
0
    void
    process_block(const bool is_in_region,
                  const unsigned end,
                  VcfRecord& vcfr) const {

        if(! is_in_region) {
            if(end>vcfr.GetPos()) {
                vcfr.SetInfoVal("END",_intstr.get32(end));
            } else {
                vcfr.DeleteInfoKeyVal("END");
            }
            vcfr.WriteUnaltered(_opt.outfp);
        } else {
            vcfr.DeleteInfoKeyVal("END");
            vcfr.WriteUnaltered(_opt.outfp);
            while(end>vcfr.GetPos()) {
                const int next_pos(vcfr.GetPos()+1);
                vcfr.SetPos(next_pos);
                vcfr.SetRef(_scp.get_char(vcfr.GetChrom().c_str(),next_pos));
                vcfr.WriteUnaltered(_opt.outfp);
            }
        }
    }