[BioC] help with genotyping

Benilton Carvalho beniltoncarvalho at gmail.com
Wed Jul 18 12:28:42 CEST 2012


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
>
>



More information about the Bioconductor mailing list