-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature requeste for full join of GRanges #68
Comments
Hi there, I'm not sure exactly what a full join would look like? Could you provide a simple example? If it makes sense you are more than welcome to make a pull request. Look at the code for https://github.com/sa-lee/plyranges/blob/master/R/ranges-overlap-joins-outer.R and https://github.com/sa-lee/plyranges/blob/master/R/ranges-overlap-find.R to see how I've constructed |
Thank you for your reply. I'll have a look and try to make a pull request.
The output will be like:
gr2
The full_joined
|
Hi, I was wondering if you've made progress on this? I'd really like to be able to do full joins in plyranges! |
Hi, no sorry! I'm pretty busy with other projects at the moment, but will see if I have time over the next couple of months to implement it. |
No problem! Thanks so much for creating plyranges in the first place. It's an awesome package, I use it all the time. |
I use this function to full_join GRanges, might not fit in everyone's case (or maybe everyone has a different definition full_join).
|
This looks like it's on the right track! Take a look at https://github.com/sa-lee/plyranges/blob/ce998131510d1da7b3c9e47deba5946b5c33ab1d/R/ranges-overlap-joins-outer.R#L55-L86 which provides the template for doing the left outer join. You're basically adding an extra step to pull in the right hand side, i.e. |
Hi @sa-lee , I will have a try. |
At least it is valid in the test case, again, I am not sure if everyone has the same definition of full_join GRanges. |
This is a fantastic package, and it's one of the critical dependencies for my own package in CRAN. Having a full_join function would be good addition, and round out the 'join' operations. The previous function doesn't sort out the metadata right, tacking on .x and .y labels, even if the metadata column name is unique to one group. The other way you could do a full join for objects GR1 and GR2 is as follows: This works once I've essentially pre-figured out which metadata columns I want to keep from each GRanges. Another way would be to add the ability to merge metadata if the column names are the same (i.e. sum, list, paste, etc..), or just add the .x and .y. |
Hi All,
I've been working on combing GRanges from several datasets, and wish to have a function from your package that works similar to the tidyverse
full_join
which includes any extry from at least one Granges object. Also, metadata full_joined.I have written a simple function to use by myself and worked on my dataset (GRanges with meta data). But I found it hard to incorporate to your packages because I think yours works on a range of *Ranges objects. Anyway, I would like to help and share it if anyone is interested to develop such a function.
The text was updated successfully, but these errors were encountered: