arcfish.tl.signal_overlap#

arcfish.tl.signal_overlap(test_df: DataFrame | str, true_df: DataFrame | str, offset: float = 0) DataFrame#

For each locus in test_df, return 1 if the locus is also present in true_df; return 0 if the locus is not present in true_df. If offset is not 0, overlap is defined as within offset away from each other.

Parameters:
  • test_df (pd.DataFrame | str) – If a DataFrame, must has “c1”, “s1”, “e1” as column names. If a str, will read from the file named test_df. The file is delimited by tab and either has the column names listed above or has no column names.

  • true_df (pd.DataFrame | str) – Same format as test_df.

  • offset (float, optional) – How to define overlapped intervals, by default 0.

Returns:

Same format and length as test_df, with an additional overlapped column.

Return type:

pd.DataFrame