Skip to content

Commit

Permalink
Fix issue with hg38 and tabix (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor authored Jul 29, 2024
1 parent 1cc7be4 commit 8086733
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -434,4 +434,7 @@ protected TaskResults runTask(final OutputWriter output, ITask task) {

}

public void setBuild(String build) {
this.build = build;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public void processFile(VcfFile myvcfFile, LineWriter mafWriter, LineWriter excl
}

// load reference snp
SitesEntry refSnp = legendReader.findByPosition(myvcfFile.getChromosome(), snp.getStart());
SitesEntry refSnp = legendReader.findByPosition(myvcfFile.getRawChromosome(), snp.getStart());

for (VcfChunk openChunk : chunks.values()) {
if (snp.getStart() <= openChunk.getEnd() + phasingWindow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,38 @@ public void testQcStatistics() throws Exception {

}

@Test
public void testQcStatisticsChr20Hg19() throws Exception {

String inputFolder = "test-data/data/chr20-phased";

QualityControlCommand command = buildCommand(inputFolder);
command.setPopulation("eur");
command.setReference("test-data/configs/hapmap-chr20/hapmap2.json");
command.call();
OutputReader log = new OutputReader(CLOUDGENE_LOG);
assertTrue(log.hasInMemory("Remaining sites in total: 7,735"));

}
@Test
public void testQcStatisticsChr20Hg38() throws Exception {

String inputFolder = "test-data/data/chr20-phased-hg38";

QualityControlCommand command = buildCommand(inputFolder);
command.setPopulation("eur");
command.setBuild("hg38");
//set the following file in hapmap2: hapmap_r22.chr20.CEU.hg38_impute.legend.gz
command.setReference("test-data/configs/hapmap-chr20-hg38/hapmap2.json");
command.call();

OutputReader log = new OutputReader(CLOUDGENE_LOG);
log.view();
assertTrue(log.hasInMemory("Remaining sites in total: 7,735"));

}


@Test
public void testQcStatisticAllChunksExcluded() throws Exception {

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 8086733

Please sign in to comment.