Generating an ADMIXTURE plot that stacks the different values of K using R
2
1
Entering edit mode
8.8 years ago
devenvyas ▴ 760

I am trying to create an ADMIXTURE figure a publication where I display my results for different values of K vertically on top of each other. I am looking for something like Figure S1 from this paper.

I was wondering if anyone here know how to do this?

The only other alternative I know is to use Illustrator, but I am thinking there must be some R-based method of doing this.

R ADMIXTURE • 15k views
ADD COMMENT
0
Entering edit mode

@devenvyas Please give an example data and explain what you have tried (if possible)

ADD REPLY
0
Entering edit mode

For every value of K, I have a table that looks like this (so I have 19 tables with a different number of columns)

iid         Q0  Q1  Q2  Q8  pop region  bigregion   verbosepop  number
sample1     #   #   #   #   pop1    r1  big1        pop1        1
sample2     #   #   #   #   pop1    r1  big1        pop1        2
sample3     #   #   #   #   pop1    r1  big1        pop1        3
sample4     #   #   #   #   pop1    r1  big1        pop1        4
sample5     #   #   #   #   pop2    r2  big2        pop2a       5
sample6     #   #   #   #   pop2    r2  big2        pop2a       6
sample7     #   #   #   #   pop2    r2  big2        pop2a       7
sample8     #   #   #   #   pop2    r2  big2        pop2b       8
sample9     #   #   #   #   pop2    r2  big2        pop2b       9
sample10    #   #   #   #   pop3    r2  big2        pop3a       10
sample11    #   #   #   #   pop3    r2  big2        pop3b       11

I have not tried anything, because I have no idea where to start. I have scripts that will generate population means for each pop and then graph out the result for one value of K, so I have 19 pdf files that I can stitch together using Illustrator, but I would prefer to get R to do it. I am trying to find a script that can graph all of them into a format similar to Figure S1 from this paper

ADD REPLY
1
Entering edit mode
6.5 years ago

You can try to use a new R packege called BITE.
The function membercoef.circos plots a similar result in a circular way, as reported in the README file)

ADD COMMENT
0
Entering edit mode
8.8 years ago
ivivek_ngs ★ 5.2k

May be this biostar post might be of some help. Have a look.

ADD COMMENT
0
Entering edit mode

That's not what I am looking for (or at least the way it is described it isn't)

I know how to plot ADMIXTURE results for individual values of K, I am trying to find a way to get R to plot results for different numbers of K. I am looking for something like Figure S1 from this paper.

ADD REPLY
0
Entering edit mode

Hi, i am in a similar need. Have you figured out how to generate the plot shown in S1 in the article?

ADD REPLY
1
Entering edit mode

Nope, I ended up just generating the plots individually and then stacked them in Adobe Illustrator.

ADD REPLY

Login before adding your answer.

Traffic: 2358 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6