Hello, I am using the GWASTools package and I am facing an error to import my signal file. I tried to mimetize my real data set in the follow example:
library(GWASTools)
snp.anno <- 'snpID chromosome position snpName
AX-100676796 1 501997 AX-100676796
AX-100120875 1 503822 AX-100120875
AX-100067350 1 504790 AX-100067350'
snp.anno <- read.table(text=snp.anno, header=T)
signals <- 'probeset_id sample1.CEL sample1.CEL sample1.CEL
AX-100676796-A 2126.7557 1184.8638 1134.2687
AX-100676796-B 427.1864 2013.8512 1495.0654
AX-100120875-A 1775.5816 2013.8512 651.1691
AX-100120875-B 335.9226 2013.8512 1094.7429
AX-100067350-A 2365.7755 2695.0053 2758.1739
AX-100067350-B 2515.4818 2518.2818 28181.289 '
p1summ <- read.table(text=signals, header=T)
write.table(p1summ, "del.txt", sep="\t", col.names=T, row.names=F, quote=F)
p1summ <- createAffyIntensityFile("del.txt", snp.annotation=snp.anno)
Error: all(snp.annotation$snpID == sort(snp.annotation$snpID)) is not TRUE
In addition: Warning messages:
1: In .checkSnpAnnotation(snp.annotation) : coerced snpID to type integer
2: In .checkSnpAnnotation(snp.annotation) :
coerced chromosome to type integer
I used the probe Names with 'A' and 'B' pattern also, the error was the same:
snp.annoab <- 'snpID chromosome position snpName
AX-100676796-A 1 501997 AX-100676796-A
AX-100676796-B 1 501997 AX-100676796-B
AX-100120875-A 1 503822 AX-100120875-A
AX-100120875-B 1 503822 AX-100120875-B
AX-100067350-A 1 504790 AX-100067350-A
AX-100067350-B 1 504790 AX-100067350-B'
snp.annoab <- read.table(text=snp.annoab, header=T)
p1summ <- createAffyIntensityFile("del.txt", snp.annotation=snp.annoab)
Error: all(snp.annotation$snpID == sort(snp.annotation$snpID)) is not TRUE
In addition: Warning messages:
1: In .checkSnpAnnotation(snp.annotation) : coerced snpID to type integer
2: In .checkSnpAnnotation(snp.annotation) :
coerced chromosome to type integer
In my real dataset the error is slight different, but do not work anyway:
Error: length(snp.annotation$snpID) == length(unique(snp.annotation$snpID)) is not TRUE
In addition: Warning messages:
1: In .checkSnpAnnotation(snp.annotation) : NAs introduced by coercion
2: In .checkSnpAnnotation(snp.annotation) : coerced snpID to type integer
3: In .checkSnpAnnotation(snp.annotation) : NAs introduced by coercion
4: In .checkSnpAnnotation(snp.annotation) :
coerced chromosome to type integer
And the strange thing is that:
> length(snp.annotation$snpID) == length(unique(snp.annotation$snpID)) [1] TRUE
Thus, seems that the error is not in agreement with the command (to check if the length is the same). I am missing some important detail in the format of my inputs? I would be grateful for any help. Thank you!
