original_docstring: The main function. Will ask for username and password to download from
      JGI. Also define the URLs to the XML file trees from JGI.
docstring: The main function. Will ask for username and password to download from
  JGI. Also define the URLs to the XML file trees from JGI.
docstring_tokens: The main function . Will ask for username and password to download from JGI . Also define the URLs to the XML file trees from JGI .
code: def main():
      """The main function. Will ask for username and password to download from
      JGI. Also define the URLs to the XML file trees from JGI."""
      #   Get the user name and password
      username = raw_input('Username for JGI: ')
      password = getpass.getpass('Password for JGI: ')
      #   The three XML files we want to download
      xml_files = [
          'http://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=GlymaxAtlaPlate2',
          'http://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=GlymaxAtlaPlate3',
          'http://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=GlymaxAtlaPlate6'
          ]
      #   The filename filter we apply is the filename must have 'anqrpt' in it.
      #   This filters down to the 'QC Filtered Raw Data' set
      fname_flt = 'anqrpt'
      #   Then, we log on and save the cookie file
      cookie_file = jgi_login(username, password)
      #   Start saving the URLs to fetch
      to_fetch = []
      for x in xml_files:
          to_fetch += parse_xml(x, cookie_file, fname_flt)
      #   Then, we'll download them all
      download_files(to_fetch, cookie_file)
      #   Clean up the cookie file
      os.remove(cookie_file.name)
      return
code_tokens: def main ( ) : username = raw_input ( 'Username for JGI: ' ) password = getpass . getpass ( 'Password for JGI: ' ) xml_files = [ 'http://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=GlymaxAtlaPlate2' , 'http://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=GlymaxAtlaPlate3' , 'http://genome.jgi.doe.gov/ext-api/downloads/get-directory?organism=GlymaxAtlaPlate6' ] fname_flt = 'anqrpt' cookie_file = jgi_login ( username , password ) to_fetch = [ ] for x in xml_files : to_fetch += parse_xml ( x , cookie_file , fname_flt ) download_files ( to_fetch , cookie_file ) os . remove ( cookie_file . name ) return
short_docstring: The main function.
short_docstring_tokens: The main function .
comment: """The main function. Will ask for username and password to download from
      JGI. Also define the URLs to the XML file trees from JGI."""$SEP$#   Get the user name and password$SEP$#   The three XML files we want to download$SEP$#   The filename filter we apply is the filename must have 'anqrpt' in it.$SEP$#   This filters down to the 'QC Filtered Raw Data' set$SEP$#   Then, we log on and save the cookie file$SEP$#   Start saving the URLs to fetch$SEP$#   Then, we'll download them all$SEP$#   Clean up the cookie file