viola.MultiBedpe
- class MultiBedpe(ls_bedpe: Optional[List[Bedpe]] = None, ls_patient_names: Optional[List[str]] = None, direct_tables: Optional[List[DataFrame]] = None)
A database-like object that contains information of multiple BEDPE files. In this class, main keys in most tables are “global id” instead of using “SV id” from SV callers. “global id” is unique ID of all the SV record across all the samples.
- __init__(ls_bedpe: Optional[List[Bedpe]] = None, ls_patient_names: Optional[List[str]] = None, direct_tables: Optional[List[DataFrame]] = None)
Methods
__init__([ls_bedpe, ls_patient_names, ...])add_info_table(table_name, df)Add a new INFO table to self.
annotate_bed(bed, annotation[, suffix])Annotate SV breakpoints using Bed class object.
append_infos(base_df, ls_tablenames[, left_on])Append INFO tables to the right of the base_df, based on the SV id columns.
calculate_info(operation, name)Calculate values of INFO tables according to the 'operation' argument and add a new INFO table as the result.
change_repr_config(key, value)classify_manual_svtype(definitions, ...[, ...])Classify SV records by user-defined criteria.
copy()Return copy of the instance
filter(ls_query, query_logic)Filter Bedpe object by the list of queries.
filter_by_id(arrlike_id)Filter MultiBedpe object according to the list of SV ids.
get_feature_count_as_data_frame([feature, ...])get_feature_count_as_series(feature, ls_order)Return counts of unique values as a pd.Series for the INFO specified in the "feature" argument.
get_ids()Return all SV ids as the set type.
get_info(info_name)Return a info specified in the argument as pandas DataFrame object.
get_microhomology(fasta[, max_homlen])Infer microhomology length and sequence in each breakpoint.
get_table(table_name)Return a table specified in the argument as pandas DataFrame object.
is_reciprocal()merge(ls_bedpe, ls_caller_names, threshold)Return a merged bedpe object from mulitple caller's bedpe objects in ls_bedpe
remove_info_table(table_name)Remove an INFO table from self.
replace_table(table_name, table)Replace existing table into new table.
set_value_for_info_by_id(table_name, sv_id, ...)Set value to the specified info table by sv_id.
to_bedpe(path_or_buf[, custom_infonames, ...])to_beddpe(path_or_buf, custom_infonames, confidence_intervals) Return a BEDPE file.
to_bedpe_like([custom_infonames, ...])Return a DataFrame in bedpe-like format.
view(custom_infonames, return_as_dataframe)Quick view function of the Vcf object.
Attributes
contigsReturn a list of contigs(chromosomes) included in the object.
Return all SV ids as list.
idxpatient_nameReturn the name of the patient.
repr_configReturn current configuration of __repr__() function.
Return number of SV records.
Return a list of names of all tables in the object.