nodes: 0, module; 1, function_definition; 2, function_name:readlist; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, comment:# Create and start threads; 9, for_statement; 10, for_statement; 11, expression_statement; 12, comment:# Create; 13, expression_statement; 14, comment:"""Sort the reads, and create lists to be used in creating sorted .fastq files"""; 15, call; 16, identifier:i; 17, call; 18, comment:# Send the threads to the appropriate destination function; 19, block; 20, identifier:sample; 21, attribute; 22, block; 23, call; 24, call; 25, identifier:printtime; 26, argument_list; 27, identifier:range; 28, argument_list; 29, expression_statement; 30, comment:# Set the daemon to true - something to do with thread management; 31, expression_statement; 32, comment:# Start the threading; 33, expression_statement; 34, attribute; 35, identifier:samples; 36, expression_statement; 37, attribute; 38, argument_list; 39, attribute; 40, argument_list; 41, string; 42, attribute; 43, attribute; 44, assignment; 45, call; 46, call; 47, identifier:self; 48, identifier:runmetadata; 49, call; 50, attribute; 51, identifier:join; 52, identifier:self; 53, identifier:fastqfilter; 54, string_content:Sorting reads; 55, identifier:self; 56, identifier:start; 57, identifier:self; 58, identifier:cpus; 59, identifier:threads; 60, call; 61, attribute; 62, argument_list; 63, attribute; 64, argument_list; 65, attribute; 66, argument_list; 67, identifier:self; 68, identifier:listqueue; 69, identifier:Thread; 70, argument_list; 71, identifier:threads; 72, identifier:setDaemon; 73, True; 74, identifier:threads; 75, identifier:start; 76, attribute; 77, identifier:put; 78, identifier:sample; 79, keyword_argument; 80, keyword_argument; 81, identifier:self; 82, identifier:listqueue; 83, identifier:target; 84, attribute; 85, identifier:args; 86, tuple; 87, identifier:self; 88, identifier:listread
code: def readlist(self):
          """Sort the reads, and create lists to be used in creating sorted .fastq files"""
          printtime('Sorting reads', self.start)
          # Create and start threads
          for i in range(self.cpus):
              # Send the threads to the appropriate destination function
              threads = Thread(target=self.listread, args=())
              # Set the daemon to true - something to do with thread management
              threads.setDaemon(True)
              # Start the threading
              threads.start()
          for sample in self.runmetadata.samples:
              self.listqueue.put(sample)
          self.listqueue.join()
          # Create
          self.fastqfilter()