This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get Germline variants from Biomart

Hi Everyone

I am trying to get all genes that has gremlin variant from biomart using code:

SNPs <- getBM(attributes=c('ensembl_gene_id'), filters = 'germ_line_variation_source',values='with_validated_snp', mart = mygenome)

SNPs <- getBM(attributes=c('ensembl_gene_id'), filters = 'germ_line_variation_source',values=’SGRP’, mart = mygenome)

SNPs <- getBM(attributes=c('ensembl_gene_id'), filters = 'germ_line_variation_source',values=TRUE, mart = mygenome)

all the above fails. Although, something similar works with me for GO:

GO <- getBM(attributes=c('ensembl_gene_id'), filters = 'go', values ="GO:0006119", mart = mygenome)

Any hint how to use the snps filter?

Thanks

getbm filter

1 answer

Hi everyone

In case anyone else stuck at this like me, this works:

SNPs <- getBM(attributes=c('ensembl_gene_id', 'germ_line_variation_source'),filters = 'germ_line_variation_source',values='SGRP', mart = mygenome)

Thanks

Your query #2 in the question should work as well. I have a feeling the quotes interfere with the query. If you're copy-pasting from Microsoft products (or other word processors), ensure all quotes are simple single or double quotes (' and ") and not stylized quotes ( ’ ).

See the difference here:

## first line is your query, second line is mine
SNPs <- getBM(attributes=c('ensembl_gene_id'), filters = 'germ_line_variation_source',values=’SGRP’, mart = mygenome)
SNPs <- getBM(attributes=c('ensembl_gene_id'), filters = 'germ_line_variation_source',values='SGRP', mart = mygenome)

ensure all quotes are simple single or double quotes (' and ") and not stylized quotes ( ’ ).

Second that. Turn off "smart quotes and dashes" in Apple --> System Preferences --> Keyboard --> text, if you are using macOS.

I am using linux, and vim. :) Thanks genomax

Thank you for answering the question - it will be useful for future visitors. Please accept your own answer so the question is marked solved on the website. To do that, click on the green check mark on the left side of the answer:

Upvote|Bookmark|Accept

Thanks RamRS, done :)

Log in to answer this question.