help with genotyping
1
0
Entering edit mode
@pina-iannelli-5397
Last seen 9.7 years ago
Dear all, I run this code to get genotyping from Affymetrix SNP 6.0 arrays: fullFilenames <- list.celfiles("C:/Users/Pina/Bioinformatica/SNP/COR354_SNP6", full.names = TRUE) outputDir <- file.path(getwd(), "crlmmResults") exampleSet <- genotype(fullFilenames, batch = rep("1", 2), cdfName = "genomewidesnp6", gender=c(1, 2)) Now I nead to ha ve a file with genotyping information, such as: SNP_A-1780270 BB BB AA SNP_A-1780272 BB AB BB How can I do it? Thanks for your help, best regards Pina [[alternative HTML version deleted]]
SNP SNP • 1.4k views
ADD COMMENT
0
Entering edit mode
@benilton-carvalho-1375
Last seen 4.1 years ago
Brazil/Campinas/UNICAMP
there is a calls() accessor that will return you the calls as integers (1: AA; 2: AB; 3: BB). So, something along the lines of: theCalls = calls(object) final = theCalls for (i in 1:3) final[theCalls == i] = c('AA', 'AB', 'BB')[i] Then it's just a matter of using write.table() to write out the file using the "final" object. b On 13 July 2012 11:22, Pina Iannelli <pina.iannelli at="" gmail.com=""> wrote: > Dear all, > I run this code to get genotyping from Affymetrix SNP 6.0 arrays: > > fullFilenames <- > list.celfiles("C:/Users/Pina/Bioinformatica/SNP/COR354_SNP6", full.names = > TRUE) > outputDir <- file.path(getwd(), "crlmmResults") > exampleSet <- genotype(fullFilenames, batch = rep("1", 2), cdfName = > "genomewidesnp6", gender=c(1, 2)) > > Now I nead to ha ve a file with genotyping information, such as: > > SNP_A-1780270 BB BB AA SNP_A-1780272 BB AB BB > How can I do it? > Thanks for your help, best regards > Pina > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Dear Benilton, thanks for your help! When I try your code, I get this error: Error in as.hi.integer(x, maxindex = maxindex, dim = dim, vw = vw, pack = pack) : NAs in as.hi.integer In addition: Warning message: In `[<-.ff_array`(`*tmp*`, theCalls == i, value = "AA") : opening ff C:/Users/Pina/Bioinformatica/SNP/COR354_SNP6/call-9201fc1496a.ff And then when I use write.table function I get this error: Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class 'c("ff_matrix", "ff_array", "ff")' into a data.frame Can you help me? thanks a lot! Pina 2012/7/13 Benilton Carvalho <beniltoncarvalho@gmail.com> > there is a calls() accessor that will return you the calls as integers > (1: AA; 2: AB; 3: BB). So, something along the lines of: > > theCalls = calls(object) > final = theCalls > for (i in 1:3) > final[theCalls == i] = c('AA', 'AB', 'BB')[i] > > Then it's just a matter of using write.table() to write out the file > using the "final" object. > > b > > On 13 July 2012 11:22, Pina Iannelli <pina.iannelli@gmail.com> wrote: > > Dear all, > > I run this code to get genotyping from Affymetrix SNP 6.0 arrays: > > > > fullFilenames <- > > list.celfiles("C:/Users/Pina/Bioinformatica/SNP/COR354_SNP6", full.names > = > > TRUE) > > outputDir <- file.path(getwd(), "crlmmResults") > > exampleSet <- genotype(fullFilenames, batch = rep("1", 2), cdfName = > > "genomewidesnp6", gender=c(1, 2)) > > > > Now I nead to ha ve a file with genotyping information, such as: > > > > SNP_A-1780270 BB BB AA SNP_A-1780272 BB AB BB > > How can I do it? > > Thanks for your help, best regards > > Pina > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
the following should work for you, assuming you've got enough RAM: theCalls = calls(object)[] final = theCalls for (i in 1:3) final[theCalls == i] = c('AA', 'AB', 'BB')[i] b On 18 July 2012 10:04, Pina Iannelli <pina.iannelli at="" gmail.com=""> wrote: > Dear Benilton, thanks for your help! > When I try your code, I get this error: > > Error in as.hi.integer(x, maxindex = maxindex, dim = dim, vw = vw, pack = > pack) : > NAs in as.hi.integer > In addition: Warning message: > In `[<-.ff_array`(`*tmp*`, theCalls == i, value = "AA") : > opening ff > C:/Users/Pina/Bioinformatica/SNP/COR354_SNP6/call-9201fc1496a.ff > > And then when I use write.table function I get this error: > > Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = > stringsAsFactors) : > cannot coerce class 'c("ff_matrix", "ff_array", "ff")' into a data.frame > > Can you help me? thanks a lot! > Pina > > 2012/7/13 Benilton Carvalho <beniltoncarvalho at="" gmail.com=""> >> >> there is a calls() accessor that will return you the calls as integers >> (1: AA; 2: AB; 3: BB). So, something along the lines of: >> >> theCalls = calls(object) >> final = theCalls >> for (i in 1:3) >> final[theCalls == i] = c('AA', 'AB', 'BB')[i] >> >> Then it's just a matter of using write.table() to write out the file >> using the "final" object. >> >> b >> >> On 13 July 2012 11:22, Pina Iannelli <pina.iannelli at="" gmail.com=""> wrote: >> > Dear all, >> > I run this code to get genotyping from Affymetrix SNP 6.0 arrays: >> > >> > fullFilenames <- >> > list.celfiles("C:/Users/Pina/Bioinformatica/SNP/COR354_SNP6", full.names >> > = >> > TRUE) >> > outputDir <- file.path(getwd(), "crlmmResults") >> > exampleSet <- genotype(fullFilenames, batch = rep("1", 2), cdfName = >> > "genomewidesnp6", gender=c(1, 2)) >> > >> > Now I nead to ha ve a file with genotyping information, such as: >> > >> > SNP_A-1780270 BB BB AA SNP_A-1780272 BB AB BB >> > How can I do it? >> > Thanks for your help, best regards >> > Pina >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ >> > Bioconductor mailing list >> > Bioconductor at r-project.org >> > https://stat.ethz.ch/mailman/listinfo/bioconductor >> > Search the archives: >> > http://news.gmane.org/gmane.science.biology.informatics.conductor > >
ADD REPLY

Login before adding your answer.

Traffic: 653 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6