private ReferenceOrderedView getReferenceOrderedView( final ActiveRegionWalker<M, T> walker, final LocusShardDataProvider dataProvider, final LocusView locusView) { if (WalkerManager.getWalkerDataSource(walker) != DataSource.REFERENCE_ORDERED_DATA) return new ManagingReferenceOrderedView(dataProvider); else return (RodLocusView) locusView; }
/** * Gets the best view of loci for this walker given the available data. * * @param walker walker to interrogate. * @param dataProvider Data which which to drive the locus view. * @return A view of the locus data, where one iteration of the locus view maps to one iteration * of the traversal. */ private LocusView getLocusView( final Walker<M, T> walker, final LocusShardDataProvider dataProvider) { final DataSource dataSource = WalkerManager.getWalkerDataSource(walker); if (dataSource == DataSource.READS) return new CoveredLocusView(dataProvider); else if (dataSource == DataSource .REFERENCE) // || ! GenomeAnalysisEngine.instance.getArguments().enableRodWalkers ) return new AllLocusView(dataProvider); else if (dataSource == DataSource.REFERENCE_ORDERED_DATA) return new RodLocusView(dataProvider); else throw new UnsupportedOperationException("Unsupported traversal type: " + dataSource); }