view msp_out.sh @ 2:6c118de4b735 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 934037d9bacdb22293792c3d7bca9d2d34b65af9
author recetox
date Tue, 16 Apr 2024 11:31:22 +0000
parents 0d9d72ef658f
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