Hi Andrea,<div><br></div><div>Q1:</div><div><br></div><div>We import the mappings of these variations from dbSNP. Normally dbSNP merge variations that share flanking sequence (unless they are of different classes) but that hasn't happened in this case. I'm not sure exactly why but it could have something to do with one of them having a quite short flanking sequence.<br>
<br></div><div>Q2:</div><div><br></div><div>If you create a new VariationFeature object, you should supply an associated Variation object in the constructor. Since you don't seem to do that in your code, you will just get an undef back. However, I think what you are trying to do is to get VF objects for variations that we have in our database. Then you shouldn't create new objects yourself but rather use the adaptor modules which will create the objects from the database with all associated data attached. </div>
<div>In your case, you should first create a slice that only covers the position you are interested in and then get all VFs on this slice. Like so:</div><div><br></div><div>  <font class="Apple-style-span" face="'courier new', monospace">my $slice = $slice_adaptor->fetch_by_region('1', 63268, 63268);</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> </font><span class="Apple-style-span" style="font-family: 'courier new', monospace; ">mv @vfs = @{$variation_feature_adaptor->fetch_all_by_Slice($slice)};</span></div>
<div><br></div><div>If there are multiple VFs at the same location, the fetch method will return all of them in a listref.</div><div><br></div><div>Best regards</div><div>/Pontus</div><div><br></div><div><br><div class="gmail_quote">
2011/2/17 Andrea Edwards <span dir="ltr"><<a href="mailto:edwardsa@cs.man.ac.uk">edwardsa@cs.man.ac.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Question 1<br>
=========<br>
<br>
The following 2 human variations in dbSNP have different flanking sequences and are represented by different variation entries in the variation table. The flanking sequence of the first SNP is longer than the second where the overlapping regions of the flanking sequences are the same<br>

-rs75478250 (vid = 18636645)<br>
-rs28664618 (vid = 9542974)<br>
<br>
Both of these variations have variation features affecting the locus 1:63268<br>
<br>
How is it possible that the 2 variations  can map to the same genome location? I presume it is because both variations share a common length of flanking sequence and this common region maps to the same genomic DNA. What length of the flanking sequence of a variation must match the genomic sequence for the variation to be mapped to that genome location?<br>

<br>
Question 2<br>
========<br>
<br>
I am have created a variation feature object for lots of SNPs and I am unable to get the underlying variation object. I get an error that the variation is undefined<br>
<br>
my $vf = Bio::EnsEMBL::Variation::VariationFeature->new(<br>
    -start => $pos,<br>
    -end => $pos,<br>
    -slice => $slice, # the variation must be attached to a slice<br>
    -allele_string => $allele, # the first allele should be the reference allele<br>
    -strand => 1,<br>
    -map_weight => 1,<br>
    -adaptor => $vfa, # we must attach a variation feature adap<br>
    -variation_name => 'newSNP',<br>
<br>
    );<br>
    $v = $vf->variation();<br>
    @synonyms = @{$v->get_all_synonyms()}; <====v is undefined<br>
<br>
I have tried this with the locus 1:63268 from above where 2 variations exist and I am unable to retrieve either of them. This raises this questions<br>
a) why can't i get the variation object?<br>
b) what happens where there is more than one variation feature entry in the database for the locus on which the variation feature object is created? Which variation feature's variation object would you return as the method does not return an array? E.g what variation would be returned for a variation feature created on locus 1:63268?<br>

<br>
<br>
thanks very much<br>
<br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
<a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
</blockquote></div><br></div>