Sunday 15 May 2011

r - Extracting Marker - Every 5 cM -



r - Extracting Marker - Every 5 cM -

i have next info set. want extract marker every 5 cm (fourth column distance in cm) e.g 0, 5, 10, 15 each chromosome i.e. 1 - 12. each chromosome has marker @ 0 100 or cm distance. need take marker on each chromosomes taking. please guide me how can it.

e.g info format

group snp marker chromosome mbp cm mutual solcap_snp_sl_15058 1 0.05 0 mutual solcap_snp_sl_15051 1 0.3 2.9 mutual solcap_snp_sl_15050 1 0.3 2.9 mutual solcap_snp_sl_15049 1 0.3 5.0 mutual cl004303-0524 1 0.31 2.9 mutual solcap_snp_sl_24809 1 0.32 10 - - . . . - . . . mutual solcap_snp_sl_19393 12 64.48 92.8 mutual sgn-u317539_snp 12 64.78 93.7 mutual solcap_snp_sl_54088 12 64.82 94 mutual solcap_snp_sl_31405 12 4.91 95 mutual sgn-u567105_snp715_solcap_snp_sl_31389 12 64.99 97.2 mutual cl009067-0206 12 65.14 99.1 mutual solcap_snp_sl_31353 12 65.15 99.1

like marker @ 0 @ 5 10 same each chromsomes if possible.

group snp marker chromosome mbp cm mutual solcap_snp_sl_15058 1 0.05 0 mutual solcap_snp_sl_15049 1 0.3 5.0 mutual solcap_snp_sl_24809 1 0.32 10

dat[dat$cm %in% seq(0, max(dat$cm), 5), ]

will trick.

r dataset stat

No comments:

Post a Comment