How to use the ms2pip.ms2pip_tools.spectrum_output.write_bibliospec 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 / fasta2speclib / fasta2speclib.py View on Github external
output_filename="{}".format(params['output_filename']),
                write_mode=write_mode,
            )

        if 'mgf' in params['output_filetype']:
            logging.info("Writing MGF file")
            spectrum_output.write_mgf(
                all_preds,
                peprec=peprec_batch,
                output_filename="{}".format(params['output_filename']),
                write_mode=write_mode
            )

        if 'bibliospec' in params['output_filetype']:
            logging.info("Writing BiblioSpec SSL and MS2 files")
            spectrum_output.write_bibliospec(
                all_preds,
                peprec_batch,
                ms2pip_params,
                output_filename="{}".format(params['output_filename']),
                write_mode=write_mode
            )

        if 'spectronaut' in params['output_filetype']:
            logging.info("Writing Spectronaut CSV file")
            spectrum_output.write_spectronaut(
                all_preds,
                peprec_batch,
                ms2pip_params,
                output_filename="{}".format(params['output_filename']),
                write_mode=write_mode
            )
github compomics / ms2pip_c / ms2pip / ms2pipC.py View on Github external
if not return_results:
            if "mgf" in out_formats:
                print("writing MGF file {}_predictions.mgf...".format(output_filename))
                spectrum_output.write_mgf(
                    all_preds, peprec=data, output_filename=output_filename
                )

            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")