def _get_vcf_breakends(hydra_file, genome_2bit, options=None):
    """Parse BEDPE input, yielding VCF ready breakends.
    """
    if options is None: options = {}
    for features in group_hydra_breakends(hydra_parser(hydra_file, options)):
        if len(features) == 1 and is_deletion(features[0], options):
            yield build_vcf_deletion(features[0], genome_2bit)
        elif len(features) == 1 and is_tandem_dup(features[0], options):
            yield build_tandem_deletion(features[0], genome_2bit)
        elif len(features) == 2 and is_inversion(*features):
            yield build_vcf_inversion(features[0], features[1], genome_2bit)
        elif len(features) == 2 and is_translocation(*features):
            info = get_translocation_info(features[0], features[1])
            for feature in features:
                for brend in build_vcf_parts(feature, genome_2bit, info):
                    yield brend
        else:
            for feature in features:
                for brend in build_vcf_parts(feature, genome_2bit):
                    yield brend
def _get_vcf_breakends ( hydra_file , genome_2bit , options = None ) : if options is None : options = { } for features in group_hydra_breakends ( hydra_parser ( hydra_file , options ) ) : if len ( features ) == 1 and is_deletion ( features [ 0 ] , options ) : yield build_vcf_deletion ( features [ 0 ] , genome_2bit ) elif len ( features ) == 1 and is_tandem_dup ( features [ 0 ] , options ) : yield build_tandem_deletion ( features [ 0 ] , genome_2bit ) elif len ( features ) == 2 and is_inversion ( * features ) : yield build_vcf_inversion ( features [ 0 ] , features [ 1 ] , genome_2bit ) elif len ( features ) == 2 and is_translocation ( * features ) : info = get_translocation_info ( features [ 0 ] , features [ 1 ] ) for feature in features : for brend in build_vcf_parts ( feature , genome_2bit , info ) : yield brend else : for feature in features : for brend in build_vcf_parts ( feature , genome_2bit ) : yield brend
Parse BEDPE input, yielding VCF ready breakends.