view msp_out.sh @ 2:53dce0e49af7 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 68505a19637f8374cc5bde7e6b9370647a064ca9
author recetox
date Thu, 25 Jul 2024 14:27:08 +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