Skip to content

Commit 09433e2

Browse files
committed
Bugfix to mGAP release and clinvar
1 parent 64ceef2 commit 09433e2

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

mGAP/src/org/labkey/mgap/pipeline/mGapReleaseGenerator.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,11 +1182,12 @@ private void inspectAndSummarizeVcf(JobContext ctx, File vcfInput, GeneToNameTra
11821182
if (vc.getAttribute("CLN_SIG") != null)
11831183
{
11841184
List<String> clnSigs = vc.getAttributeAsStringList("CLN_SIG", "");
1185-
if (clnSigs.size() != vc.getAlternateAlleles().size())
1185+
if (clnSigs.size() != vc.getAlleles().size())
11861186
{
1187-
throw new IllegalStateException("CLN_SIG and alt alleles were not the same length: " + vc.toStringWithoutGenotypes());
1187+
throw new IllegalStateException("CLN_SIG and alleles were not the same length: " + vc.toStringWithoutGenotypes());
11881188
}
11891189

1190+
// NOTE: we iterate REF + ALT here:
11901191
List<String> clnDisease = vc.getAttributeAsStringList("CLN_DN", "");
11911192
List<String> clnAlleleIds = vc.getAttributeAsStringList("CLN_ALLELEID", "");
11921193
int i = -1;
@@ -1198,7 +1199,7 @@ private void inspectAndSummarizeVcf(JobContext ctx, File vcfInput, GeneToNameTra
11981199
continue;
11991200
}
12001201

1201-
Allele altAllele = vc.getAlternateAllele(i);
1202+
Allele a = vc.getAlleles().get(i);
12021203

12031204
String[] sigSplit = sigList.split("\\|");
12041205
List<String> diseaseSplit = Arrays.asList(clnDisease.get(i).split("\\|"));
@@ -1214,7 +1215,7 @@ private void inspectAndSummarizeVcf(JobContext ctx, File vcfInput, GeneToNameTra
12141215

12151216
try
12161217
{
1217-
maybeWriteVariantLine(queuedLines, vc, altAllele.getBaseString(), "ClinVar", diseaseSplit.get(j), description, overlappingGenes, omimIds, omimPhenotypes, ctx.getLogger(), "ClinVar:" + clnAlleleIds.get(i));
1218+
maybeWriteVariantLine(queuedLines, vc, a.getBaseString(), "ClinVar", diseaseSplit.get(j), description, overlappingGenes, omimIds, omimPhenotypes, ctx.getLogger(), "ClinVar:" + clnAlleleIds.get(i));
12181219

12191220
}
12201221
catch (IndexOutOfBoundsException e)

0 commit comments

Comments
 (0)