edit plink command to to give me only 0,1,2 genotypes

532 views
Skip to first unread message

Ana Marija

unread,
Jan 11, 2019, 2:20:44 PM1/11/19
to plink2-users
Hello,

how to edit this plink command:

plink --noweb --file merged --extract $snpFile --maf .001 --geno .05 --recode 12 --out merged_forldmax_pre0

to give me genotypes in form: 0,1,2

Thanks
Ana

Christopher Chang

unread,
Jan 11, 2019, 2:54:57 PM1/11/19
to plink2-users
"--recode A" and "--recode A-transpose" generate text files with 0-1-2-encoded genotypes.

Ana Marija

unread,
Jan 15, 2019, 1:31:06 PM1/15/19
to Christopher Chang, plink2-users
Hello,

thanks for the help. Right now using
plink --noweb --file merged --extract $snpFile --maf .001 --geno .05 --recode A-transpose --out final_$snpFile

I am getting result in this form:

  NA20826_NA20826 NA20828_NA20828
1               0               1
2               0               1
3               0               1
4               0               1
5               0               1
6               0               1

I would need to get result in this form:

  NA20814 NA20815 NA20816 NA20819 NA20826 NA20828
1       0       0       1       1       0       0
2       2       2       2       2       2       2
3       0       0       0       0       0       0
4       0       0       0       0       0       0
5       0       0       0       0       0       0
6       0       0       0       0       0       0

How do I do that?

Thanks
Ana



--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ana Marija

unread,
Jan 16, 2019, 8:48:23 AM1/16/19
to Christopher Chang, plink2-users
Hi Christopher,

is there is anything I can put in this plink command:
plink --noweb --file merged --extract $snpFile --maf .001 --geno .05 --recode A-transpose --out final_$snpFile
to have column named NA20826 instead of NA20826_NA20826 (see previous message)?

Thanks
Ana

Christopher Chang

unread,
Jan 16, 2019, 11:53:29 AM1/16/19
to plink2-users
No, but this modification should be straightforward to do with a shell script.


On Wednesday, January 16, 2019 at 5:48:23 AM UTC-8, Ana Marija wrote:
Hi Christopher,

is there is anything I can put in this plink command:
plink --noweb --file merged --extract $snpFile --maf .001 --geno .05 --recode A-transpose --out final_$snpFile
to have column named NA20826 instead of NA20826_NA20826 (see previous message)?

Thanks
Ana

To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users+unsubscribe@googlegroups.com.

Ana Marija

unread,
Jan 16, 2019, 11:57:10 AM1/16/19
to Christopher Chang, plink2-users
Thank you!

To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.

bassu

unread,
Jan 17, 2019, 8:09:14 AM1/17/19
to plink2-users

Hi Christopher,

Adding to this .

Is there a away where I can get only 0 and 1 as genotypes. What I need is convert all 2 ->1 and then do assoc testing ?

DaveA

unread,
Jan 23, 2019, 3:18:01 AM1/23/19
to plink2-users
Hi Bassu, isn't that a dominance model that you can test with the --model flag?

Dave
Reply all
Reply to author
Forward
0 new messages