title: Using queries in UpSetR
body: <p>I am trying to use the query capabilites in the package <em>UpSetR</em> to highlight certain items depending on one variable.</p>
  
  <p>My dataset <a href="https://www.dropbox.com/s/qjw283d7lm615u1/upset_plot_fixed_freq.csv?dl=0" rel="nofollow noreferrer">Dropbox link</a></p>
  
  <p>I can do a basic plot without any problems:</p>
  
  <pre><code>stress &lt;- read_delim("upset_plot_high_freq.csv", "\t", escape_double = FALSE, trim_ws = TRUE)
  stress_data&lt;-as.data.frame(stress)
      upset(stress_data, sets = c("reg_region","sweep","gene_association","chromatin"),
  
            mainbar.y.label = "Number of TEs", sets.x.label = "Total number of TEs", 
        text.scale = 2, group.by = "degree", order.by="freq")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tMyyW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tMyyW.png" alt="Basic upset plot for my (simplified) dataset"></a></p>
  
  <p>However, when I try to do some basic queries I get all sort of errors. For example in a basic query where I ask all the elements with a given value in a variable to be painted blue I get the following error:</p>
  
  <pre><code>myfunction &lt;- function(row, min){
    newData &lt;- (row["chip_num"] &gt; min)
  }
  
  upset(stress_data, sets = c("reg_region","sweep","gene_association","chromatin"),
        queries = list(query = myfunction, params = list(0), active = TRUE), 
        mainbar.y.label = "Number of TEs", sets.x.label = "Total number of TEs", 
        text.scale = 2, group.by = "degree", order.by="freq")
  </code></pre>
  
  <blockquote>
    <p>Error in queries[[i]]$color : object of type 'closure' is not
    subsettable</p>
  </blockquote>