deepbiop.fq =========== .. py:module:: deepbiop.fq Classes ------- .. autoapisummary:: deepbiop.fq.EncoderOption deepbiop.fq.FastqDataset deepbiop.fq.FastqIterator deepbiop.fq.FastqRecord deepbiop.fq.ParquetEncoder deepbiop.fq.Predict deepbiop.fq.RecordData Functions --------- .. autoapisummary:: deepbiop.fq.convert_multiple_fqs_to_one_fq deepbiop.fq.encode_fq_path_to_parquet deepbiop.fq.encode_fq_path_to_parquet_chunk deepbiop.fq.encode_fq_paths_to_parquet deepbiop.fq.encode_qual deepbiop.fq.fastq_to_fasta deepbiop.fq.get_label_region deepbiop.fq.load_predicts_from_batch_pt deepbiop.fq.load_predicts_from_batch_pts deepbiop.fq.select_record_from_fq deepbiop.fq.select_record_from_fq_by_random deepbiop.fq.test_predicts deepbiop.fq.write_fq deepbiop.fq.write_fq_parallel Module Contents --------------- .. py:class:: EncoderOption .. py:property:: qual_offset :type: int .. py:property:: bases :type: list[int] .. py:property:: threads :type: int .. py:class:: FastqDataset .. py:method:: __len__() .. py:method:: __getitem__(idx) .. py:method:: __iter__() .. py:method:: from_file(file_path, chunk_size) :staticmethod: .. py:method:: get_stats() .. py:method:: get_records(start, end) .. py:method:: get_records_indexed(start, end) .. py:method:: get_records_sequential(start, end) .. py:class:: FastqIterator .. py:method:: __iter__() .. py:method:: __next__() .. py:class:: FastqRecord .. py:property:: header :type: str .. py:property:: sequence :type: str .. py:property:: quality :type: str .. py:method:: __repr__() .. py:class:: ParquetEncoder .. py:class:: Predict A struct to store the prediction result. .. py:property:: prediction :type: list[int] .. py:property:: seq :type: str .. py:property:: id :type: str .. py:property:: is_truncated :type: bool .. py:property:: qual :type: str | None .. py:method:: __repr__() .. py:method:: prediction_region() Get the prediction region. .. py:method:: smooth_prediction(window_size) Get the smooth prediction region. .. py:method:: smooth_label(window_size) Get the smooth label. .. py:method:: smooth_and_select_intervals(smooth_window_size, min_interval_size, append_interval_number) Smooth and select intervals. .. py:method:: seq_len() Get the sequence length. .. py:method:: qual_array() Get the quality score array. .. py:method:: show_info(smooth_interval, text_width = None) Show the information of the prediction. .. py:method:: __getstate__() .. py:method:: __setstate__(state) .. py:class:: RecordData .. py:property:: id :type: str .. py:property:: seq :type: str .. py:property:: qual :type: str .. py:function:: convert_multiple_fqs_to_one_fq(paths, result_path, parallel) .. py:function:: encode_fq_path_to_parquet(fq_path, bases, qual_offset, result_path = None) .. py:function:: encode_fq_path_to_parquet_chunk(fq_path, chunk_size, parallel, bases, qual_offset) .. py:function:: encode_fq_paths_to_parquet(fq_path, bases, qual_offset) .. py:function:: encode_qual(qual, qual_offset) Convert ASCII quality to Phred score for Phred+33 encoding. .. py:function:: fastq_to_fasta(fastq_path, fasta_path) .. py:function:: get_label_region(labels) .. py:function:: load_predicts_from_batch_pt(pt_path, ignore_label, id_table) .. py:function:: load_predicts_from_batch_pts(pt_path, ignore_label, id_table, max_predicts = None) .. py:function:: select_record_from_fq(selected_reads, fq, output) .. py:function:: select_record_from_fq_by_random(fq, number, output) .. py:function:: test_predicts(predicts) .. py:function:: write_fq(records_data, file_path = None) .. py:function:: write_fq_parallel(records_data, file_path, threads)