You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as silly as it might sound - we might benefit from a tiny function that checks if 2 bedframes are identical ...
it turns out that pandas.DataFrame.equals method is rather strict, and not only it requires a pair of dataframes to have identical values (obviously), identical shapes etc, - but it also requires them to have identical dtypes - which is a bit of a pain, as some of the bioframe methods alter types of start, end columns from int32/64 to pandas.Int64Dtype
so we could have something like that the library:
bioframe.is_equal_OR_equal_intervals_OR_something_like_that(
df1,
df2,
check_dtypes=False,
compare_coordinates_only=True, # compare chrom,start,end and ignore other columns ...cols1=None,
cols2=Nonecommon_dtypes= {?}
# what else ?
)
where we can make sure a pair of frames with "acceptable" differences (different names of chrom,start,end, presence of extra columns, dtypes differences, etc), can be recognized as "identical"
The text was updated successfully, but these errors were encountered:
as silly as it might sound - we might benefit from a tiny function that checks if 2 bedframes are identical ...
it turns out that
pandas.DataFrame.equals
method is rather strict, and not only it requires a pair of dataframes to have identical values (obviously), identical shapes etc, - but it also requires them to have identicaldtypes
- which is a bit of a pain, as some of the bioframe methods alter types ofstart, end
columns fromint32/64
topandas.Int64Dtype
so we could have something like that the library:
where we can make sure a pair of frames with "acceptable" differences (different names of
chrom,start,end
, presence of extra columns, dtypes differences, etc), can be recognized as "identical"The text was updated successfully, but these errors were encountered: