Guest User

Untitled

a guest
Nov 20th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. win_size<-c(15000, 30000, 50000, 100000)
  2.  
  3. for (i in 1:length(win_size)){
  4. windows<-sapply(snp_ids$pos, function(x) (ceiling(x/win_size[i])))
  5. snp_ids$window<-as.numeric(paste(snp_ids$chr, windows, sep="."))
  6. }
  7.  
  8. snp_id chr pos window_15000 window_30000
  9. Chr01__912 1 912 1.1 1.1
  10. Chr01__944 1 944 1.1 1.1
  11. Chr01__1107 1 1107 1.1 1.1
  12. Chr01__1118 1 1118 1.1 1.1
  13. Chr01__1146 1 1146 1.1 1.2
  14. Chr01__1160 1 1160 1.1 1.2
Add Comment
Please, Sign In to add comment