title: Read FASTA into a dataframe and extract subsequences of FASTA file
body: <p>I have a small <em>fasta</em> file of DNA sequences which looks like this:</p>
  
  <pre><code>&gt;NM_000016 700 200 234
  ACATATTGGAGGCCGAAACAATGAGGCGTGATCAACTCAGTATATCAC
  
  &gt;NM_000775 700 124 236
  CTAACCTCTCCCAGTGTGGAACCTCTATCTCATGAGAAAGCTGGGATGAG
  
  &gt;NM_003820 700 111 222
  ATTTCCTCCTGCTGCCCGGGAGGTAACACCCTGGACCCCTGGAGTCTGCA
  </code></pre>
  
  <p>Questions:</p>
  
  <p>1) How can I read this fasta file into R as a dataframe where each row is a sequence record, the 1st column is the refseqID and the 2nd column is the sequence.</p>
  
  <p>2) How to extract subsequence at (start, end) location?</p>
  
  <pre><code>NM_000016 1  3 #"ACA"
  NM_000775 2  6 #"TAACC"
  NM_003820 3  5 #"TTC"
  </code></pre>