Specifications

Functions:

is_chrom_dtype(chrom_dtype)

Returns True if dtype is any of the allowed bioframe chrom dtypes, False otherwise.

is_chrom_dtype(chrom_dtype)[source]

Returns True if dtype is any of the allowed bioframe chrom dtypes, False otherwise.

Unexposed functions:

specs._verify_column_dtypes(cols=None, return_as_bool=False)

Checks that dataframe df has chrom, start, end columns with valid dtypes. Raises TypeErrors if cols have invalid dtypes.

Parameters:
  • df (pandas.DataFrame)

  • cols ((str, str, str) or None) – The names of columns containing the chromosome, start and end of the genomic intervals, provided separately for each set. The default values are ‘chrom’, ‘start’, ‘end’.

  • return_as_bool (bool) – If true, returns as a boolean instead of raising errors. Default False.

specs._verify_columns(colnames, unique_cols=False, return_as_bool=False)

Raises ValueError if columns with colnames are not present in dataframe df.

Parameters:
  • df (pandas.DataFrame)

  • colnames (list of column names)

  • return_as_bool (bool) – If True, returns as a boolean instead of raising errors. Default False.

specs._get_default_colnames()

Returns default column names.

These defaults be updated with update_default_colnames().

Returns:

colnames

Return type:

triplet (str, str, str)