Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes/remove phased check #13

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,6 @@ private boolean checkVcfFiles() throws Exception {

phased = phased && vcfFile.isPhased();

if (vcfFile.isPhasedAutodetect() && !vcfFile.isPhased()) {
output.error("File should be phased, but also includes unphased and/or missing genotypes! Please double-check!");
return false;
}

if (noSamples < minSamples && minSamples != 0) {
output.error("At least " + minSamples + " samples must be uploaded.");
return false;
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/genepi/imputationserver/steps/vcf/VcfFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public class VcfFile {

private boolean chrX = false;

private boolean phasedAutodetect = true;

private int chunkSize;

private boolean chrPrefix;
Expand Down Expand Up @@ -135,14 +133,6 @@ public String getType() {
}
}

public boolean isPhasedAutodetect() {
return phasedAutodetect;
}

public void setPhasedAutodetect(boolean phasedAutodetect) {
this.phasedAutodetect = phasedAutodetect;
}

public void setChunkSize(int chunkSize) {
this.chunkSize = chunkSize;
}
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/genepi/imputationserver/steps/vcf/VcfFileUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static VcfFile load(String vcfFilename, int chunksize, boolean createInde
LineReader lineReader = new LineReader(vcfFilename);

boolean phased = true;
boolean phasedAutodetect = true;
boolean firstLine = true;
while (lineReader.next()) {

Expand Down Expand Up @@ -64,20 +63,6 @@ public static VcfFile load(String vcfFilename, int chunksize, boolean createInde

}

if (firstLine) {
boolean containsSymbol = tiles[9].contains("/") || tiles[9].contains(".");

if (!containsSymbol) {
phasedAutodetect = true;
} else {
phasedAutodetect = false;
}
firstLine = false;

}

// TODO: check that all are phased
// context.getGenotypes().get(0).isPhased();
chromosomes.add(chromosome);
if (chromosomes.size() > 1) {
throw new IOException(
Expand Down Expand Up @@ -154,7 +139,6 @@ public static VcfFile load(String vcfFilename, int chunksize, boolean createInde
pair.setRawChromosomes(rawChromosomes);
pair.setChrPrefix(hasChrPrefix);
pair.setPhased(phased);
pair.setPhasedAutodetect(phasedAutodetect);
pair.setChunkSize(chunksize);
return pair;

Expand Down
Loading