Guest User

Untitled

a guest
Dec 18th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #find overlap between some SNP locations and a list of gene locations
  2.  
  3. #test SNPs
  4.  
  5. #df = snps
  6. #chr start stop
  7. #1 1232 1232
  8. #2 12444 12444
  9.  
  10. #gene positions
  11. #df =genes
  12. #chr start stop
  13. #1 100 2000
  14. #2 14000 130000
  15.  
  16. #define fuzzy flank size
  17. flank.region <- 20000
  18. 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