Skip to content

Commit

Permalink
update test case for invalid chrX alleles
Browse files Browse the repository at this point in the history
  • Loading branch information
seppinho committed Apr 10, 2018
1 parent f49c8c4 commit 1064905
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ public List<String> prepareChrX(String filename, boolean phased, LineWriter chrX
vcfChunkWriterNonPar.writeHeader(header);
vcfChunkWriterPar1.writeHeader(header);
vcfChunkWriterPar2.writeHeader(header);

int mixedGenotypes[] = null;
int count = 0;

Expand All @@ -673,7 +673,6 @@ public List<String> prepareChrX(String filename, boolean phased, LineWriter chrX
nonParEnd = 155701383;
}


VCFCodec codec = new VCFCodec();
codec.setVCFHeader(vcfReader.getFileHeader(), VCFHeaderVersion.VCF4_1);
LineReader reader = new LineReader(filename);
Expand All @@ -696,7 +695,7 @@ public List<String> prepareChrX(String filename, boolean phased, LineWriter chrX
continue;
}

//now decode, since it's valid
// now decode, since it's a valid VCF
VariantContext line = codec.decode(lineString);

if (line.getContig().equals("23")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,10 @@ public void testChrXInvalidAlleles() throws IOException, ZipException {
FastQualityControlMock qcStats = new FastQualityControlMock(configFolder);
boolean result = run(context, qcStats);

//FileUtil.deleteDirectory(file);
assertTrue(result);
assertTrue(context.hasInMemory("Invalid alleles: 190"));

FileUtil.deleteDirectory(file);

}

Expand Down

0 comments on commit 1064905

Please sign in to comment.