Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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