lh3 / wgsim

Reads simulator
258 stars 91 forks source link

zygosity flag incorrectly printed for het deletions #4

Open delocalizer opened 11 years ago

delocalizer commented 11 years ago

Trivial fix:

diff --git a/wgsim.c b/wgsim.c
index 5c82192..55b8daf 100644
--- a/wgsim.c
+++ b/wgsim.c
@@ -193,14 +193,14 @@ void wgsim_print_mutref(const char *name, const kseq_t *ks, mutseq_t *hap1, muts
                                                printf("%s\t%d\t", name, i+1);
                                                for (j = i; j < ks->seq.l && hap1->s[j] != hap2->s[j] && (hap1->s[j]&mutmsk) == DELETE; ++j)
                                                        putchar("ACGTN"[nst_nt4_table[(int)ks->seq.s[j]]]);
-                                               printf("\t-\t-\n");
-                                               printf("\t-\t+\n");
                                      }
                              } else if ((c[2]&mutmsk) == DELETE) {
                                      if (i >= j) {
                                              printf("%s\t%d\t", name, i+1);
                                              for (j = i; j < ks->seq.l && hap1->s[j] != hap2->s[j] && (hap2->s[j]&mutmsk) == DELETE; ++j)
                                                      putchar("ACGTN"[nst_nt4_table[(int)ks->seq.s[j]]]);
-                                               printf("\t-\t-\n");
-                                               printf("\t-\t+\n");
                                      }
                              } else if (((c[1] & mutmsk) >> 12) <= 4 && ((c[1] & mutmsk) >> 12) > 0) { // ins1
                                      printf("%s\t%d\t-\t", name, i+1);