Weeks-UNC / RNAvigate

Very flexible tools for plotting and analyzing all kinds of RNA structure data
MIT License
10 stars 0 forks source link

Pairprob base coloring #19

Closed bmunn99 closed 1 year ago

bmunn99 commented 1 year ago

Is there a way to filter the interactions = 'pairprob' to display only probabilities > 0.5? Or any sort of filter for that?

Psirving commented 1 year ago

Yes there is! Add the interactions_filter argument to your plotting function.

rnav.plot_arcs(
    samples=your_sample_list,
    interactions='pairprob',
    interactions_filter={'Probability_ge': 0.5}
)

"Probability" refers to the dataframe column name. "ge" here means "greater than or equal to". Other operators you can use here are "gt" (greater than), "eq" (equal to), "lt" (less than), "le" (less or equal to), "ne" (not equal to).