I am using Plink 1.9 to merge two data sets, I have found out the common SNPs among them and now how do I separate out overlapping sample data, common in both the data set from any one of them?
I am using Plink 1.9 to merge two data sets, I have found out the common SNPs among them and now how do I separate out overlapping sample data, common in both the data set from any one of them?
If you literally have the list of common SNPs in a text file, then you can do the following (assumes that the SNPs are listed in SNPsForFiltering.list) :
plink --noweb --bfile DataSetA --extract SNPsForFiltering.list --make-bed --out DataSetA.Common ;
plink --noweb --bfile DataSetB --extract SNPsForFiltering.list --make-bed --out DataSetB.Common ;
You can then attempt to merge these together if you have a merge file that lists the datasets to be merged:
cat ForMerge.list
DataSetA.Common
DataSetB.Common
plink --merge-list ForMerge.list --out AB.Merge ;
I am humbled by your words, your encouragement means a lot to me. I'm quite excited about the future but equally confused and worried, whether I will really get to work in my areas of interests or not which is human evolutionary and population genetics, and also archaeogenetics. I am grateful to you for your kind guidance.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
The title of the post should be a clear, concise statement, not the exact duplicate of your actual post text. Read Rule #5 here: http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202
Thank you, I should have read it earlier. Sorry for the inconvenience.
You can still edit your post and change the title to something more appropriate.
EDIT: I see you've changed the title, but it's not concise yet. I'll make a suggestion: "Use plink to extract data using common SNPs and merge this into one file"
Thank you for your kind suggestion Sir.