Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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.

    Comment


    • #3
      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!!

      Comment


      • #4
        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.

        Comment


        • #5
          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.

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Essential Discoveries and Tools in Epitranscriptomics
            by seqadmin




            The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
            Yesterday, 07:01 AM
          • seqadmin
            Current Approaches to Protein Sequencing
            by seqadmin


            Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
            04-04-2024, 04:25 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          55 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          52 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          45 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          55 views
          0 likes
          Last Post seqadmin  
          Working...
          X