Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #find overlap between some SNP locations and a list of gene locations
- #test SNPs
- #df = snps
- #chr start stop
- #1 1232 1232
- #2 12444 12444
- #gene positions
- #df =genes
- #chr start stop
- #1 100 2000
- #2 14000 130000
- #define fuzzy flank size
- flank.region <- 20000
- inner_join(genes, snps, by="chr") %>% filter(start.y >= start.x-flank.region & stop.y <= stop.x+flank.region)
Add Comment
Please, Sign In to add comment