Entering edit mode
MLSC MANIPAL
▴
120
@mlsc-manipal-4543
Last seen 10.0 years ago
Hi all,
I would like to get genotype information from HapMap project. Hence, I
am
using snpMatrix's read.Hapmap.data, but when i try to get genotype
information, it converts to numerical code form. hence can somebody
please
let me know how to get genotype information as it is in the HapMap
file?
> library(snpMatrix)
> chr3_CEU <-
read.HapMap.data("file://genotypes_chr3_CEU_r27_nr.b36_fwd.txt")
Reading 174 samples
current line [0] : rs9755941 C/T chr3 3...
current line [20000] : rs34867 C/T chr3 104...
current line [40000] : rs7644151 A/T chr3 2...
current line [60000] : rs7632008 C/T chr3 3...
current line [80000] : rs403286 A/G chr3 55...
current line [100000] : rs1459920 C/T chr3 6...
current line [120000] : rs1384419 A/G chr3 8...
current line [140000] : rs9811293 C/T chr3 1...
current line [160000] : rs10470402 C/T chr3 ...
current line [180000] : rs17373504 C/T chr3 ...
current line [200000] : rs7611580 A/G chr3 1...
current line [220000] : rs695907 C/G chr3 16...
current line [240000] : rs4854927 C/T chr3 1...
last line [259411] : rs3950775 A/C chr3 1...
EOF reached after 259412 snps
...conversion complete...
> chr6_CEU$snp.data[,"rs2274459"]
Autosomal snp(s):
NA06984 NA06985 NA06986 NA06989 NA06991 NA06993 NA06994 NA06995
NA06997
NA07000
"B/B" "B/B" "A/B" "B/B" "B/B" "B/B" "B/B" "A/B"
"B/B"
"B/B"
NA07014 NA07019 NA07022 NA07029 NA07031 NA07034 NA07037 NA07045
NA07048
NA07051
"B/B" "" "B/B" "B/B" "B/B" "" "A/B" "B/B"
""
"B/B"
NA07055 NA07056 NA07345 NA07346 NA07347 NA07348 NA07349 NA07357
NA07435
NA10830
"B/B" "B/B" "B/B" "B/B" "B/B" "B/B" "B/B" "B/B"
"A/A"
"A/B"
NA10831 NA10835 NA10836 NA10837 NA10838 NA10839 NA10840 NA10843
NA10845
NA10846
"A/B" "B/B" "B/B" "B/B" "B/B" "B/B" "B/B" "B/B"
"B/B"
"B/B"
NA10847 NA10850 NA10851 NA10852 NA10853 NA10854 NA10855 NA10856
NA10857
NA10859
"B/B" "B/B" "" "A/B" "B/B" "B/B" "B/B" "B/B"
""
"A/B"
NA10860 NA10861 NA10863 NA10864 NA10865 NA11829 NA11830 NA11831
NA11832
NA11839
"" "A/B" "B/B" "B/B" "B/B" "B/B" "A/B" "B/B"
"B/B"
"B/B"
> rs2274459_CEU<-as.vector(chr6_CEU$snp.data[,"rs2274459"])
> rs2274459_CEU
[1] 03 03 02 03 03 03 03 02 03 03 03 00 03 03 03 00 02 03 00 03 03
03 03
03 03
[26] 03 03 03 01 02 02 03 03 03 03 03 03 03 03 03 03 03 00 02 03 03
03 03
00 02
[51] 00 02 03 03 03 03 02 03 03 03 03 03 02 03 03 03 03 03 03 03 02
03 03
03 03
[76] 03 03 02 03 00 03 03 03 03 02 03 03 03 02 03 03 02 03 03 00 03
02 03
03 03
[101] 03 03 03 03 02 03 03 03 03 02 03 02 03 03 03 03 03 02 02 02 03
03 02
03 03
[126] 03 03 00 02 03 03 03 03 03 03 03 02 02 03 01 03 03 03 03 03 03
02 03
03 03
[151] 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
02 03
02
Regards,
mlsc
[[alternative HTML version deleted]]