private final String getDictionaryString() throws IOException { return getDictionaryString((Integer) decoder.decodeTypedValue()); }
private final String getDictionaryString() throws IOException { return getDictionaryString((Integer) decoder.decodeTypedValue()); }
@Ensures("result != null") private final String getDictionaryString() throws IOException { return getDictionaryString((Integer) decoder.decodeTypedValue()); }
/** * Decode the filter field of this BCF2 file and store the result in the builder * @param builder */ private void decodeFilter( final VariantContextBuilder builder ) throws IOException { final Object value = decoder.decodeTypedValue(); if ( value == null ) builder.unfiltered(); else { if ( value instanceof Integer ) { // fast path for single integer result final String filterString = getDictionaryString((Integer)value); if ( VCFConstants.PASSES_FILTERS_v4.equals(filterString)) builder.passFilters(); else builder.filter(filterString); } else { for ( final int offset : (List<Integer>)value ) builder.filter(getDictionaryString(offset)); } } }
/** * Decode the filter field of this BCF2 file and store the result in the builder * @param builder */ private void decodeFilter( final VariantContextBuilder builder ) throws IOException { final Object value = decoder.decodeTypedValue(); if ( value == null ) builder.unfiltered(); else { if ( value instanceof Integer ) { // fast path for single integer result final String filterString = getDictionaryString((Integer)value); if ( VCFConstants.PASSES_FILTERS_v4.equals(filterString)) builder.passFilters(); else builder.filter(filterString); } else { for ( final int offset : (List<Integer>)value ) builder.filter(getDictionaryString(offset)); } } }
/** * Decode the filter field of this BCF2 file and store the result in the builder * @param builder */ private void decodeFilter( final VariantContextBuilder builder ) throws IOException { final Object value = decoder.decodeTypedValue(); if ( value == null ) builder.unfiltered(); else { if ( value instanceof Integer ) { // fast path for single integer result final String filterString = getDictionaryString((Integer)value); if ( VCFConstants.PASSES_FILTERS_v4.equals(filterString)) builder.passFilters(); else builder.filter(filterString); } else { for ( final int offset : (List<Integer>)value ) builder.filter(getDictionaryString(offset)); } } }
/** * Loop over the info field key / value pairs in this BCF2 file and decode them into the builder * * @param builder * @param numInfoFields */ private void decodeInfo( final VariantContextBuilder builder, final int numInfoFields ) throws IOException { if ( numInfoFields == 0 ) // fast path, don't bother doing any work if there are no fields return; final Map<String, Object> infoFieldEntries = new HashMap<String, Object>(numInfoFields); for ( int i = 0; i < numInfoFields; i++ ) { final String key = getDictionaryString(); Object value = decoder.decodeTypedValue(); final VCFCompoundHeaderLine metaData = VariantContextUtils.getMetaDataForField(header, key); if ( metaData.getType() == VCFHeaderLineType.Flag ) value = true; // special case for flags infoFieldEntries.put(key, value); } builder.attributes(infoFieldEntries); }
/** * Loop over the info field key / value pairs in this BCF2 file and decode them into the builder * * @param builder * @param numInfoFields */ private void decodeInfo( final VariantContextBuilder builder, final int numInfoFields ) throws IOException { if ( numInfoFields == 0 ) // fast path, don't bother doing any work if there are no fields return; final Map<String, Object> infoFieldEntries = new HashMap<String, Object>(numInfoFields); for ( int i = 0; i < numInfoFields; i++ ) { final String key = getDictionaryString(); Object value = decoder.decodeTypedValue(); final VCFCompoundHeaderLine metaData = VariantContextUtils.getMetaDataForField(header, key); if ( metaData.getType() == VCFHeaderLineType.Flag ) value = true; // special case for flags infoFieldEntries.put(key, value); } builder.attributes(infoFieldEntries); }
/** * Loop over the info field key / value pairs in this BCF2 file and decode them into the builder * * @param builder * @param numInfoFields */ @Requires("numInfoFields >= 0") private void decodeInfo( final VariantContextBuilder builder, final int numInfoFields ) throws IOException { if ( numInfoFields == 0 ) // fast path, don't bother doing any work if there are no fields return; final Map<String, Object> infoFieldEntries = new HashMap<String, Object>(numInfoFields); for ( int i = 0; i < numInfoFields; i++ ) { final String key = getDictionaryString(); Object value = decoder.decodeTypedValue(); final VCFCompoundHeaderLine metaData = VariantContextUtils.getMetaDataForField(header, key); if ( metaData.getType() == VCFHeaderLineType.Flag ) value = true; // special case for flags infoFieldEntries.put(key, value); } builder.attributes(infoFieldEntries); }
final String field = codec.getDictionaryString(offset);
final String field = codec.getDictionaryString(offset);
final String field = codec.getDictionaryString(offset);