Mercurial > repos > recetox > qcxms_getres
annotate msp_out.sh @ 1:af8839475b43 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 55c0154b9b6d7f97eefebf92d43bd0c5442247a6
author | recetox |
---|---|
date | Tue, 21 May 2024 11:48:35 +0000 |
parents | ef51824f6d04 |
children |
rev | line source |
---|---|
0
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
1 #!/bin/sh |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
2 |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
3 molname=`sed -n '1{p;q}' molname.txt` |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
4 kword=$(grep 'NPOINTS' result.jdx) |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
5 num_peaks=$(echo "$kword" | sed 's/^[^=]*=//') |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
6 echo `pwd` |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
7 sed -n '/PEAK/,/END/{/PEAK/!{/END/!p}}' result.jdx > temp.dat |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
8 awk '{print $1, $2}' temp.dat > tempa.dat |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
9 sed "1s/^/NAME: $molname\nNum Peaks: $num_peaks\n/" tempa.dat >> simulated_spectra.msp |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
10 sed -i '$a\ ' simulated_spectra.msp |
ef51824f6d04
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/qcxms commit 4018b84dd3c735d16f488094f001a19e634fe1a2
recetox
parents:
diff
changeset
|
11 rm temp.dat tempa.dat |