Get Germline variants from Biomart
1
0
Entering edit mode
3.8 years ago
Sharon ▴ 600

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 • 847 views
ADD COMMENT
1
Entering edit mode
3.8 years ago
Sharon ▴ 600

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

ADD COMMENT
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Thanks RamRS, done :)

ADD REPLY
0
Entering edit mode

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)
ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 3231 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6