tfclass_predict.prediction_manager ================================== .. py:module:: tfclass_predict.prediction_manager Classes ------- .. autoapisummary:: tfclass_predict.prediction_manager.PredictionManager Functions --------- .. autoapisummary:: tfclass_predict.prediction_manager._generate_count_vectors Module Contents --------------- .. py:function:: _generate_count_vectors(predictions, sequence_indices, num_classes=NUM_CLASSES) Generates count vectors from prediction results. :param predictions: Aggregated predictions from Predictor.predict_bed_data() :param sequence_indices: Indices of each sequence in predictions. :param num_classes: Number of classes that were predicted. :return: Count vectors and prediction dictionary. .. py:class:: PredictionManager(bed_file, genome_file, res_dir, bert_model, tfclass_model) Prediction manager class. Coordinates the prediction for a single bed file. .. py:attribute:: iointerface .. py:attribute:: tokenizer .. py:attribute:: bed_data .. py:attribute:: predictor .. py:method:: _init_BERT(bert_model) Initalizes the BERT tokenizer. .. py:method:: _init_GPU() Initializes GPU usage and enables memory growth. .. py:method:: predict(subseq_length=15, batch_size=2000) Start the prediction. :param subseq_length: Length in which a read should be split into subsequences. :param batch_size: Number of intervals that should be processed in one batch. :return: Count vectors and prediction dictionary. .. py:method:: save_results() Saves the prediction results to disk.