How to use the ms2pip.ms2pip_tools.spectrum_output.write_spectronaut function in ms2pip

To help you get started, we’ve selected a few ms2pip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github compomics / ms2pip_c / ms2pip / ms2pipC.py View on Github external
if "msp" in out_formats:
                print("writing MSP file {}_predictions.msp...".format(output_filename))
                spectrum_output.write_msp(
                    all_preds, data, output_filename=output_filename
                )

            if "bibliospec" in out_formats:
                print("writing SSL/MS2 files...")
                spectrum_output.write_bibliospec(
                    all_preds, data, params, output_filename=output_filename
                )

            if "spectronaut" in out_formats:
                print("writing Spectronaut CSV files...")
                spectrum_output.write_spectronaut(
                    all_preds, data, params, output_filename=output_filename
                )

            if "csv" in out_formats:
                print("writing CSV {}_predictions.csv...".format(output_filename))
                all_preds.to_csv(
                    "{}_predictions.csv".format(output_filename), index=False
                )

            sys.stdout.write("done!\n")
        else:
            return all_preds