|
i checked the documentation there is no option to add threshold of interaction in the plot_barcode. Is there any method that can decide the threshold for the plot_barcode? |
Replies: 2 comments 4 replies
|
There's no such option, the point of the barcode plot is to show all the individual interactions in every frame. But from the dataframe you can calculate the mean and then apply a threshold yourself, and then make a regular barplot with matplotlib or any other plotting library. In the simplest case that would be something like df = fp.to_dataframe()
dfavg = df.mean()
dfavg = dfavg.loc[dfavg > 0.3].to_frame()
dfavg.plot.bar()(I haven't actually tested that code but it should be a good starting point) |
|
Hello, |
There's no such option, the point of the barcode plot is to show all the individual interactions in every frame.
But from the dataframe you can calculate the mean and then apply a threshold yourself, and then make a regular barplot with matplotlib or any other plotting library.
In the simplest case that would be something like
(I haven't actually tested that code but it should be a good starting point)