INNER CODE UNIT · Python

main

pymzml/pymzML · example_scripts/_playground2.py:19

def main(input_files, shuffle, suffix=""):
    print(suffix)
    output_name = f"failing_spectra{suffix}.txt"
    with open(output_name, "wt") as fout:
        for file in input_files:
            print(file)
            fails = 0
            fail_info = []
            reader = pymzml.run.Reader(file)
            indices = list(range(1, reader.get_spectrum_count()))
            if shuffle:
                random.seed(a=1570010244.2805517)
                random.shuffle(indices)
                m = hashlib.md5()
                m.update(pickle.dumps(indices))
                md5_digest = m.hexdigest()
                print(f"Shuffled indices md5: {md5_digest}")
                # exit(1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…