Answers.Body: <p>First I edited the Chromosome column of the bed file from ncbi, because it contained the accession number instead of the chromosome. Then I used the getfasta tool of the bedtools utility.</p>
  <p><code>bedtools getfasta -fi input_genome_file.fa -fo output.fa -bed bed_file</code></p>
  <p>The output contained the introns in the format I wanted.
  If anybody had a better way, feel free to post.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-16T18:00:22.310Z
Answers.Text: Hi @venkateshwar thank you for sharing this information. Could you just confirm that this is the answer to the question you posted (it looks like it)?
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-17T05:21:38.890Z
Answers.Text: @M__ Ok I will.
Answers.UserDisplayName: venkatesh war
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-16T13:17:28.990Z
Answers.LastActivityDate: 2023-01-16T13:17:28.990Z
Answers.UserDisplayName: venkatesh war
Body: <p>I was able to get the exons of a particular gene as a fasta file from the NCBI genome viewer. As for introns I only found a bed file that showed where the intron starts and ends, along with its direction. What tool do I use to get the exact sequence of these 11 introns using this bed file?
  And is there a more direct way?
  Thank you.</p>
  
Tags: <gene><reference-genome><bed>
Title: How to get a file with the introns of a gene?
ThreadText: # How to get a file with the introns of a gene?
  
  (Asked by: username_0 on 2023-01-16)
  
  I was able to get the exons of a particular gene as a fasta file from the NCBI genome viewer. As for introns I only found a bed file that showed where the intron starts and ends, along with its direction. What tool do I use to get the exact sequence of these 11 introns using this bed file?
  And is there a more direct way?
  Thank you.
  
  **Tags:** gene, reference-genome, bed
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-01-16. Score: 1
  
  First I edited the Chromosome column of the bed file from ncbi, because it contained the accession number instead of the chromosome. Then I used the getfasta tool of the bedtools utility.
  
  `bedtools getfasta -fi input_genome_file.fa -fo output.fa -bed bed_file`
  
  The output contained the introns in the format I wanted.
  If anybody had a better way, feel free to post.
  
  > **Comments:**
  > **username_1**: Hi @username_0 thank you for sharing this information. Could you just confirm that this is the answer to the question you posted (it looks like it)?  
  > **username_0**: @username_1 Ok I will.  
  
  ---
  
  