<jupyter_start><jupyter_text>Debug the real spectra 2So it doesn't work well with real data, so having taken out one example of real data, the sequence isHybrid```DLQTLALLL```Hybrid:```DLQTLALNAAR```Non-Hybrid: ```QVEQLELGGSPG```so toy with the tool until we find out whats wrong  Load params and run<jupyter_code>import os
import sys
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
    sys.path.append(module_path)
module_path = os.path.abspath(os.path.join('../..'))
if module_path not in sys.path:
    sys.path.append(module_path)
    
from src import runner
    
specPath = '/Users/zacharymcgrath/Desktop/nod2 data/single2/'
fastaPath = '/Users/zacharymcgrath/Desktop/nod2 data/filteredNOD2.fasta'
outputDir = '/Users/zacharymcgrath/Desktop/Experiment output/singleReal/'
minPep = 3
maxPep = 30
tolerance = 20
relative_abundance_filter = 0.0
precursor_tolerance = 3
peak_filter = 25
verbose = True
scoringAlg = 'ion'
params = {
    'spectra_folder': specPath,
    'database_file': fastaPath,
    'output_dir': outputDir,
    'min_peptide_len': minPep,
    'max_peptide_len': maxPep,
    'tolerance': tolerance,
    'precursor_tolerance': precursor_tolerance,
    'peak_filter': peak_filter, 
    'relative_abundance_filter': relative_abundance_filter,
    'verbose': verbose, 
    'scoring_alg': scoringAlg, 
    'DEBUG': True, 
    'cores': 1, 
    'truth_set': '', 
    'digest': '', 
    'fall_off': None, 
    'n': 5
}
%%time
runner.run(params)<jupyter_output>Loading database...
Done
Loading spectra...
Done
On batch 1/1
On protein 280/280 [100%]
Sorting the set of protein masses...
Done
Creating alignment for spectrum 3/3 [133%]
Finished search. Writting results to /Users/zacharymcgrath/Desktop/Experiment output/singleReal/...
Could not make an alignment for 0/3 spectra (0%)
CPU times: user 23.4 s, sys: 609 ms, total: 24 s
Wall time: 24 s<jupyter_text>Load and read results<jupyter_code>import pandas as pd

outputFile = '/Users/zacharymcgrath/Desktop/Experiment output/singleReal/summary.tsv'
hybridOutputFile = '/Users/zacharymcgrath/Desktop/Experiment output/singleReal/hybrid_summary.tsv'
df = pd.read_csv(outputFile, sep='\t')
hdf = pd.read_csv(hybridOutputFile, sep='\t')
hdf.head(10)
df.head(10)
import json

s = json.load(open('/Users/zacharymcgrath/Desktop/Experiment output/singleReal/summary.json', 'r'))
for k, v in s.items():
    for a in v['alignments']:
        print(f'{a["sequence"]}: {a["total_score"]}, {a["b_score"]}, {a["y_score"]}')<jupyter_output>LATALTSPLI: 7, 4, 3
LATALTSPLL: 7, 4, 3
LATALTSPIL: 7, 4, 3
LATALTSPII: 7, 4, 3
DLQTLALII: 7.0, 6, 2
DLQTLALIL: 7.0, 6, 2
ALTITTGPLL: 7, 4, 3
ALTITTLGPI: 6, 3, 3
ALTITTPGIL: 6.0, 4, 3
ALTITTPGLL: 6.0, 4, 3
ALTITTGPII: 6.0, 4, 3
ALTITTGPIL: 6.0, 4, 3
ITALAPSTLL: 6, 4, 2
ALTITTIAVP: 5.5, 3, 3
ALTITTLAVP: 5.5, 3, 3
ALTITTLAPV: 5.5, 3, 3
TLAITAPSIL: 5.5, 5, 3
TLAITAPSLL: 5.5, 5, 3
TLAITAPSII: 5.5, 5, 3
TLAITASPLI: 5.5, 5, 3
ITALATSPLL: 5.5, 5, 3
TLALATSPLL: 5.5, 5, 3
TLAITASPLL: 5.5, 5, 3
TLAITASPIL: 5.5, 5, 3
LLQESALIL: 5.0, 4, 2
LLQESALII: 5.0, 4, 2
ALTITTIPGL: 5.0, 3, 3
ALTITTLPGI: 5.0, 3, 3
ALTITTLPGL: 5.0, 3, 3
ALTITTIGPL: 5.0, 3, 3
ALTITTIPGI: 5.0, 3, 3
ALTITTLGPL: 5.0, 3, 3
SIQVVDILL: 5.0, 4, 2
SIQVVDILI: 5.0, 4, 2
ITALAPSTLI: 5.0, 4, 2
ITALAPSTII: 5.0, 4, 2
ITALAPSTIL: 5.0, 4, 2
LASGVVDLIL: 5.0, 4, 2
LASGVVDLII: 5.0, 4, 2
LATLATSPLL: 5.0, 5, 3
ALTLATSPLL: 5.0, 5, 3
IIDDKGILI: 4.5, 4, 2
IIDDKGILL: 4.5, 4, 2
LATALTPSII: 4.5, 4, 3
LATALTPSIL: 4.5, 4, 3
LATALTPSLL: 4.5, 4, 3
VVEKADILL:[...]
{'fraction_non_alphanumeric': 0.1478014184397163, 'fraction_numerical': 0.06439716312056738, 'mean_word_length': 4.262686567164179, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '129246', 'license': 'MIT', 'n_tokens_mistral': 1782, 'n_tokens_neox': 1519, 'n_words': 401, 'path': 'sandbox/jupyter notebooks/Debug Real Spectra 2.ipynb', 'repo_name': 'jamessdixon/hypedsearch', 'size': '3525'}