<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Catherine<br>
    <br>
    When data goes into the GWAS catalogue, it is defined just by the
    region where the GWAS study was carried out, in this case Europe. In
    Ensembl, we have data from specific experiments, working with
    particular populations. We calculate the LD from the experiments we
    have in our databases. We can't claim to have all the variation and
    LD for everybody in Europe, only for the group studied, so we define
    our population names as the experiments. You can then look at the
    experiments themselves to see whether they are representative for
    your purpose or not.<br>
    <br>
    Here's a sum up of the samples used in 1000 Genomes. <br>
    <a class="moz-txt-link-freetext" href="http://www.1000genomes.org/about#ProjectSamples">http://www.1000genomes.org/about#ProjectSamples</a><br>
    <br>
    As you can see, the European (EUR) super-population is made up of
    British (GBR), Finnish (FIN), Spanish (IBS), Italian (TSI) and
    American (CEU) subpopulations. If you think this is representative
    for what you're doing then the 1000 Genomes EUR population is the
    one you want to use to get your LD. The name for this population in
    the database is 1000GENOMES:phase_1_EUR, telling us it comes from
    1000 Genomes, it's the data from phase 1 and it's the European
    population (watch out for phase 3 with more variants coming soon).
    We don't currently have a more representative population for Europe
    as a whole.<br>
    <br>
    All the best<br>
    <br>
    Emily<br>
    <br>
    <div class="moz-cite-prefix">On 20/02/2015 16:50, Catherine Leroy
      wrote:<br>
    </div>
    <blockquote
      cite="mid:B70374BB-31B9-4707-A468-90AE54549F19@ebi.ac.uk"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      I get my snp and ethnicity from the gwas catalog database. The
      specific example I gave earlier is pubmed : <span
        style="background-color: rgb(255, 255, 255);"><i>23128233. So I
          won’t have much more then what I have put in my script. </i></span>
      <div><span style="background-color: rgb(255, 255, 255);"><i>So
            there’s no such thing as r2 data for ‘European population’?<br>
          </i></span>
        <div><br>
        </div>
         <br>
        <div>
          <div>On 20 Feb 2015, at 14:36, Emily Perry <<a
              moz-do-not-send="true" href="mailto:emily@ebi.ac.uk">emily@ebi.ac.uk</a>>
            wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <meta content="text/html; charset=windows-1252"
              http-equiv="Content-Type">
            <div bgcolor="#FFFFFF" text="#000000"> Hi Catherine<br>
              <br>
              You need to use the names that the populations are called
              in the database, so to get 1000 genomes Europeans you
              would use 1000GENOMES:phase_1_EUR.<br>
              <br>
              All the best<br>
              <br>
              Emily<br>
              <br>
              <div class="moz-cite-prefix">On 20/02/2015 13:32,
                Catherine Leroy wrote:<br>
              </div>
              <blockquote
                cite="mid:D073601E-A2C7-4B25-931B-8E33DEA263EC@ebi.ac.uk"
                type="cite">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=windows-1252">
                Hello, 
                <div><br>
                </div>
                <div>I am trying to work my head around LD. As you might
                  see from my questions it is all quite new to me.</div>
                <div><br>
                </div>
                <div>I have the following snp : <span
                    style="background-color: rgb(255, 255, 255);">rs11010067</span></div>
                <div><span style="background-color: rgb(255, 255, 255);">and
                    I am trying to get the r2 value using the script
                    I’ve copied past below.</span></div>
                <div><span style="background-color: rgb(255, 255, 255);"><br>
                  </span></div>
                <div><span style="background-color: rgb(255, 255, 255);">If
                    I enter as population : Europe </span></div>
                <div><span style="background-color: rgb(255, 255, 255);">then
                    I don’t get anything back. </span></div>
                <div><span style="background-color: rgb(255, 255, 255);"><br>
                  </span></div>
                <div><span style="background-color: rgb(255, 255, 255);">If
                    I enter as population : </span><span
                    style="background-color: rgb(255, 255, 255);">CSHL-HAPMAP:HapMap-CEU</span></div>
                <div>
                  <div>Then I get back a list of variation1, variation2
                    and r2. </div>
                </div>
                <div><br>
                </div>
                <div>I don’t understand why I don’t get anything with
                  Europe. </div>
                <div>Could somebody explain that to me or point me to
                  some documentation about LD I could read. </div>
                <div><br>
                </div>
                <div>I would want to use r2 to determine if a snp I have
                  is in the same LD Block then the gene I’m supposing it
                  is linked to using a threshold for r2 (which I haven’t
                  determine yet, I’ve just started working on that). The
                  problem is that the indication I have as population
                  for this snp in my data (Gwas catalog) is Europe which
                  doesn’t return anything. </div>
                <div><br>
                </div>
                <div>Thanks for your help,</div>
                <div>Catherine</div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>
                  <pre style="background-color: rgb(255, 255, 255);"><font face="Helvetica">use strict;
