text: user10309: I'm doing an exercise that asks for two files:
  
  Input 1: A target file (.bed format) contains multiple regions from
  chr7:40000000-50000000 of human reference genome GRCh37 (hg19)
  Input 2: Refseq exon list file (.bed format) for all human coding genes
  (hg19 position)
  
  The final goal is:
  For all genes located in chr7:40000000-50000000, get the summary statistics of the target file coverage. (For each gene, get the fraction of exonic bases that was covered by the target file).
  
  I believe what they refer in this exercise is that the target file
  should be something like the whole chr sizes of hg19 hg19.chr.sizes and refseq_exon_list the list of exons from reqseq database. Both can be
  downloaded from tools like table browser .Is that correct ?
  
  I'm not sure which files I should download here to perform this task.
  Once downloaded the file I believe what I need to do is to restrict
  the refseq_exon_list by the requested region and then perform
  coverage with something like bedtools. Something on those lines
  bedtools coverage -a hg19.chr.sizes -b reqseq_exon_list.
  
  
  Am i right here ? Any input is appreciated, thanks.
  
  user298: Based on the description in your question, I don't think this assumption is correct:
  
  I believe what they refer in this exercise is that the target file should be something like the whole chr sizes of hg19 hg19.chr.sizes [. . .]
  
  I understand that the question is asking you to simply produce a random selection of sub-regions from chromosome 7, all of which fall within the larger region 40000000-50000000. It can't be the list of chromosome sizes since, first of all, the question is asking you to get regions from chr17 only, and second because that just wouldn't make sense: only chr17 is relevant here, so the rest would be useless and, in any case, the length of the chromosome itself isn't helpful information.
  The idea here is to demonstrate that given a set of genomic regions and a list of start and end coordinates of exons, you can calculate how many of your exons overlap the target regions. Therefore, the steps to follow would be:
  
  Generate random intervals in the 40000000-50000000 range.
  Get the bed file for all human coding genes on hg19. You should indeed be able to download this from the UCSC genome browser, among other places.
  Use a tool, bedtools or build your own using awk, or anything else that takes your fancy and for each gene found in the chr7:40000000-50000000 range, calculate how many bases of its exons fall within your randomly chosen selection of regions.
  
  Of course, the best thing to do would be to ask your teacher to clarify.
  
original_text: 10309: <p>I'm doing an exercise that asks for two files:</p>
  <ul>
  <li>Input 1: <code>A target file</code> (.bed format) contains multiple regions from
  <code>chr7:40000000-50000000</code> of human reference genome GRCh37 (hg19)</li>
  <li>Input 2: <code>Refseq exon list file</code> (.bed format) for all human coding genes
  (hg19 position)</li>
  </ul>
  <p>The final goal is:</p>
  <p>For all genes located in <code>chr7:40000000-50000000</code>, get the summary statistics of the target file coverage. (For each gene, get the fraction of exonic bases that was covered by the target file).</p>
  <ul>
  <li><p>I believe what they refer in this exercise is that the target file
  should be something like the whole chr sizes of hg19 <code>hg19.chr.sizes</code> and <code>refseq_exon_list</code> the list of exons from reqseq database. Both can be
  downloaded from tools like <a href="https://genome.ucsc.edu/cgi-bin/hgTables?hgsid=1207958047_1HLrWSX8jM6O6nujrnQsrG0p1Da8" rel="nofollow noreferrer">table browser</a> .Is that correct ?</p>
  </li>
  <li><p>I'm not sure which files I should download here to perform this task.
  Once downloaded the file I believe what I need to do is to restrict
  the <code>refseq_exon_list</code> by the requested region and then perform
  coverage with something like <code>bedtools</code>. Something on those lines
  <code>bedtools coverage -a hg19.chr.sizes -b reqseq_exon_list</code>.</p>
  </li>
  </ul>
  <p>Am i right here ? Any input is appreciated, thanks.</p>
   298: <p>Based on the description in your question, I don't think this assumption is correct:</p>
  <blockquote>
  <p>I believe what they refer in this exercise is that the target file should be something like the whole chr sizes of hg19 hg19.chr.sizes [. . .]</p>
  </blockquote>
  <p>I understand that the question is asking you to simply produce a random selection of sub-regions from chromosome 7, all of which fall within the larger region 40000000-50000000. It can't be the list of chromosome sizes since, first of all, the question is asking you to get regions from chr17 only, and second because that just wouldn't make sense: only chr17 is relevant here, so the rest would be useless and, in any case, the length of the chromosome itself isn't helpful information.</p>
  <p>The idea here is to demonstrate that given a set of genomic regions and a list of start and end coordinates of exons, you can calculate how many of your exons overlap the target regions. Therefore, the steps to follow would be:</p>
  <ol>
  <li>Generate random intervals in the 40000000-50000000 range.</li>
  <li>Get the bed file for all human coding genes on hg19. You should indeed be able to download this from the UCSC genome browser, among other places.</li>
  <li>Use a tool, <code>bedtools</code> or build your own using <code>awk</code>, or anything else that takes your fancy and for each gene found in the chr7:40000000-50000000 range, calculate how many bases of its exons fall within your randomly chosen selection of regions.</li>
  </ol>
  <p>Of course, the best thing to do would be to ask your teacher to clarify.</p>
  