X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bcftools%2Fcall1.c;h=f6717b37297216f4aba010611b7c72bda90892fa;hb=a9a8e7769267e5a39a10004f2e0a10bee9e33aaf;hp=3cc464949eb69e630ee7905c96d4f8050b1b569c;hpb=543a9fc2055575dcc17a7bb9c83ecca17a32cec6;p=samtools.git diff --git a/bcftools/call1.c b/bcftools/call1.c index 3cc4649..f6717b3 100644 --- a/bcftools/call1.c +++ b/bcftools/call1.c @@ -33,6 +33,7 @@ KSTREAM_INIT(gzFile, gzread, 16384) #define VC_EM 0x10000 #define VC_PAIRCALL 0x20000 #define VC_QCNT 0x40000 +#define VC_INDEL_ONLY 0x80000 typedef struct { int flag, prior_type, n1, n_sub, *sublist, n_perm; @@ -283,6 +284,8 @@ static void write_header(bcf_hdr_t *h) kputs("##FORMAT=\n", &str); if (!strstr(str.s, "##FORMAT=\n", &str); + if (!strstr(str.s, "##FORMAT=\n", &str); if (!strstr(str.s, "##FORMAT=\n", &str); if (!strstr(str.s, "##FORMAT== 0) { + while ((c = getopt(argc, argv, "FN1:l:cC:eHAGvbSuP:t:p:QgLi:IMs:D:U:X:d:T:Yw")) >= 0) { switch (c) { case '1': vc.n1 = atoi(optarg); break; case 'l': vc.bed = bed_read(optarg); break; @@ -335,6 +338,7 @@ int bcfview(int argc, char *argv[]) case 'u': vc.flag |= VC_UNCOMP | VC_BCFOUT; break; case 'g': vc.flag |= VC_CALL_GT | VC_CALL; break; case 'I': vc.flag |= VC_NO_INDEL; break; + case 'w': vc.flag |= VC_INDEL_ONLY; break; case 'M': vc.flag |= VC_ANNO_MAX; break; case 'Y': vc.flag |= VC_QCNT; break; case 't': vc.theta = atof(optarg); break; @@ -482,6 +486,7 @@ int bcfview(int argc, char *argv[]) if (vc.flag & VC_FIX_PL) bcf_fix_pl(b); is_indel = bcf_is_indel(b); if ((vc.flag & VC_NO_INDEL) && is_indel) continue; + if ((vc.flag & VC_INDEL_ONLY) && !is_indel) continue; if ((vc.flag & VC_ACGT_ONLY) && !is_indel) { int x; if (b->ref[0] == 0 || b->ref[1] != 0) continue;