title: Extract a part of fasta sequence based on bp coordinates
body: <p>I have a huge fasta file, but I need to extract only a part of it, If I know the start and end base pair coordinate of my sequence. Also, it should be in fasta format with the length of 60 bp per line.This is my try, please let me know if looks OK and any suggestions to improve it are welcome.</p>
  
  <pre><code>from Bio import SeqIO
  
  inFile = open('full_chr.fa','r')
  fw=open("part.fa",'w')
  line_width = 60
  for record in SeqIO.parse(inFile,'fasta'):
      fw.write("&gt;" + record.id + "\n")
      fww = (str(record.seq[600130000:602000000]) + '\n')
      for i in xrange(0,len(fww),line_width):
          fw.write(str(fww[i:i+line_width]) + '\n')
  fw.close()
  </code></pre>