Skip to content

Commit

Permalink
Fix code GenotypeConcordance code that is sensitive to Allele orderin…
Browse files Browse the repository at this point in the history
…g in sets.
  • Loading branch information
cmnbroad committed Jun 6, 2022
1 parent fc91208 commit 6f9d58f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/picard/vcf/GenotypeConcordance.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -534,7 +535,7 @@ private void writeVcfTuple(final VcfTuple tuple, final VariantContextWriter writ
final List<Allele> callAlleles = alleles.callAlleles();

// Get the alleles present at this site for both samples to use for the output variant context, but remove no calls.
final Set<Allele> siteAlleles = new HashSet<>();
final Set<Allele> siteAlleles = new LinkedHashSet<>();
siteAlleles.addAll(allAlleles);
siteAlleles.remove(Allele.NO_CALL);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@
##source=htsbox-pileup-r315
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT call truth
chr1 18359359 . A G,* 30 . CONC_ST=TP GT:AD 2|1:0,1,1 2|1:0,1,1
chr1 18359383 . AAAGGAAGG GAAGGAAGG,A,*,AAAGGAAGGAAGG 216.73 . CONC_ST=FP,FN GT:AD:DP:GQ:MBQ:MFRL:MMQ:MPOS:PL 2/4:0,5,3:8:76:30,30:0,418,443:60,60:13,18:254,76,159,185,0,175 3|1:0,1,1
chr1 18359383 . AAAGGAAGG *,GAAGGAAGG,A,AAAGGAAGGAAGG 216.73 . CONC_ST=FP,FN GT:AD:DP:GQ:MBQ:MFRL:MMQ:MPOS:PL 3/4:0,5,3:8:76:30,30:0,418,443:60,60:13,18:254,76,159,185,0,175 1|2:0,1,1
chrX 27587985 . AATATATAT A,* 6939.56 . CONC_ST=FP,FN GT:AD:DP:GQ:PL 0/2:16,16,0,0:32:99:522,0,592,571,640,1210,571,640,1210,1210 1/1:0,20

0 comments on commit 6f9d58f

Please # to comment.