gbradburd/conStruct

View admixture proportions with associated sample names

Closed this issue · 5 comments

Hello,

Thank you for this great program! I'd like to investigate a few of the individuals that are more genetically similar to a different site than where they were sampled. I can view the admixture proportions, but they aren't associated with a sample name. I was able to sort the structure plot by my sample names, so they must be associated in the back somewhere, but I'm not sure how to link this information. Is there a way I can view the admixture proportions with the sample ID for different K with the spatial and non-spatial models?

I appreciate your help,
Quinn

Hi Quinn,

Glad you find the program useful! The output objects that contain the estimated admixture proportions aren't associated with sample names. If your structure plot had sample names, I think you must have specified them in the optional sample.names argument of the make.structure.plot function? The order of the admixture proportions is the same as the ordering of the samples that you specify in the freqs, geoDist, and coords arguments of the conStruct function. If you do two different analyses (e.g., with different values of K, or the spatial model vs. the non-spatial model), the row-ordering of the output results from each will be whatever you specified in those data arguments you passed to the original conStruct function call. Does that answer your question?

Thank you! Yes, I am using the sample.names argument in the make.structure.plot function. So, if I understand you correctly, and I export admixture proportions for a model at a given value of K, they will be ordered by the original order of the conStruct dataset?

Code used to list the admixture proportions:

conStruct.results$chain_1$MAP$admix.proportions

Yep that's exactly right. So, as long as you're using the same input data for different model runs, the order of the admixture proportions will be the same across the different runs.

Great, thank you! I'm working through my output now and reviewing the paper to interpret the results, but will probably have more questions! :)

okey-doke! I'm going to close this issue because it seems like this problem is resolved, but feel free to reopen if it comes back up, or to open another issue if something else comes up.