Subsetting a data by a regions from BED file
Hello
I have a big data like
> head(r@data)
Tumor_Sample_Barcode Chromosome Start_Position End_Position Reference_Allele
1: LP6005334-DNA_H01 chr1 89616151 89616151 -
2: LP6005334-DNA_H01 chr6 51909815 51909815 A
3: LP6005334-DNA_H01 chr16 20556547 20556547 -
4: LP6005334-DNA_H01 chr17 66992092 66992092 -
5: LP6005334-DNA_H01 chr20 13251339 13251339 -
6: LP6005334-DNA_H01 chr20 35929770 35929771
> dim(r@data)
[1] 6461 141
>
I also have a bed file like
1 11866 12229
1 12610 12723
1 13218 14411
1 30363 30505
1 34551 35176
How I can subset my first data to this BED regions in R?
• 1,309 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello A!
We believe that this post does not fit the main topic of this site.
https://bioinformatics.stackexchange.com/questions/12973/intersecting-a-data-frame-based-on-the-multiple-columns
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
The linked question is yours, biostars is not a code writing service as issued to you literally a dozen times before. Again, no
dput()example to provide users with example data, and zero effort shown, therefore this question will be closed.Sorry @ATpoint
There are a lot of moderators here but only a few of them face this harsh with OPs
Please help me to understand that fact what trouble my questions may make for you or the other users here?
I ask my question here, some people read that and if they want they put some effort to help again
only and onlyif they want absolutely voluntearilyWhat happen if somebody who does not know how to code ask people to write code if they have time?
I really can not understand the way your are acting as a moderator and this is not the first unfair and harsh reaction I see from your side
Thank you
Search for "merge by range overlap", related SO post: https://stackoverflow.com/q/24480031/680068
And see my example answer here: A: Subsetting large list of SNPs with R
Thank you so much
I used your example answer without error