use warnings;
use Bio::EnsEMBL::Registry;


my $registry = 'Bio::EnsEMBL::Registry';

$registry->load_registry_from_db(
-host   => '<a moz-do-not-send="true" href="http://ensembldb.ensembl.org/">ensembldb.ensembl.org</a>',
-user   => 'anonymous',
);

my $rs_id = "rs11010067";

my $variation_adaptor = $registry->get_adaptor( 'human', 'variation', 'variation' );
my $variation = $variation_adaptor->fetch_by_name($rs_id);

my $population_adaptor = $registry->get_adaptor('human', 'variation', 'population'); <span style="font-style: italic;">#get adaptor for Population object
</span>my $population = $population_adaptor->fetch_by_name("CSHL-HAPMAP:HapMap-CEU");
<span style="font-style: italic;">#my $population = $population_adaptor->fetch_by_name("Europe");
</span><span style="font-style: italic;">
</span>foreach my $variation_feature (@{$variation->get_all_VariationFeatures()}) {
    print $variation_feature->seq_region_name(),':', $variation_feature->seq_region_start(), '-', $variation_feature->seq_region_end(),"\n";

    my $ldFeatureContainerAdaptor = $registry->get_adaptor('human', 'variation', 'ldfeaturecontainer'); <span style="font-style: italic;">#get adaptor for LDFeatureContainer object
</span><span style="font-style: italic;">    </span>my $ldFeatureContainer = $ldFeatureContainerAdaptor->fetch_by_VariationFeature($variation_feature, $population);

    my $r_square_values = $ldFeatureContainer->get_all_r_square_values();
    foreach my $r_square_value (@{$r_square_values}){

        my $variation_feature_1 = $r_square_value->{variation1};
        my $variation1_name = $variation_feature_1->name();
        <span style="font-style: italic;">#$variation1
</span><span style="font-style: italic;">        </span>my $variation_feature_2 = $r_square_value->{variation2};
        my $variation2_name = $variation_feature_2->name();

        my $r2 = $r_square_value->{r2};

        print "variation1 = " , $variation1_name, "variation1_region_name = ", $variation1_name, " \n";
        print "variation2 = " , $variation2_name, "variation2_region_name = ", $variation2_name, " \n";
        print "r2 = " , $r2 , "\n\n";

    }
}

</font></pre>
                  <div><br>
                  </div>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <br>
                <fieldset class="mimeAttachmentHeader"></fieldset>
                <br>
                <pre wrap="">_______________________________________________
Dev mailing list    <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</pre>
              </blockquote>
              <br>
              <pre class="moz-signature" cols="72">-- 
Dr Emily Perry (Pritchard)
Ensembl Outreach Officer

European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge
CB10 1SD
UK </pre>
            </div>
            _______________________________________________<br>
            Dev mailing list    <a moz-do-not-send="true"
              href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
            Posting guidelines and subscribe/unsubscribe info: <a
              moz-do-not-send="true"
              href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
            Ensembl Blog: <a moz-do-not-send="true"
              href="http://www.ensembl.info/">http://www.ensembl.info/</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Dev mailing list    <a class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dr Emily Perry (Pritchard)
Ensembl Outreach Officer

European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge
CB10 1SD
UK </pre>
  </body>
</html>