Question: Convert .gprobs files to PLINK format
1
gravatar for lauretomas
4 months ago by
lauretomas10
lauretomas10 wrote:

Hello all, I have some imputed .gprobs files (one per chromosome), imputed by Impute2 downloaded from dbGaP, and I need to convert this file into .bed format of PLINK in order to do some analysis.

My .gprobs files look like:

--- rs371609562:61395:CTT:C 61395 CTT C 0 0.023 0.977 0 0.039 0.961 0 0.015 0.985 0 0.026 0.974 0 0 1 0 0 1 0 0 1

Could someone help me find out how convert this kind of file into PLINK format? Or guide me about which files I need to perform the convertion?

dbgap snp plink gprobs genome • 381 views
ADD COMMENTlink modified 4 months ago by chrchang5234.2k • written 4 months ago by lauretomas10

Hi @lauretomas,

Do you reckon any tools/scripts described in the previous post would help? Converting Between Impute2 And Ped/Map After Imputation - 1St Column Dashes Problem

ADD REPLYlink modified 4 months ago • written 4 months ago by Sej Modha3.8k

Thanks. I have seen that post, and tried some tools from there, but I lost some information in the process so I posted my own question to see if anyone know a direct conversion for my data, that is not the same that the one in that post.

ADD REPLYlink written 4 months ago by lauretomas10

How Can I Convert Impute2 (.Haps .Sample) To Plink (.Map .Ped)?

ADD REPLYlink written 4 months ago by zx87545.6k
3
gravatar for chrchang523
4 months ago by
chrchang5234.2k
United States
chrchang5234.2k wrote:

If you want to just round dosages to the nearest integer (and erase the dosages which are too far from an integer), you can use plink 1.9's --gen flag to import this type of file. (You'll also need to use --oxford-single-chr to address the '---' chromosome codes.)

If you want to actually save the dosages and use them in association analysis, etc., use plink 2.0, and --make-pgen instead of --make-bed.

ADD COMMENTlink written 4 months ago by chrchang5234.2k

I've tried the following code:

plink --gen file_chr10.gprobs.gz --sample file.sample --oxford-single-chr 10 --make-bed --out output

It started converting variants, but then it gave an error:

Error: File read failure.

And I don´t know why it gives this error.

I think it could be because I didn't extract the sample.gz file, because it gives me an error, instead I did less file.sample.gz > file.sample

Any lead about how to extract properly the file.sample.gz? I've tried gunzip and other tools

ADD REPLYlink modified 4 months ago • written 4 months ago by lauretomas10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1950 users visited in the last hour