Question: Use plink to extract data using common SNPs and merge this into one file
0
gravatar for amitgourav.ghosh12
7 months ago by
amitgourav.ghosh1230 wrote:

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?

sequencing snp • 479 views
ADD COMMENTlink modified 6 months ago • written 7 months ago by amitgourav.ghosh1230
1

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

ADD REPLYlink written 7 months ago by RamRS17k

Thank you, I should have read it earlier. Sorry for the inconvenience.

ADD REPLYlink written 7 months ago by amitgourav.ghosh1230

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"

ADD REPLYlink modified 7 months ago • written 7 months ago by RamRS17k

Thank you for your kind suggestion Sir.

ADD REPLYlink written 6 months ago by amitgourav.ghosh1230
2
gravatar for Kevin Blighe
7 months ago by
Kevin Blighe28k
USA / Europe / Brazil
Kevin Blighe28k wrote:

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 ;
ADD COMMENTlink written 7 months ago by Kevin Blighe28k

Thank you very much for your kind answer. I have the common SNP file in .bim format. Maybe I have to figure out how to make text file from it containing the SNPs.

ADD REPLYlink written 7 months ago by amitgourav.ghosh1230

You should be able to just output and transpose that, and then you will have your SNP listing. How did you create it? Perhaps, you can re-create it but not specify binary format (BIM is similar to plain-text MAP format).

ADD REPLYlink written 7 months ago by Kevin Blighe28k

Thank you Sir! I have generated a SNP list text file from my previous common SNP file in bim format using awk. Using which I have hopefully separated out the unique individual samples from overlapping ngs data.

ADD REPLYlink written 7 months ago by amitgourav.ghosh1230
1

No problem kind Sir. Everything is okay now, in that case?

ADD REPLYlink written 7 months ago by Kevin Blighe28k

Yes Sir, it is okay now. I am an undergrad student, no need to address me as Sir. Thank you for your kind suggestion.

ADD REPLYlink written 6 months ago by amitgourav.ghosh1230
1

An undergrad student is the future of our society and the future of research. In that sense, you deserve more respect than Senior Professors.

ADD REPLYlink written 6 months ago by Kevin Blighe28k
1

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.

ADD REPLYlink written 6 months ago by amitgourav.ghosh1230

All I can say is to continue to work hard and then you will achieve your dreams over the course of time. You will face road blocks along the way, but do not give up hope.

ADD REPLYlink written 6 months ago by Kevin Blighe28k

Thank you Sir for your kind words, I'll surely work hard.

ADD REPLYlink written 6 months ago by amitgourav.ghosh1230
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: 624 users visited in the last hour