Comments (1)
Hi,
in principle the resulting plot is still correct, because the labels of df
are inverted in the next line of the code:
df = data.frame(type = rev(names(table(df))), count = as.vector(table(df)))
Nonetheless, this could certainly be solved in a more intuitive way...
One solution (thanks, Sri!) is to use a GRangesList for the regions:
regionsList = as(regions, "GRangesList") df= findOverlaps(x, regionsList) %>% as.data.frame() %>% table(.)
This df can then either be used for an UpSet plot or further processed with rowSums() %>% table()
into a similar structure as used in the code above:
df = rowSums() %>% table() %>% as.data.frame(.) colnames(df) = c("type", "count")
from bindingsitefinder.
Related Issues (10)
- Error in .subset_by_GenomicRanges(x, i): 'x' must have unique names when subsetting by a GenomicRanges subscript HOT 4
- Problems if not all samples have the same chromosomes HOT 2
- Target gene assignment in vignette: Problem with "_PAR_Y" HOT 1
- Error when extending plots with theme from ggplot
- help with an erro please HOT 11
- Errors related to calculateBsBackground HOT 4
- ! Can't recycle `quantiles` (size 101) to size 0. HOT 2
- Fix version number in devel HOT 1
- mergeCrosslinksDiagnosticsPlot() Description HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bindingsitefinder.