#NEWLINE# def get_sequences( self ) : #NEWLINE# #INDENT# '\n        Total number of records from the input set to be retrieved, up to a maximum\n        of 10,000. Optionally, for a large set the value of retstart can be iterated\n        while holding retmax constant, thereby downloading the entire set in batches\n        of size retmax.\n        \n        http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch\n        \n        ' #NEWLINE# batch_size = self . retmax_efetch #NEWLINE# count = self . count #NEWLINE# uids_list = self . ids #NEWLINE# self . logger . info ( ( 'Batch size for efetch action: %d' % batch_size ) ) #NEWLINE# self . logger . info ( ( 'Number of batches for efetch action: %d' % ( ( count / batch_size ) + 1 ) ) ) #NEWLINE# with open ( self . outname , 'w' ) as out : #NEWLINE# #INDENT# for start in range ( 0 , count , batch_size ) : #NEWLINE# #INDENT# end = min ( count , ( start + batch_size ) ) #NEWLINE# batch = uids_list [ start : end ] #NEWLINE# self . epost ( self . dbname , ',' . join ( batch ) ) #NEWLINE# mfasta = '' #NEWLINE# while ( not mfasta ) : #NEWLINE# #INDENT# self . logger . info ( ( 'retrieving batch %d' % ( ( start / batch_size ) + 1 ) ) ) #NEWLINE# mfasta = self . efetch ( self . dbname , self . query_key , self . webenv ) #NEWLINE# #UNINDENT# out . write ( ( mfasta + '\n' ) )