/** * Returns the SAMSequenceDictionary from the provided VCF file. */ public static SAMSequenceDictionary getSequenceDictionary(final Path path) { return new VCFFileReader(path, false).getFileHeader().getSequenceDictionary(); }
public VCFRecordCodec(final VCFHeader header, final boolean allowMissingFieldsInHeader) { this.vcfEncoder = new VCFEncoder(header, allowMissingFieldsInHeader, false); // Explicitly set the version because it's not available in the header itself. this.vcfDecoder.setVCFHeader(header, VCFHeaderVersion.VCF4_2); }
/** * Add / replace the contig header lines in the VCFHeader with the in the reference file and master reference dictionary * * @param oldHeader the header to update * @param referenceFile the file path to the reference sequence used to generate this vcf * @param refDict the SAM formatted reference sequence dictionary */ public static VCFHeader withUpdatedContigs(final VCFHeader oldHeader, final File referenceFile, final SAMSequenceDictionary refDict) { return new VCFHeader(withUpdatedContigsAsLines(oldHeader.getMetaDataInInputOrder(), referenceFile, refDict), oldHeader.getGenotypeSamples()); }
/** Add POPMAX name */ private void addPopmaxHeader(VCFHeader header, String prefix, String idInfix, String noteInfix) { VCFInfoHeaderLine line = new VCFInfoHeaderLine(prefix + idInfix + "POPMAX", VCFHeaderLineCount.A, VCFHeaderLineType.String, "Population with the max AF" + noteInfix); header.addMetaDataLine(line); }
private static VCFHeader createTestHeader() { final VCFHeader header = new VCFHeader(); header.addMetaDataLine(new VCFInfoHeaderLine(RANDOM_ATTRIBUTE, 1, VCFHeaderLineType.Character, "random string")); return header; }
@Override public VCFRecordCodec clone() { return new VCFRecordCodec(this.vcfEncoder.getVCFHeader(), this.vcfEncoder.getAllowMissingFieldsInHeader()); } }
@Override public VCFRecordCodec clone() { return new VCFRecordCodec(this.vcfEncoder.getVCFHeader()); } }
@Override SAMSequenceDictionary extractDictionary(Path vcf) { try (VCFFileReader vcfPathReader = new VCFFileReader(vcf, false)){ return vcfPathReader.getFileHeader().getSequenceDictionary(); } } },
/** * Add / replace the contig header lines in the VCFHeader with the in the reference file and master reference dictionary * * @param oldHeader the header to update * @param referenceFile the file path to the reference sequence used to generate this vcf * @param refDict the SAM formatted reference sequence dictionary */ public static VCFHeader withUpdatedContigs(final VCFHeader oldHeader, final File referenceFile, final SAMSequenceDictionary refDict) { return new VCFHeader(withUpdatedContigsAsLines(oldHeader.getMetaDataInInputOrder(), referenceFile, refDict), oldHeader.getGenotypeSamples()); }
/** Add POPMAX name */ private void addPopmaxHeader(VCFHeader header, String prefix, String idInfix, String noteInfix) { VCFInfoHeaderLine line = new VCFInfoHeaderLine(prefix + idInfix + "POPMAX", VCFHeaderLineCount.A, VCFHeaderLineType.String, "Population with the max AF" + noteInfix); header.addMetaDataLine(line); }
public VCFRecordCodec(final VCFHeader header) { this.vcfEncoder = new VCFEncoder(header, false); // Explicitly set the version because it's not available in the header itself. this.vcfDecoder.setVCFHeader(header, VCFHeaderVersion.VCF4_1); }
@Override public VCFRecordCodec clone() { return new VCFRecordCodec(this.vcfEncoder.getVCFHeader(), this.vcfEncoder.getAllowMissingFieldsInHeader()); } }
/** * Returns the SAMSequenceDictionary from the provided VCF file. */ public static SAMSequenceDictionary getSequenceDictionary(final Path path) { return new VCFFileReader(path, false).getFileHeader().getSequenceDictionary(); }
/** * Add / replace the contig header lines in the VCFHeader with the in the reference file and master reference dictionary * * @param oldHeader the header to update * @param referenceFile the file path to the reference sequence used to generate this vcf * @param refDict the SAM formatted reference sequence dictionary */ public static VCFHeader withUpdatedContigs(final VCFHeader oldHeader, final File referenceFile, final SAMSequenceDictionary refDict) { return new VCFHeader(withUpdatedContigsAsLines(oldHeader.getMetaDataInInputOrder(), referenceFile, refDict), oldHeader.getGenotypeSamples()); }
/** Add header for highest allele frequency */ private void addBestAFHeader(VCFHeader header, String prefix, String idInfix, String noteInfix) { VCFInfoHeaderLine line = new VCFInfoHeaderLine(prefix + idInfix + "AF_POPMAX", VCFHeaderLineCount.A, VCFHeaderLineType.Float, "Highest allele frequency seen in any population" + noteInfix); header.addMetaDataLine(line); }
public VCFRecordCodec(final VCFHeader header, final boolean allowMissingFieldsInHeader) { this.vcfEncoder = new VCFEncoder(header, allowMissingFieldsInHeader, false); // Explicitly set the version because it's not available in the header itself. this.vcfDecoder.setVCFHeader(header, VCFHeaderVersion.VCF4_2); }
/** * Returns the SAMSequenceDictionary from the provided VCF file. */ public static SAMSequenceDictionary getSequenceDictionary(final File file) { try (final VCFFileReader vcfFileReader = new VCFFileReader(file, false)) { return vcfFileReader.getFileHeader().getSequenceDictionary(); } }
/** Add header for allele count with highest frequency */ private void addBestACHeader(VCFHeader header, String prefix, String idInfix, String noteInfix) { VCFInfoHeaderLine line = new VCFInfoHeaderLine(prefix + idInfix + "AC_POPMAX", VCFHeaderLineCount.A, VCFHeaderLineType.Integer, "Allele count for population with highest frequency" + noteInfix); header.addMetaDataLine(line); }
@Override SAMSequenceDictionary extractDictionary(Path vcf) { try (VCFFileReader vcfPathReader = new VCFFileReader(vcf, false)){ return vcfPathReader.getFileHeader().getSequenceDictionary(); } } },
/** * Returns the SAMSequenceDictionary from the provided VCF file. */ public static SAMSequenceDictionary getSequenceDictionary(final File file) { try (final VCFFileReader vcfFileReader = new VCFFileReader(file, false)) { return vcfFileReader.getFileHeader().getSequenceDictionary(); } }