diff msp_out.sh @ 0:ef51824f6d04 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
author recetox
date Fri, 08 Mar 2024 10:55:44 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/msp_out.sh	Fri Mar 08 10:55:44 2024 +0000
@@ -0,0 +1,11 @@
+#!/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
\ No newline at end of file