Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Marius
    8armed
    • Dec 2010
    • 30

    #1

    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!
  • chrchang
    Member
    • Jun 2013
    • 15

    #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

    • Marius
      8armed
      • Dec 2010
      • 30

      #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

      • Marius
        8armed
        • Dec 2010
        • 30

        #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

        • chrchang
          Member
          • Jun 2013
          • 15

          #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

          • SEQadmin2
            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
            by SEQadmin2



            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
            ...
            10-14-2026, 09:55 AM
          • SEQadmin2
            New Genomics Technologies Take Aim at Long-Standing Limits
            by SEQadmin2


            Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

            We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
            ...
            09-28-2026, 10:25 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 10-22-2026, 11:13 AM
          0 responses
          40 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          29 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          41 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          45 views
          0 reactions
          Last Post SEQadmin2  
          Working...