plink import

89 views
Skip to first unread message

kowzar

unread,
Apr 1, 2009, 1:59:51 AM4/1/09
to glu-users
Hi.

I would like to learn more about GLU's features.

According to the information provided on your web-page, it is possible
to import the PLINK binary format (bed) starting with version 0.90. I
have looked through the documentation, but been unable to find
information about this.

I would be very appreciative if I could get some information on this
to get started.

Sincerely,

Kouros

Kevin Jacobs <jacobs@bioinformed.com>

unread,
Apr 1, 2009, 9:48:52 AM4/1/09
to glu-...@googlegroups.com

Unfortunately, the documentation has lagged behind the implementation.
To import a Plink data set, simply run:

glu transform mydata.bed -o mydata.lbat

More so, virtually all GLU modules can use Plink data sets natively. e.g.:

glu qc.summary mydata.bed -o summary_loci.txt -O summary_samples.txt

or

glu struct.pca mydata.bed -o pca.txt

GLU can also write Plink data sets. For example, using HapMap data as an input:

glu transform genotypes_chr4_YRI_r26_nr.b36_fwd.txt.gz -o
hapmap_chr4_YRI_r26_nr_b36_fwd.bed

All of these commands read or write the corresponding BIM and FAM
files based on the filename prefix.

Hope this helps,

-Kevin

kowzar

unread,
Apr 1, 2009, 12:35:36 PM4/1/09
to glu-users
Hi.

Thanks for the prompt response to my question and also for the
additional examples.

On Apr 1, 9:48 am, "Kevin Jacobs <jac...@bioinformed.com>"
<bioinfor...@gmail.com> wrote:
> On Wed, Apr 1, 2009 at 1:59 AM, kowzar <kouros.ow...@duke.edu> wrote:
> > I would like to learn more about GLU's features.
>
> > According to the information provided on your web-page, it is possible
> > to import the PLINK binary format (bed) starting with version 0.90. I
> > have looked through the documentation, but been unable to find
> > information about this.
>
> > I would be very appreciative if I could get some information on this
> > to get started.
>
> Unfortunately, the documentation has lagged behind the implementation.
>  To import a Plink data set, simply run:
>
>   glu transform mydata.bed -o mydata.lbat

I am getting the error shown below. If I understand the error message
correctly, GLU does not like SNPs coded as hemizygotes. If that is
indeed the case, is there any flag I can set?

Thanks, Kouros

$ glu transform mydata.bed -o foo.ldat
GLU 1.0a6 module: transform
Copyright (c) 2008, BioInformed LLC and the U.S. Department of Health
& Human Services. Funded by NCI under Contract N01-CO-12400.


Execution aborted due to a problem with the program input, parameters
supplied, an error in the program. Please examine the following
failure
trace for clues as to what may have gone wrong. When in doubt, please
send
this message and a complete description of the analysis you are
attempting
to perform to the software developers.

Command line:
glu transform mydata.bed -o foo.ldat

Traceback:
Traceback (most recent call last):
File "glu/lib/glu_launcher.py", line 203, in main
File "glu/modules/transform.py", line 68, in main
File "glu/lib/genolib/io.py", line 320, in transform_files
File "glu/lib/genolib/io.py", line 168, in load_genostream
File "glu/lib/genolib/formats/plink.py", line 943, in
load_plink_bed
File "glu/lib/genolib/formats/plink.py", line 839, in
load_plink_bim
File "glu/lib/genolib/genoarray.py", line 1601, in get
GenotypeRepresentationError: model does not allow hemizgote
genotypes


[Wed Apr 1 12:24:21 2009] Execution aborted due to unhandled error

Kevin Jacobs <jacobs@bioinformed.com>

unread,
Apr 1, 2009, 1:01:56 PM4/1/09
to glu-...@googlegroups.com
On Wed, Apr 1, 2009 at 12:35 PM, kowzar <kouros...@duke.edu> wrote:
> Thanks for the prompt response to my question and also for the
> additional examples.

I suspect that error is one that I've already fixed. Can you provide
me with the details on your operating system and how you
built/installed GLU, so that I can be sure. If so, I am overdue in
releasing a new version, since I've fixed several similar issues since
1.0a6 went out.

Best regards,
-Kevin

kowzar

unread,
Apr 1, 2009, 1:20:37 PM4/1/09
to glu-users
Hi.

On Apr 1, 1:01 pm, "Kevin Jacobs <jac...@bioinformed.com>"
<bioinfor...@gmail.com> wrote:
> On Wed, Apr 1, 2009 at 12:35 PM, kowzar <kouros.ow...@duke.edu> wrote:
> > Thanks for the prompt response to my question and also for the
> > additional examples.
>
> I suspect that error is one that I've already fixed.  Can you provide
> me with the details on your operating system and how you
> built/installed GLU, so that I can be sure.  If so, I am overdue in
> releasing a new version, since I've fixed several similar issues since
> 1.0a6 went out.

I installed the binary distribution
$ md5sum glu-1.0a6-Linux_AMD_EM64T.tar.gz
557e5de092a4b61f077385420fcf92ae glu-1.0a6-Linux_AMD_EM64T.tar.gz

on a Debian GNU/Linux AMD64 (stable ) system. Basically I just tar -
zxvf'd your file
and then exported the main directory to my path.

Thanks, Kouros

kowzar

unread,
Apr 2, 2009, 2:32:53 PM4/2/09
to glu-users
Hi.

I decided to give try the development version of GLU to see if that
would work with my toy example data (to see if it could deal with the
hemizygote issue)

I built the subversion tree from source using "python setup.py build".
How do I install it locally? I tried the --install-dir option but it
did not work (please see below).

Thanks, Kouros

hoeffding:/tmp/glu-genetics-read-only$ python setup.py build
hoeffding:/tmp/glu-genetics-read-only$ mkdir /tmp/GLU
hoeffding:/tmp/glu-genetics-read-only$ python setup.py --install-dir=/
tmp/GLU install
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: option --install-dir not recognized

Jacobs, Kevin (NIH/NCI) [C]

unread,
Apr 2, 2009, 2:35:56 PM4/2/09
to glu-...@googlegroups.com
Hi Kouros,

The command would be:

python setup.py install --prefix=/tmp/GLU


Congratulations on getting that far. Building from source is not for
the faint of heart!

-Kevin

Jun

unread,
Apr 2, 2009, 2:42:32 PM4/2/09
to glu-users
If GLU is installed locally, I believe one has to add that directory
to the python path.

Jun Lu

On Apr 2, 2:35 pm, "Jacobs, Kevin (NIH/NCI) [C]"
Reply all
Reply to author
Forward
0 new messages