<commit_before>from sequana.pacbio import BAMPacbio
from sequana import sequana_data

def test_pacbio():
    BAMPacbio(sequana_data("test_pacbio_subreads.bam"))<commit_msg>add tests for pacbio module<commit_after>from sequana.pacbio import BAMPacbio
from sequana import sequana_data
from easydev import TempFile

def test_pacbio():
    b = BAMPacbio(sequana_data("test_pacbio_subreads.bam"))
    assert len(b) == 8
    b.df
    assert b.nb_pass[1] == 8

    with TempFile() as fh:
        b.stride(fh.name, stride=2)

    with TempFile() as fh:
        b.filter_length(fh.name, threshold=500)

    b.hist_snr()
    b.hist_ZMW_subreads()

    b.hist_len()
    b.hist_GC()
    b.plot_GC_read_len()
    
{'fraction_non_alphanumeric': 0.10285714285714286, 'fraction_numerical': 0.01, 'mean_word_length': 3.7687074829931975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6051244', 'n_tokens_mistral': 281, 'n_tokens_neox': 260, 'n_words': 54}