[GenABEL-dev] [Genabel-commits] r622 - pkg/GenABEL/R

Yurii Aulchenko yurii.aulchenko at gmail.com
Sun Nov 21 08:15:10 CET 2010


Hi Stepan,

I understand that your change makes sure that the length of the first
two (header) lines of a sample-file does not  matter anymore, and real
job starts with line 3 -- something we discovered to be important in
our discussion with Zhai.

Thanks for submitting this change!

Yurii

On Fri, Nov 19, 2010 at 11:55 AM,  <noreply at r-forge.r-project.org> wrote:
> Author: stiv
> Date: 2010-11-19 06:55:19 +0100 (Fri, 19 Nov 2010)
> New Revision: 622
>
> Modified:
>   pkg/GenABEL/R/impute2databel.R
> Log:
> better info on bad header
>
> Modified: pkg/GenABEL/R/impute2databel.R
> ===================================================================
> --- pkg/GenABEL/R/impute2databel.R      2010-11-09 19:11:45 UTC (rev 621)
> +++ pkg/GenABEL/R/impute2databel.R      2010-11-19 05:55:19 UTC (rev 622)
> @@ -114,7 +114,14 @@
>
>        if (!missing(samplefile))
>        {
> -               temp <- scan(samplefile,what="character",nlines=1)
> +               l1 <- scan(samplefile,what="character",nlines=1)
> +               l2 <- scan(samplefile,what="character",nlines=1,skip=1)
> +               temp <- scan(samplefile,what="character",nlines=1,skip=2)
> +
> +               if((length(l1)!=length(temp)) || (length(temp)!=length(l2))){
> +            warning("Wrong number of words in sample file's header.");
> +               }
> +
>                samnames <- scan(samplefile,what="character",skip=2)
>                samnames <- samnames[c(F,T,rep(F,(length(temp)-2)))]
>                if (length(samnames) == dim(dosefile)[1]) {
>
> _______________________________________________
> Genabel-commits mailing list
> Genabel-commits at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits
>


More information about the genabel-devel mailing list