code: def sra(args):
      
      p = OptionParser(sra.__doc__)
  
      p.add_option("--nogzip", dest="nogzip",
                   default=False, action="store_true",
                   help="Do not gzip the FASTQ generated by fastq-dump")
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      term, = args
      if op.isfile(term):
          terms = [x.strip() for x in open(term)]
      else:
          terms = [term]
  
      for term in terms:
          srafile = download_srr_term(term)
          pf = srafile.split(".")[0]
          mkdir(pf)
          _opts = [srafile, "--paired", "--outdir={0}".format(pf)]
          if not opts.nogzip:
              _opts.append("--compress=gzip")
          fromsra(_opts)
docs: %prog sra [term|term.ids]
  
      Given an SRA run ID, fetch the corresponding .sra file from the sra-instant FTP.
      The term can also be a file containing list of SRR ids, one per line.
  
      Once downloaded, the SRA file is processed through `fastq-dump` to produce
      FASTQ formatted sequence files, which are gzipped by default.