443757e6a04336d7217fca4abe0e3774613323ea chmalee Fri May 22 16:22:33 2020 -0700 Adding a comment to a function after code review, refs #25585 diff --git src/hg/hgTracks/vcfTrack.c src/hg/hgTracks/vcfTrack.c index 799787f..a3251b9 100644 --- src/hg/hgTracks/vcfTrack.c +++ src/hg/hgTracks/vcfTrack.c @@ -1814,30 +1814,32 @@ int i; struct vcfRecord *rec = vcff->records; int ix = 0; // index into ret for (i = 0; i < slCount(hapArray); i++) { struct hapCluster *hc = hapArray[i]; struct vcfGenotype *gt = &(rec->genotypes[hc->gtHapIx >> 1]); if (!doChild && !sameString(gt->id, sample)) ret[ix++] = i; else if (doChild && sameString(gt->id, sample)) ret[ix++] = i; } } static struct hapDistanceMatrix *fillOutDistanceMatrix(struct hapCluster **hapArray, struct vcfFile *vcff, char *sample, struct cwaExtraData *helper, int gtCount) +/* Allocates and fill out a struct hapDistanceMatrix, one row per child allele, and a + * hapDistanceMatrixCell per parent allele */ { short parGtCount = (gtCount - 1) * 2; int i,j; struct vcfRecord *rec = vcff->records; struct hapDistanceMatrix *matrix = NULL; short childHapArrayIndices[2]; short parentHapArrayIndices[parGtCount]; assignHapArrayIx(childHapArrayIndices, hapArray, vcff, sample, TRUE); assignHapArrayIx(parentHapArrayIndices, hapArray, vcff, sample, FALSE); for (i = 0; i < 2; i++) { struct hapDistanceMatrix *row = needMem(sizeof(struct hapDistanceMatrix)); struct hapCluster *hcChild = hapArray[childHapArrayIndices[i]]; struct vcfGenotype *gt = &(rec->genotypes[hcChild->gtHapIx >> 1]); row->row = NULL;