Vcf

Constructor

Vcf(df_svpos, df_filters, odict_df_info, ...)

Relational database-like object containing SV position dataframes, FILTER dataframe, INFO dataframes, FORMAT dataframe, and HEADER dataframes.

Attributes

Vcf.sv_count

Return number of SV records.

Vcf.table_list

Return a list of names of all tables in the object.

Vcf.ids

Return all SV ids as list.

Annotation

Vcf.annotate_bed(bed, annotation[, suffix])

Annotate SV breakpoints using Bed class object.

Vcf.get_microhomology(fasta[, max_homlen])

Infer microhomology length and sequence in each breakpoint.

Conversion

Vcf.copy()

Return copy of the instance.

Vcf.to_bedpe_like([custom_infonames])

Return a DataFrame in bedpe-like format.

Vcf.as_bedpe()

Convert Vcf object into Bedpe object.

Vcf.to_vcf_like()

Return a vcf-formatted DataFrame.

Vcf.breakend2breakpoint()

Converts a Vcf object into a breakpoint-based Vcf object by integrating the paired breakends (BND) and infering their SVTYPE.

Export

Vcf.to_bedpe(file_or_buf[, ...])

to_bedpe_like(file_or_buf, custom_infonames=[], add_filters, add_formats, confidence_intervals: bool=False) Return a BEDPE file.

Vcf.to_vcf(path_or_buf)

Return a vcf-formatted String.

Filtering

Vcf.filter(ls_query, query_logic)

Filter Vcf object by the list of queries.

Vcf.filter_by_id(arrlike_id)

Filter Vcf object according to the list of SV ids.

Managing Tables

Vcf.add_info_table(table_name, df)

Add a new INFO table to self.

Vcf.append_infos(base_df, ls_tablenames[, ...])

Append INFO tables to the right of the base_df, based on the SV id columns.

Vcf.append_formats(base_df[, left_on])

Append formats to the right of the base_df, based on the SV id columns.

Vcf.append_filters(base_df[, left_on])

Append filters to the right of the base_df, based on the SV id columns.

Vcf.get_table(table_name)

Return a table specified in the argument as pandas DataFrame object.

Vcf.remove_info_table(table_name)

Remove an INFO table from self.

Vcf.rename_info(table_name, value[, safety_mode])

Rename INFO name of this object.

Vcf.replace_table(table_name, table)

Replace existing table into new table.

Vcf.set_value_for_info_by_id(table_name, ...)

Set value to the specified info table by sv_id.

Merging

Vcf.merge(ls_vcf, ls_caller_names, threshold)

Return a merged or integrated vcf object from mulitple caller's bedpe objects in ls_bedpe

Vcf.integrate(merged_vcf, priority)

Return an integrated Vcf object

Representation

Vcf.view(custom_infonames, return_as_dataframe)

Quick view function of the Vcf object.

Signature_analysis

Vcf.classify_manual_svtype(definitions, ...)

Classify SV records by user-defined criteria.

Vcf.get_feature_count_as_series(feature, ...)

Return counts of unique values as a pd.Series for the INFO specified in the "feature" argument.

SV ID/SV records

Vcf.replace_svid(to_replace, value)

Renamed specified SV ID.

Vcf.drop_by_id(svid)

Remove SV records specified in "svid" argument.