SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
plink --window and --from-kb and --to-kb difference aishsk Bioinformatics 1 05-22-2014 12:55 PM
GATK VariantsToBinaryPed and PLINK gibberwocky Bioinformatics 2 01-28-2014 03:33 AM
Convert SINGAPORE GENOME VARIATION PROJECT (SGVP) to PLINK format manlalayag General 0 10-17-2013 11:47 AM
Plink: A/T and C/G SNPs ElMichael Bioinformatics 0 01-31-2012 07:49 AM
plink running issue emilyjia2000 Bioinformatics 8 01-11-2012 01:53 PM

Reply
 
Thread Tools
Old 07-04-2014, 01:27 AM   #1
Marius
8armed
 
Location: Germany

Join Date: Dec 2010
Posts: 28
Default LD along genome, R or PLINK?

Hi everyone!

I have a dataset of SNPs along chromosomes (physical positions are available) of several individuals from natural populations. I'm now interested in calculating LD along these chromosomes based on these unphased SNPs. So basically I want to only look at LD (e.g., by calculating R^2) between neighboring SNPs, such as 1/2, 2/3, 3/4 ...
Is there an R package available for this?
I thought about using Plink, but it seems that PLINK only handles pedigree data, right? Of course, I don't know about that as my individuals were sampled in nature.

Thank you for your help!
Marius is offline   Reply With Quote
Old 07-04-2014, 03:06 AM   #2
chrchang
Member
 
Location: Mountain View, CA

Join Date: Jun 2013
Posts: 15
Default

Most PLINK operations, including the r^2 computation, don't actually care much about pedigree information. Just fill in "0" for the parental and maternal IDs and you'll be fine.
chrchang is offline   Reply With Quote
Old 07-04-2014, 03:43 AM   #3
Marius
8armed
 
Location: Germany

Join Date: Dec 2010
Posts: 28
Default

Great to know! So as it seems I will have to create 2 input files for PLINK, right (a .ped and a .map file)?

My current SNP data table looks like this:

Ind chrI_1673 chrI_1686 chrI_1733
ind.1_a G A C
ind.1_b G G G
ind.2_a G A C
ind.2_b G A C

So basically, each individual is represented by 2 rows, and each SNP is represented by a column. Importantly, the columns are not phased among each other!

I have found an example of a .ped-file:

HCB181 1 0 0 1 1 2 2 2 2
HCB182 1 0 0 1 1 2 2 1 2
HCB183 1 0 0 1 2 2 2 1 2
etc.

What I don't understand here are the columns 2-4? For the rest, I would guess that my sample from above would then look like this:

ind.1 ? ? ? G G A G C G
ind.2 ? ? ? G G A A C C

So my question: what are the columns 2-4? Also, I'm still struggeling with interpreting the .map file, for which I found an example here:

1 rs6681049 0 1
1 rs4074137 0 2
1 rs7540009 0 3
1 rs1891905 0 4


Thank you for your help!!
Marius is offline   Reply With Quote
Old 07-04-2014, 06:10 AM   #4
Marius
8armed
 
Location: Germany

Join Date: Dec 2010
Posts: 28
Default

I did some more investigating and found the following:

.map-file

1 rs6681049 0 1
1 rs4074137 0 2
1 rs7540009 0 3
1 rs1891905 0 4

1st Column = chromosome
2nd Column = marker ID
3rd column = genetic distance
4th column = physical position

- What do I do if I don't have the genetic distance information? Do I just add a zero everywhere? I guess this information is not needed for R^2 calculation, right?
- I guess the physical position is not continuous, so it starts from 0 on on each chromosome?

.ped file

HCB181 1 0 0 1 1 2 2 2 2
HCB182 1 0 0 1 1 2 2 1 2
HCB183 1 0 0 1 2 2 2 1 2
etc.

1st column: Sample ID
2nd column: Paternal ID
3rd column: Maternal ID
4th column: Sex (1=male; 2=female; other=unknown)
5th column: Genotypes (space or tab separated, 2 for each marker. 0=missing)

What do I do if I miss the information for e.g. columns 2, 3, 4? Do I just fill up these columns with zeros, or can I just skip them? It seems that sometimes there are additional columns with information at the beginning of that file, such as 'affected'/'unaffected'. But people just seem not to add this if not used.
Marius is offline   Reply With Quote
Old 07-04-2014, 07:47 AM   #5
chrchang
Member
 
Location: Mountain View, CA

Join Date: Jun 2013
Posts: 15
Default

Quote:
Originally Posted by Marius View Post
I did some more investigating and found the following:

.map-file

1 rs6681049 0 1
1 rs4074137 0 2
1 rs7540009 0 3
1 rs1891905 0 4

1st Column = chromosome
2nd Column = marker ID
3rd column = genetic distance
4th column = physical position

- What do I do if I don't have the genetic distance information? Do I just add a zero everywhere? I guess this information is not needed for R^2 calculation, right?
- I guess the physical position is not continuous, so it starts from 0 on on each chromosome?

.ped file

HCB181 1 0 0 1 1 2 2 2 2
HCB182 1 0 0 1 1 2 2 1 2
HCB183 1 0 0 1 2 2 2 1 2
etc.

1st column: Sample ID
2nd column: Paternal ID
3rd column: Maternal ID
4th column: Sex (1=male; 2=female; other=unknown)
5th column: Genotypes (space or tab separated, 2 for each marker. 0=missing)

What do I do if I miss the information for e.g. columns 2, 3, 4? Do I just fill up these columns with zeros, or can I just skip them? It seems that sometimes there are additional columns with information at the beginning of that file, such as 'affected'/'unaffected'. But people just seem not to add this if not used.
* It's safe to set all values in the .map "genetic distance" column to zero. Almost no commands actually use this information.
* As for the .ped, the first six columns are normally as follows:
1. Family ID
2. Individual ID
3. Parental ID (safe to set to '0' if unknown)
4. Maternal ID (safe to set to '0')
5. Sex (1 = male, 2 = female, 0 = unknown)
6. Phenotype (-9 if unknown)
(columns 7+ have genotype info)

You can just set both the family and individual IDs to the sample ID.
chrchang is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:41 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO