Skip to content

Commit

Permalink
storage: Fix some tests. #TASK-6596
Browse files Browse the repository at this point in the history
  • Loading branch information
j-coll committed Jul 24, 2024
1 parent 9a7dd15 commit 5d3c7f4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void before() throws Exception {
variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL);
variantStorageEngine.getConfiguration().getCellbase().setVersion(ParamConstants.CELLBASE_VERSION);
variantStorageEngine.getConfiguration().getCellbase().setDataRelease(ParamConstants.CELLBASE_DATA_RELEASE);
variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38");
if (!loaded) {
clearDB(DB_NAME);
loadFiles();
Expand All @@ -59,6 +60,7 @@ protected void loadFiles() throws Exception {
variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL);
variantStorageEngine.getConfiguration().getCellbase().setVersion(ParamConstants.CELLBASE_VERSION);
variantStorageEngine.getConfiguration().getCellbase().setDataRelease(ParamConstants.CELLBASE_DATA_RELEASE);
variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38");
studyMetadata = new StudyMetadata(1, "s1");
// variantStorageEngine.getOptions().append(VariantStorageOptions.ANNOTATOR_CELLBASE_EXCLUDE.key(), "expression,clinical");
input1 = getResourceUri("variant-test-bnd.vcf");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ public void refresh() {
@Override
public synchronized DataResult<ProjectMetadata> getProjectMetadata() {
final DataResult<ProjectMetadata> result = new DataResult<>();
if (projectMetadata == null) {
projectMetadata = new ProjectMetadata("hsapiens", "grch37", 1);
if (projectMetadata != null) {
result.setResults(Collections.singletonList(projectMetadata.copy()));
}
result.setResults(Collections.singletonList(projectMetadata.copy()));
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class HadoopVariantStorageEngineBNDTest extends VariantStorageEngineBNDTe
@Override
protected void loadFiles() throws Exception {
super.loadFiles();
VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri());
VariantHbaseTestUtils.printVariants(((HadoopVariantStorageEngine) variantStorageEngine).getDBAdaptor(), newOutputUri());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ public class FamilyIndexTest extends VariantStorageBaseTest implements HadoopVar

@Before
public void before() throws Exception {
HadoopVariantStorageEngine variantStorageEngine = getVariantStorageEngine();
variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL);
variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.2");
variantStorageEngine.getConfiguration().getCellbase().setDataRelease("3");
variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38");
variantStorageEngine.reloadCellbaseConfiguration();
if (!loaded) {
HadoopVariantStorageEngine variantStorageEngine = getVariantStorageEngine();
variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL);
variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.2");
variantStorageEngine.getConfiguration().getCellbase().setDataRelease("3");
variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38");
variantStorageEngine.reloadCellbaseConfiguration();
URI outputUri = newOutputUri();

ObjectMap params = new ObjectMap(VariantStorageOptions.ANNOTATE.key(), false)
Expand All @@ -91,7 +91,7 @@ public void before() throws Exception {

variantStorageEngine.annotate(outputUri, new ObjectMap());

VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName()));
VariantHbaseTestUtils.printVariants(variantStorageEngine.getDBAdaptor(), newOutputUri(getTestName().getMethodName()));

mendelianErrorVariants = new HashSet<>();
deNovoVariants = new HashSet<>();
Expand Down

0 comments on commit 5d3c7f4

Please sign in to comment.