Answers.Body: <p><em>Answer from @ATpoint, converted from comment:</em></p>
  <p>You need to extract the TSS of all transcripts of that gene, not the gene borders. Query biomaRt for that gene, then set options to extract all transcripts, then get the sequence for the TSS coordinates of those (with a window).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-05T08:58:47.560Z
Answers.LastActivityDate: 2021-08-05T08:58:47.560Z
Answers.UserDisplayName: gringer
Body: <p>I'd like to perform a motif analysis of all promoter regions of the gene ENSMUSG00000020538 in mus musculus.
  To do so, I wanted to use Biomart :</p>
  <pre><code>library('biomaRt')
  mart &lt;- useMart(&quot;ensembl&quot;)
  mart &lt;- useDataset(&quot;mmusculus_gene_ensembl&quot;, mart = mart)
  all.genes &lt;- getSequence(id = 'ENSMUSG00000020538', 
                           type=&quot;ensembl_gene_id&quot;,
                           seqType=&quot;coding_gene_flank&quot;,
                           upstream=100, 
                           mart=mart)
  </code></pre>
  <p>But this provide me only the flanking region of the sepcified gene, not all its promoter regions. How could I do ?</p>
  
Tags: <ensembl><biomart>
Title: Getting all promoters of a specific gene
ThreadText: # Getting all promoters of a specific gene
  
  (Asked by: username_0 on 2021-08-03)
  
  I'd like to perform a motif analysis of all promoter regions of the gene ENSMUSG00000020538 in mus musculus.
  To do so, I wanted to use Biomart :
  
  ```
  library('biomaRt')
  mart <- useMart("ensembl")
  mart <- useDataset("mmusculus_gene_ensembl", mart = mart)
  all.genes <- getSequence(id = 'ENSMUSG00000020538', 
                           type="ensembl_gene_id",
                           seqType="coding_gene_flank",
                           upstream=100, 
                           mart=mart)
  
  ```
  
  But this provide me only the flanking region of the sepcified gene, not all its promoter regions. How could I do ?
  
  **Tags:** ensembl, biomart
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-05. Score: 0
  
  *Answer from @ATpoint, converted from comment:*
  
  You need to extract the TSS of all transcripts of that gene, not the gene borders. Query biomaRt for that gene, then set options to extract all transcripts, then get the sequence for the TSS coordinates of those (with a window).
  
  
  ---
  
  