Skip to content

Commit 2859cb5

Browse files
committed
Merge discvr-22.11 to discvr-23.3
2 parents c8e165e + 05f1052 commit 2859cb5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/variant/KingInferenceStep.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public Output processVariants(File inputVCF, File outputDirectory, ReferenceGeno
7777
plinkArgs.add(inputVCF.getPath());
7878

7979
plinkArgs.add("--make-bed");
80+
81+
// Added since KING is designed for plink1.9. This avoids the "Too many first alleles as the major allele" error.
82+
plinkArgs.add("--maj-ref");
8083

8184
boolean limitToChromosomes = getProvider().getParameterByName("limitToChromosomes").extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), Boolean.class, true);
8285
if (limitToChromosomes)

SequenceAnalysis/src/org/labkey/sequenceanalysis/util/ChainFileValidator.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,16 @@ public void exec(Results rs) throws SQLException
338338

339339
//UCSC is a main source of chain files, so deal with their quirks:
340340
// https://genome.ucsc.edu/cgi-bin/hgGateway
341+
if (refName.startsWith("chr0"))
342+
{
343+
// Allow chr01, chr1 -> 1
344+
String toTest = refName.replaceFirst("chr0", "");
345+
if (cachedReferences.containsKey(toTest))
346+
{
347+
return cachedReferences.get(toTest);
348+
}
349+
}
350+
341351
if (refName.startsWith("chr"))
342352
{
343353
String toTest = refName.replaceFirst("chr", "");

0 commit comments

Comments
 (0)