Skip to content

Commit

Permalink
Add 'RetentionTimeMins' to MSP output
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfG authored Jun 22, 2019
1 parent f08bb73 commit 0a63fc9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ms2pip_tools/spectrum_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ def write_msp(all_preds_in, peprec_in, output_filename, write_mode='wt+'):

out.append('MS2PIP_ID="{}"'.format(spec_id))

out.append('\nNum peaks: {}\n'.format(numpeaks))
out.append('\nCharge: {}\n'.format(charge))

if add_rt:
out.append('RetentionTimeMins: {}\n'.format(peprec_sel[rt_index] * 60))

out.append('Num peaks: {}\n'.format(numpeaks))

lines = list(zip(
[row[mz_index] for row in preds],
Expand Down

0 comments on commit 0a63fc9

Please sign in to comment.