/** * Returns true if the given file appears to be a BCF file. */ public static boolean isBCF(final File file) { return isBCF(file.toPath()); }
/** * Returns true if the given file appears to be a BCF file. */ public static boolean isBCF(final File file) { return isBCF(file.toPath()); }
/** * Checks (via filename checking) that all files appear to be block compressed files. */ private boolean areAllBlockCompressed(final List<File> input) { for (final File f : input) { if (VCFFileReader.isBCF(f) || !AbstractFeatureReader.hasBlockCompressedExtension(f)) { return false; } } return true; }
/** * Checks (via filename checking) that all files appear to be block compressed files. */ private boolean areAllBlockCompressed(final List<File> input) { for (final File f : input) { if (VCFFileReader.isBCF(f) || !AbstractFeatureReader.hasBlockCompressedExtension(f)) { return false; } } return true; }
/** * returns Correct Feature codec for Path depending whether * the name seems to indicate that it's a BCF. * * @param path to vcf/bcf * @return FeatureCodec for input Path */ private static FeatureCodec<VariantContext, ?> getCodecForPath(Path path) { return isBCF(path) ? new BCF2Codec() : new VCFCodec(); }
/** * returns Correct Feature codec for Path depending whether * the name seems to indicate that it's a BCF. * * @param path to vcf/bcf * @return FeatureCodec for input Path */ private static FeatureCodec<VariantContext, ?> getCodecForPath(Path path) { return isBCF(path) ? new BCF2Codec() : new VCFCodec(); }
/** Allows construction of a VCFFileReader with a specified index file. */ public VCFFileReader(final File file, final File indexFile, final boolean requireIndex) { this.reader = AbstractFeatureReader.getFeatureReader( file.getAbsolutePath(), indexFile.getAbsolutePath(), isBCF(file) ? new BCF2Codec() : new VCFCodec(), requireIndex); }
/** Allows construction of a VCFFileReader that will or will not assert the presence of an index as desired. */ public VCFFileReader(final File file, final boolean requireIndex) { this.reader = AbstractFeatureReader.getFeatureReader( file.getAbsolutePath(), isBCF(file) ? new BCF2Codec() : new VCFCodec(), requireIndex); }