@Test @Transactional(propagation = Propagation.REQUIRES_NEW) public void testLoadVcfFilterInfoForProject() throws IOException, InterruptedException, NoSuchAlgorithmException, VcfReadingException, FeatureIndexException { VcfFilterInfo filterInfo = featureIndexManager.loadVcfFilterInfoForProject(testProject.getId()); Assert.assertFalse(filterInfo.getAvailableFilters().isEmpty()); Assert.assertFalse(filterInfo.getInfoItems().isEmpty()); }
public VcfFilterInfo loadVcfFilterInfoForProject(long projectId) throws IOException { Project project = projectManager.load(projectId); List<Long> vcfIds = project.getItems().stream() .filter(item -> item.getBioDataItem() != null && item.getBioDataItem().getFormat() == BiologicalDataItemFormat.VCF) .map(item -> (item.getBioDataItem()).getId()) .collect(Collectors.toList()); return vcfManager.getFiltersInfo(vcfIds); }
FeatureIndexManager { public VcfFilterInfo loadVcfFilterInfoForProject(long projectId) throws IOException { Project project = projectManager.load(projectId); List<Long> vcfIds = project.getItems().stream() .filter(item -> item.getBioDataItem() != null && item.getBioDataItem().getFormat() == BiologicalDataItemFormat.VCF) .map(item -> (item.getBioDataItem()).getId()) .collect(Collectors.toList()); return vcfManager.getFiltersInfo(vcfIds); } }
FeatureIndexManager { public VcfFilterInfo loadVcfFilterInfoForProject(long projectId) throws IOException { Project project = projectManager.load(projectId); List<Long> vcfIds = project.getItems().stream() .filter(item -> item.getBioDataItem() != null && item.getBioDataItem().getFormat() == BiologicalDataItemFormat.VCF) .map(item -> (item.getBioDataItem()).getId()) .collect(Collectors.toList()); return vcfManager.getFiltersInfo(vcfIds); }  }
FeatureIndexManager { public VcfFilterInfo loadVcfFilterInfoForProject(long projectId) throws IOException { Project project = projectManager.load(projectId); List<Long> vcfIds = project.getItems().stream() .filter(item -> item.getBioDataItem() != null && item.getBioDataItem().getFormat() == BiologicalDataItemFormat.VCF) .map(item -> (item.getBioDataItem()).getId()) .collect(Collectors.toList()); return vcfManager.getFiltersInfo(vcfIds); }  void deleteFromIndexByFileId(final long projectId, List<Pair<FeatureType, Long>> fileIds); Set<String> searchGenesInVcfFilesInProject(long projectId, String gene, List<Long> vcfFileIds); Set<String> searchGenesInVcfFiles(String gene, List<Long> vcfFileIds); List<Chromosome> filterChromosomes(VcfFilterForm filterForm, long projectId); List<Chromosome> filterChromosomes(VcfFilterForm filterForm); IndexSearchResult<VcfIndexEntry> filterVariations(VcfFilterForm filterForm, long projectId); int getTotalPagesCount(VcfFilterForm filterForm); int getTotalPagesCount(VcfFilterForm filterForm, long projectId); List<Group> groupVariations(VcfFilterForm filterForm, long projectId, String groupByField); List<Group> groupVariations(VcfFilterForm filterForm, String groupByField); IndexSearchResult<VcfIndexEntry> filterVariations(VcfFilterForm filterForm); IndexSearchResult searchFeaturesInProject(String featureId, long projectId); IndexSearchResult searchFeaturesByReference(String featureId, long referenceId); VcfFilterInfo loadVcfFilterInfoForProject(long projectId); void buildIndexForFile(FeatureFile featureFile); Set<String> fetchGeneIds(int start, int end, List<GeneFile> geneFiles, Chromosome chromosome); void writeLuceneIndexForFile(final FeatureFile featureFile,
            final List<? extends FeatureIndexEntry> entries,
            VcfFilterInfo vcfFilterInfo); void makeIndexForBedReader(BedFile bedFile, AbstractFeatureReader<NggbBedFeature, LineIterator> reader,
                                      Map<String, Chromosome> chromosomeMap); void makeIndexForVcfReader(VcfFile vcfFile, FeatureReader<VariantContext> reader, List<GeneFile> geneFiles,
                                       Map<String, Chromosome> chromosomeMap, VcfFilterInfo info); void processGeneFile(GeneFile geneFile, final Map<String, Chromosome> chromosomeMap,
            boolean full); void addGeneFeatureToIndex(List<FeatureIndexEntry> allEntries, GeneFeature feature,
                                     Map<String, Chromosome> chromosomeMap); }
FeatureIndexManager { public VcfFilterInfo loadVcfFilterInfoForProject(long projectId) throws IOException { Project project = projectManager.load(projectId); List<Long> vcfIds = project.getItems().stream() .filter(item -> item.getBioDataItem() != null && item.getBioDataItem().getFormat() == BiologicalDataItemFormat.VCF) .map(item -> (item.getBioDataItem()).getId()) .collect(Collectors.toList()); return vcfManager.getFiltersInfo(vcfIds); }  void deleteFromIndexByFileId(final long projectId, List<Pair<FeatureType, Long>> fileIds); Set<String> searchGenesInVcfFilesInProject(long projectId, String gene, List<Long> vcfFileIds); Set<String> searchGenesInVcfFiles(String gene, List<Long> vcfFileIds); List<Chromosome> filterChromosomes(VcfFilterForm filterForm, long projectId); List<Chromosome> filterChromosomes(VcfFilterForm filterForm); IndexSearchResult<VcfIndexEntry> filterVariations(VcfFilterForm filterForm, long projectId); int getTotalPagesCount(VcfFilterForm filterForm); int getTotalPagesCount(VcfFilterForm filterForm, long projectId); List<Group> groupVariations(VcfFilterForm filterForm, long projectId, String groupByField); List<Group> groupVariations(VcfFilterForm filterForm, String groupByField); IndexSearchResult<VcfIndexEntry> filterVariations(VcfFilterForm filterForm); IndexSearchResult searchFeaturesInProject(String featureId, long projectId); IndexSearchResult searchFeaturesByReference(String featureId, long referenceId); VcfFilterInfo loadVcfFilterInfoForProject(long projectId); void buildIndexForFile(FeatureFile featureFile); Set<String> fetchGeneIds(int start, int end, List<GeneFile> geneFiles, Chromosome chromosome); void writeLuceneIndexForFile(final FeatureFile featureFile,
            final List<? extends FeatureIndexEntry> entries,
            VcfFilterInfo vcfFilterInfo); void makeIndexForBedReader(BedFile bedFile, AbstractFeatureReader<NggbBedFeature, LineIterator> reader,
                                      Map<String, Chromosome> chromosomeMap); void makeIndexForVcfReader(VcfFile vcfFile, FeatureReader<VariantContext> reader, List<GeneFile> geneFiles,
                                       Map<String, Chromosome> chromosomeMap, VcfFilterInfo info); void processGeneFile(GeneFile geneFile, final Map<String, Chromosome> chromosomeMap,
            boolean full); void addGeneFeatureToIndex(List<FeatureIndexEntry> allEntries, GeneFeature feature,
                                     Map<String, Chromosome> chromosomeMap);  }