[GenABEL-dev] impute2databel FLOAT

L.C. Karssen lennart at karssen.org
Wed Sep 10 23:03:13 CEST 2014


Hi Alvaro,

On 27-08-14 16:37, Frank, Alvaro Jesus wrote:
> Hi All,
> 
> I am in the process of finishing the first USER usable version of
> omicabelnomm and would need help converting real data from impute2 to
> databel.

That's great news!

> 
> The function impute2databel seems ok but I have no idea if it stores in
> FLOAT or DOUBLE the values.

That's easy to find out. Simple look up the help information for the
function (help(impute2databel), which shows:

Usage:

       impute2databel(genofile, samplefile, outfile,
         makeprob = TRUE, old = FALSE, dataOutType = "FLOAT")

So the default dataOutType is FLOAT.

Another way to find out is type the name of an R function without the
brackets, then you'll see the underlying code. For example here are the
first few lines of the impute2databel() function:

> library(GenABEL)
Loading required package: MASS
Loading required package: GenABEL.data
> impute2databel
function (genofile, samplefile, outfile, makeprob = TRUE, old = FALSE,
    dataOutType = "FLOAT")
{

As you can see the default for the dataOutType variable is really coded
as FLOAT.

> 
> I found this on the mailing list, would it work?

It's been a while since I converted Impute2 data. If you search the
forum you'll see some reports of problems with this function. At least
one was a bug that has been fixed. Please let us know if you run into
any trouble. Since this bug involves DatABEL as well please note that
Maksim is in the process of releasing a new DatABEL version to CRAN. I'm
not sure of the top of my head if this new version contains the
aforementioned bug fix or if that was already released before.

About the example below, please make sure if you want to set
makeprob=TRUE. Does OmicABELnoMM accept probability data or only dosage
data?


Best,

Lennart.

> 
>>/ owd<- setwd(pth)
> />/ fls<- list.files(pattern="^chr")
> />/ ufls<- unique(sapply(strsplit(fls, "_"), "[", 1))
> />/ for(i in ufls){
> />/       of<- strsplit(i, "\\.")[[1]]
> />/       of<- paste(of[1], tail(of, 1), sep=".")
> />/       impute2databel(genofile = i,
> />/                      samplefile = paste(i, "info", sep="_"),
> />/                      outfile = of,
> />/                      makeprob=TRUE, old=FALSE)
> />/ }
> />/ setwd(owd)
> 
> Best,
> 
> Alvaro
> /
> 
> 
> 
> 
> _______________________________________________
> genabel-devel mailing list
> genabel-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel
> 

-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands

lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20140910/b93914d8/attachment.sig>


More information about the genabel-devel mailing list