view msp_out.sh @ 5:720958b09af4 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit ad0d51ab950021624c84daab1809e1aa60014cfb
author recetox
date Fri, 12 Dec 2025 10:47:06 +0000
parents ef51824f6d04
children
line wrap: on
line source

#!/bin/sh

molname=`sed -n '1{p;q}'  molname.txt`
kword=$(grep 'NPOINTS' result.jdx)
num_peaks=$(echo "$kword" | sed 's/^[^=]*=//')
echo `pwd`
sed -n '/PEAK/,/END/{/PEAK/!{/END/!p}}' result.jdx > temp.dat
awk '{print $1, $2}' temp.dat > tempa.dat
sed "1s/^/NAME: $molname\nNum Peaks: $num_peaks\n/" tempa.dat >> simulated_spectra.msp
sed -i '$a\ ' simulated_spectra.msp
rm temp.dat tempa.dat