This is a test version of Biostars. For the public version, visit https://www.biostars.org.
"Object of type 'closure' is not subsettable" Error

So I'm performing an ATAC-seq analysis using ArchR software and have had the same error persisting when running the following:

p <- ggPoint( # ggPoint: a ggplot-based dot plot wrapper function
  x = df[,1],
  y = df[,2], 
  colorDensity = TRUE,
  continuousSet = "sambaNight", 
  xlabel = "Log10UniqueFragments", 
  ylabel = "TSS Enrichment", 
  xlim = c(log10(500), quantile(df[,1], probs = 0.99)),
  ylim = c(0, quantile(df[,2], probs = 0.99))

  ) + geom_hline(yintercept = 4, lty = "dashed") + geom_vline(xintercept = 3, lty = "dashed")

Error in df[, 1]: object of type 'closure' is not subsettable

I have also tried switching out the brackets for parantheses but this does not fix the error. Any suggestions?

atac-seq scatac-seq archr

what happens when you type just df[,1]? Do you get the same error? If yes, can you also provide the output of str(df)?

1 answer

Perhaps define x and y as xinput <- df[,1] from your dataframe outside of the ggpoint call , then use xinput within the command ?

Log in to answer this question.