@Override protected IntervalList getIntervalListInternal(final File vcf, final boolean includeFiltered) { return VCFFileReader.fromVcf(vcf, includeFiltered); } },
@Override protected IntervalList getIntervalListInternal(final File vcf, final boolean includeFiltered) { return VCFFileReader.fromVcf(vcf, includeFiltered); } },
/** * Converts a vcf to an IntervalList. The name field of the IntervalList is taken from the ID field of the variant, if it exists. If not, * creates a name of the format interval-n where n is a running number that increments only on un-named intervals. * Will use a "END" tag in the INFO field as the end of the interval (if exists). * * @param vcf the vcfReader to be used for the conversion * @return an IntervalList constructed from input vcf * * @deprecated since July 2018 since use {@link #toIntervalList(VCFFileReader)} instead */ @Deprecated public static IntervalList fromVcf(final VCFFileReader vcf) { return fromVcf(vcf, false); }
/** * Converts a vcf to an IntervalList. The name field of the IntervalList is taken from the ID field of the variant, if it exists. If not, * creates a name of the format interval-n where n is a running number that increments only on un-named intervals. * Will use a "END" tag in the INFO field as the end of the interval (if exists). * * @param vcf the vcfReader to be used for the conversion * @return an IntervalList constructed from input vcf * * @deprecated since July 2018 since use {@link #toIntervalList(VCFFileReader)} instead */ @Deprecated public static IntervalList fromVcf(final VCFFileReader vcf) { return fromVcf(vcf, false); }
/** * Parse a VCF file and convert to an IntervalList The name field of the IntervalList is taken from the ID field of the variant, if it exists. if not, * creates a name of the format interval-n where n is a running number that increments only on un-named intervals * @param file * @return */ public static IntervalList fromVcf(final File file){ final VCFFileReader vcfFileReader = new VCFFileReader(file, false); final IntervalList intervalList = fromVcf(vcfFileReader); vcfFileReader.close(); return intervalList; }
@Override protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsWritable(OUTPUT); final IntervalList intervalList = VCFFileReader.fromVcf(INPUT, INCLUDE_FILTERED); // Sort and write the output intervalList.uniqued().write(OUTPUT); return 0; } }
@Override protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsWritable(OUTPUT); final IntervalList intervalList = VCFFileReader.fromVcf(INPUT, INCLUDE_FILTERED); // Sort and write the output intervalList.uniqued().write(OUTPUT); return 0; } }