This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Entrez to coordinates / BED

Hi,

I have a list of genes from RNASeq with their Entrez ID's.

Is there a simple way / tool to obtain their coordinates in txt or BED file?

Thank you very much

genome gene rna-seq

2 answers

Using NCBI Entrezdirect.You can get various level of detail.

$ efetch -db gene -id "1050" -format native

1. CEBPA
Official Symbol: CEBPA and Name: CCAAT enhancer binding protein alpha [Homo sapiens (human)]
Other Aliases: C/EBP-alpha, CEBP
Other Designations: CCAAT/enhancer-binding protein alpha; CCAAT/enhancer binding protein (C/EBP), alpha
Chromosome: 19; Location: 19q13.11
Annotation: Chromosome 19 NC_000019.10 (33299934..33302564, complement)
MIM: 116897
ID: 1050

OR

$ efetch -db gene -id "1050" -format tabular
tax_id  Org_name        GeneID  CurrentID       Status  Symbol  Aliases description     other_designations      map_location    chromosome      genomic_nucleotide_accession.version   start_position_on_the_genomic_accession end_position_on_the_genomic_accession   orientation     exon_count      OMIM
9606    Homo sapiens    1050    0       live    CEBPA   C/EBP-alpha, CEBP       CCAAT enhancer binding protein alpha    CCAAT/enhancer-binding protein alpha|CCAAT/enhancer binding protein (C/EBP), alpha     19q13.11        19      NC_000019.10    33299934        33302564        minus   1       116897

OR

$ efetch -db gene -id "1050" -format docsum | xtract -pattern GenomicInfo -element AssemblyAccVer,ChrAccVer,ChrStart,ChrStop
NC_000019.10    33302563        33299933

Here is a solution in R using the Bioconductor package biomaRt.

Output:

EntrezID ensembl_gene_id hgnc_symbol chromosome_name start_position end_position
1050 ENSG00000245848       CEBPA              19       33299934     33302534
2623 ENSG00000102145       GATA1               X       48786562     48794311
6688 ENSG00000066336        SPI1              11       47354860     47378576

Log in to answer this question.