FSc curve in xml format

7 posts / 0 new
Last post
Jobi
FSc curve in xml format

Dear All,

Is there anyway to write the FSC output in xml format.

Or any other third party software that can convert the text file output from Cistem to xml format.

Thank you.

Jobi

timgrant
I think the following bash

I think the following bash script will do the conversion.  You need to edit out everything but the FSC you want, and also remove all the comments from the file, save this as a new file, then give it as the first argument to the script, with the desired output.xml as the output.  This will use the partFSC column :-

-------------------------------
#!/bin/bash
readarray all_lines < $1
one=1
echo '<fsc title="" xaxis="Resolution (A-1)" yaxis="Correlation Coefficient">' > $2
echo '  <coordinate>' >> $2
echo '    <x>0.0</x>' >> $2
echo '    <y>1.0</y>' >> $2
echo '  </coordinate>' >> $2
## now loop through the above array
for i in "${all_lines[@]}"
do
   resolution=`echo $i | awk '{print $2}'`
   spatial_freq=`calc -p 1/$resolution | cut -d'~' -f2`
   fsc=`echo $i | awk '{print $5}'`
echo '  <coordinate>' >> $2
echo "    <x>$spatial_freq</x>" >> $2
echo "    <y>$fsc</y>" >> $2
echo "  </coordinate>" >> $2
done
echo '</fsc>' >> $2

Jobi
xml format

Dear Tim,

The output is given below. It is not giving a proper output. Can you please check

I am using the following command " script input.txt output.xml"

<fsc title="" xaxis="Resolution (A-1)" yaxis="Correlation Coefficient">
  <coordinate>
    <x>0.0</x>
    <y>1.0</y>
  </coordinate>
  <coordinate>
    <x>calc -p 1/</x>
    <y></y>
  </coordinate>
</fsc>

 

timgrant
do you have calc installed?

do you have calc installed?

if you just type calc in the terminal does it work?

Jobi
Calc not installed

if you just type calc in the terminal does it work?

It says command not found

 

Jobi
managed to convert

Managed to convert using e2procxml.py program

timgrant
Ok, for future reference - I

Ok, for future reference - I think the above script should work if you install calc.

Log in or register to post comments