private void parseStructuralVariationAttributes(String key, String value) {
        if (key == null || value == null) {
            return;
        }
        switch (key) {
            case SVINSSEQ_INFO:
                // Seen DELETIONS with this field set. Makes no sense
                if (VariantType.INSERTION.equals(type)) {
                    // SVINSSEQ contains the sequence inserted AFTER the reference.
                    // To represent correctly the alternate, given that reference, we need to add the reference as allele context
                    // If the variant is normalized, the alleles will be trimmed, removing this "context"
                    if (alternates.size() > 1) {
                        throw new IllegalArgumentException("Found SVINSSEQ in a multi allelic variant!");
                    } else {
                        setCall(start + ":" + reference + ":" + alternates.get(0) + ":" + 0);
                        setAlternate(reference + value);
                    }
                }
                break;
            case LEFT_SVINSSEQ_INFO:
                // Seen DELETIONS with this field set. Makes no sense
                if (VariantType.INSERTION.equals(type)) {
                    sv.setLeftSvInsSeq(value);
                }
                break;
            case RIGHT_SVINSSEQ_INFO:
                // Seen DELETIONS with this field set. Makes no sense
                if (VariantType.INSERTION.equals(type)) {
                    sv.setRightSvInsSeq(value);
                }
                break;
            case CIPOS_INFO:
                String[] parts = value.split(",");
                sv.setCiStartLeft(start + Integer.parseInt(parts[0]));
                sv.setCiStartRight(start + Integer.parseInt(parts[1]));
                break;
            case CIEND_INFO:
                parts = value.split(",");
                sv.setCiEndLeft(end + Integer.parseInt(parts[0]));
                sv.setCiEndRight(end + Integer.parseInt(parts[1]));
                break;
        }

    }
private void parseStructuralVariationAttributes ( String key , String value ) { if ( key == null || value == null ) { return ; } switch ( key ) { case SVINSSEQ_INFO : if ( VariantType . INSERTION . equals ( type ) ) { if ( alternates . size ( ) > 1 ) { throw new IllegalArgumentException ( "Found SVINSSEQ in a multi allelic variant!" ) ; } else { setCall ( start + ":" + reference + ":" + alternates . get ( 0 ) + ":" + 0 ) ; setAlternate ( reference + value ) ; } } break ; case LEFT_SVINSSEQ_INFO : if ( VariantType . INSERTION . equals ( type ) ) { sv . setLeftSvInsSeq ( value ) ; } break ; case RIGHT_SVINSSEQ_INFO : if ( VariantType . INSERTION . equals ( type ) ) { sv . setRightSvInsSeq ( value ) ; } break ; case CIPOS_INFO : String [ ] parts = value . split ( "," ) ; sv . setCiStartLeft ( start + Integer . parseInt ( parts [ 0 ] ) ) ; sv . setCiStartRight ( start + Integer . parseInt ( parts [ 1 ] ) ) ; break ; case CIEND_INFO : parts = value . split ( "," ) ; sv . setCiEndLeft ( end + Integer . parseInt ( parts [ 0 ] ) ) ; sv . setCiEndRight ( end + Integer . parseInt ( parts [ 1 ] ) ) ; break ; } }
Be aware! this method may change the main alternate
@param key
@param value