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
You can directly filter the pandas DataFrame output by fp.to_dataframe and input that to the Barcode class (which is run under the hood when calling fp.plot_barcode).
Here's an example:
fromprolif.plotting.barcodeimportBarcode# example: filter interaction that occur in less than 30% of framesthreshold=0.3df=fp.to_dataframe()
# only keep interactions occurring more frequently than the thresholdabove_threshold_mask=df.mean() >thresholddf_filtered=df.loc[:, above_threshold_mask]
# plotBarcode(df_filtered).display()
Feel free to reopen the issue if you have another related question
how can i filter the results of interactions based on their proportion to enhance the plot?
The text was updated successfully, but these errors were encountered: