protected void checkLoadedVariants(List<Integer> fileIds, StudyConfiguration studyConfiguration) throws StorageEngineException { for (Integer fileId : fileIds) { checkLoadedVariants(fileId, studyConfiguration); } }
@Override public URI postLoad(URI input, URI output) throws StorageEngineException { return postLoad(input, output, null); }
public final StudyConfiguration getStudyConfiguration() throws StorageEngineException { return getStudyConfiguration(false); }
@Override protected void securePreLoad(StudyConfiguration studyConfiguration, VariantFileMetadata fileMetadata) throws StorageEngineException { super.securePreLoad(studyConfiguration, fileMetadata); MergeMode mergeMode; if (!studyConfiguration.getAttributes().containsKey(Options.MERGE_MODE.key())) { mergeMode = MergeMode.from(options); studyConfiguration.getAttributes().put(Options.MERGE_MODE.key(), mergeMode); } else { options.put(MERGE_MODE.key(), MergeMode.from(studyConfiguration.getAttributes())); } }
@Override protected boolean doIntersectWithSearch(Query query, QueryOptions options) throws StorageEngineException { boolean doIntersectWithSearch = super.doIntersectWithSearch(query, options); if (doIntersectWithSearch) { if (!isValidParam(query, VariantQueryParam.ANNOT_TRAIT) && VariantStorageEngine.UseSearchIndex.from(options).equals(VariantStorageEngine.UseSearchIndex.AUTO) && doHBaseSampleIndexIntersect(query, options)) { return false; } } return doIntersectWithSearch; }
protected void loadFiles() throws Exception { input1 = getResourceUri("variant-test-sv.vcf"); studyConfiguration = new StudyConfiguration(1, "s1"); pipelineResult1 = runDefaultETL(input1, variantStorageEngine, studyConfiguration, new QueryOptions() .append(VariantStorageEngine.Options.ANNOTATE.key(), true)); input2 = getResourceUri("variant-test-sv_2.vcf"); pipelineResult2 = runDefaultETL(input2, variantStorageEngine, studyConfiguration, new QueryOptions() .append(VariantStorageEngine.Options.ANNOTATE.key(), true)); }
@Before public void before() throws Exception { dbAdaptor = variantStorageEngine.getDBAdaptor(); if (!loaded) { super.before(); load(); loaded = true; } }
@Override public VariantDBIterator iterator(Query query, QueryOptions options) { try { return (VariantDBIterator) getOrIterator(query, options, true); } catch (StorageEngineException e) { throw VariantQueryException.internalException(e); } }
protected StudyConfiguration getOrCreateStudyConfiguration(boolean forceFetch) throws StorageEngineException { return checkExistsStudyConfiguration(getStudyConfiguration(forceFetch)); }
public static URI getResourceUri(String resourceName) throws IOException { return getResourceUri(resourceName, resourceName); }
public static StoragePipelineResult runETL(VariantStorageEngine variantStorageManager, ObjectMap options, boolean doExtract, boolean doTransform, boolean doLoad) throws IOException, FileFormatException, StorageEngineException { return runETL(variantStorageManager, inputUri, outputUri, options, doExtract, doTransform, doLoad); }
public static StoragePipelineResult runDefaultETL(VariantStorageEngine variantStorageManager, StudyConfiguration studyConfiguration) throws URISyntaxException, IOException, FileFormatException, StorageEngineException { return runDefaultETL(inputUri, variantStorageManager, studyConfiguration); }
protected static URI newOutputUri(String testName) throws IOException { return newOutputUri(testName, outputUri); }
private void checkLoadedVariants(VariantDBAdaptor dbAdaptor, StudyConfiguration studyConfiguration, boolean includeSamples, boolean includeSrc) { checkLoadedVariants(dbAdaptor, studyConfiguration, includeSamples, includeSrc, NUM_VARIANTS/*9792*/); }
protected Iterator<String> variantIdIteratorFromSearch(Query query) throws StorageEngineException { return variantIdIteratorFromSearch(query, Integer.MAX_VALUE, 0, null); }
public static Path getTmpRootDir() throws IOException { // Path rootDir = Paths.get("/tmp", "VariantStorageManagerTest"); if (rootDir == null) { newRootDir(); } return rootDir; }
private VariantFileMetadata checkTransformedVariants(URI variantsJson, StudyConfiguration studyConfiguration) throws StorageEngineException { return checkTransformedVariants(variantsJson, studyConfiguration, -1); }
public static URI newOutputUri() throws IOException { return newOutputUri(1, outputUri); }
private void checkLoadedVariants(VariantDBAdaptor dbAdaptor, StudyConfiguration studyConfiguration, boolean includeSamples, boolean includeSrc, int expectedNumVariants) { checkLoadedVariants(dbAdaptor, studyConfiguration, includeSamples, includeSrc, false, expectedNumVariants); }
public static URI newOutputUri(int extraCalls) throws IOException { return newOutputUri(1 + extraCalls, outputUri); }