RECETOX / galaxytools

Set of Galaxy tool wrappers developed at RECETOX
MIT License
13 stars 13 forks source link

matchms conversion: add MS-LIMA MSP style or make RIKEN style compliant with this #407

Closed hechth closed 12 months ago

hechth commented 1 year ago

The format either after converting to RIKEN should be readable by MS-Lima or we implement another option which is based on RIKEN but then makes additional changes.

wverastegui commented 1 year ago

!/bin/sh

filename=$1

sed -E "s,[[:space:]]+, ,g" $filename > $filename.tmp

grep -rl 'IONMODE' . | xargs sed '/IONMODE/d' $filename.tmp > $filename.tmp1 grep -rl 'CHARGE' . | xargs sed '/CHARGE/d' $filename.tmp1 > $filename.tmp2 grep -rl 'COMPOUND_NAME' . | xargs sed 's/COMPOUND_NAME/NAME/g' $filename.tmp2 > $filename.tmp3

mv $filename.tmp3 $filename rm -f $filename.tmp1 $filename.tmp2 $filename.tmp3 $filename.tmp