Thanks so much for the information on the use of that filter.  I could
extract the synonymous SNPs that I needed. Do you know if there is any
difference between using single quotes (') and double quotes (") for the
labels?

Would it be safe to assume that the SNPs that are extracted using the
filter value 'NON_SYNONYMOUS_CODING'  would be all different from the SNPs
that are extracted using the filter value 'SYNONYMOUS_CODING' ?
When I listed the possible values for 'consequence_type_tv', I got one of
them labeled "SYNONYMOUS_CODING&NON_SYNONYMOUS_CODING"   Do you know by
chance the meaning of this type of SNP? or do you know where to find
documentation about it?

I'm trying to extract SNPs that are not "UPSTREAM", so do you know how to
write negation condition in the getBM command or more complex expressions
with negation, patterns (etc)?

Thanks,

Adriana

On Mon, Nov 14, 2011 at 12:44 PM, Valerie Obenchain <vobencha@fhcrc.org>wrote:

> On 11/14/2011 12:16 AM, Xavier de Pedro wrote:
>
>> As far as I remember, only available since R 2.14.
>> Cheers
>> Xavier
>>
>>
> Yes, that is correct. You'll need R-2.14 for VariantAnnotation.
>
> To find the locations of your variant with biomaRt you could try
> 'consequence_type_tv' as the attribute then filter on the value you want
> with 'consequence_type'.
>
> ## Here we select a group of snps from chr8:
> snps_all<- getBM(c('refsnp_id','allele','**chrom_start','chrom_strand',
> 'consequence_type_tv', 'set_description', 'set_name'),
>                         filters = c('chr_name','chrom_start','**
> chrom_end'),
>                         values = list(8,148350,158612),
>                         mart = snpmart)
>
> ## List the possible values for 'consequence_type_tv':
> > unique(snps_all$consequence_**type_tv)
>  [1] "INTRONIC"
>  [2] "DOWNSTREAM"
>  [3] "SYNONYMOUS_CODING"
>  [4] "WITHIN_NON_CODING_GENE"
>  [5] "NON_SYNONYMOUS_CODING"
>  [6] "UPSTREAM"
>  [7] "WITHIN_NON_CODING_GENE&**INTRONIC&SPLICE_SITE"
>  [8] "WITHIN_NON_CODING_GENE&**INTRONIC"
>  [9] "WITHIN_NON_CODING_GENE&**SPLICE_SITE"
> [10] ""
>
> ## Select only nonsynonymous coding snps:
> snps_nsc <- getBM(c('refsnp_id','allele','**chrom_start','chrom_strand',
> 'consequence_type_tv', 'set_description', 'set_name'),
>                         filters = c('chr_name','chrom_start','**chrom_end',
> 'consequence_type'),
>                         values = list(8,148350,158612,
> 'NON_SYNONYMOUS_CODING'),
>                         mart = snpmart)
>
> Valerie
>
>  On 11/11/11 18:16, Adriana Munoz wrote:
>>
>>> Hi Valerie,
>>>
>>> Thanks for the information.  I used the filter you mentioned and it
>>> works.
>>>  I'd like to try the Variant Annotation package that you mentioned to
>>> get where my variant is located (coding, non-coding, utr, etc.) , too,
>>> but
>>> I got the following error message in my Mac:
>>> "Warning message:
>>> In getDependencies(pkgs, dependencies, available, lib) :
>>>   package ‘VariantAnnotation’ is not available (for R version 2.13.2)"
>>>
>>> Then, I tried loading the package in Windows that has R version 2.12.,
>>> but
>>> I  the following error message:
>>> "Warning message:
>>> In getDependencies(pkgs, dependencies, available, lib) :
>>>   package ‘VariantAnnotation’ is not available"
>>>
>>> May I ask you if you know by chance  what version of R you were running
>>> for
>>> the Variant Annotation package? or do you know of any attributes and
>>> filters in Biomart to get where my variant is located (coding,
>>> non-coding,
>>> utr, etc.)?
>>>
>>> Thanks,
>>>
>>> Adriana
>>>
>>> On Tue, Nov 8, 2011 at 7:37 PM, Valerie Obenchain<vobencha@fhcrc.org>**
>>> wrote:
>>>
>>>  Hi Adriana,
>>>>
>>>> I believe the filter you want is consequence_type. Take a look at the
>>>> filters available to you with,
>>>>
>>>>    listFilters(snpmart)
>>>>
>>>> You may also want to take a look at the VariantAnnotation package. There
>>>> are functions
>>>>
>>>>    ?locateVariants
>>>>    ?predictCoding
>>>>
>>>> that can tell you where your variant is located (coding, non-coding,
>>>> utr,
>>>> etc.) and provide the amino acid coding change is for the non-synonymous
>>>> variants. Recently SIFT and PolyPhen scores have been made available
>>>> through db packages
>>>> SIFT.Hsapiens.dbSNP132 and PolyPhen.Hsapiens.dbSNP131.
>>>>
>>>> Valerie
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 11/02/2011 07:33 AM, Adriana Munoz wrote:
>>>>
>>>>  Hello,
>>>>>>
>>>>>> I'd like to ask you if there is an attribute to extract SNP function
>>>>>> information from variation datasets in biomaRt such as synonymous,
>>>>>> nonsynonymous, etc and
>>>>>>
>>>>>> a related filter.
>>>>>>
>>>>>> I'm using the following rcode:
>>>>>>
>>>>>>  snpmart = useMart("snp", dataset="hsapiens_snp")
>>>>>
>>>>>  Any help will be appreciated.
>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Adriana
>>>>>>
>>>>>>
>>>>>>         [[alternative HTML version deleted]]
>>>>>>
>>>>>>
>>
>

	[[alternative HTML version deleted]]

