ArtiaX
ArtiaX copied to clipboard
Doesn't work correctly with Dynamo table
When I tried to use ArtiaX with dynamo, it didn't display the particle orientation properly. With the same dataset, converting to Relion4 format, then ArtiaX displayed the star file correctly. Can you check this?
Hi,
I have found the same issue: orientations in RELION look as expected, but the equivalent Dynamo table looks incorrect.
Attaching a small set of equivalent particles in RELION (v3.1) star and Dynamo tbl format, if that helps with troubleshooting: data1_tbl.txt data1_star.txt
This is with ChimeraX v1.8 and Artiax v0.4.7.
Let us know if you need more info and thanks in advance!
Best, Josh
Hi ArtiaX developer & Josh, I spent a bit of time to reverse what ArtiaX writes dynamo table to see the problem. ArtiaX swaps column 7 and 9 of dynamo table. Also, the angle in column 9 should multiply by -1 and add 180 to be correct visualized. Column 7 multiply by -1 and minus 180.
So I wrote a quick script to fix DynamoTable for visualization in ArtiaX below. Though it would be nice to get it fixed inside ArtiaX. Sorry the code doesn't format properly.
import numpy as np import sys
def modify_table(input_file, output_file): # Load the file as a NumPy array (space-separated values) data = np.loadtxt(input_file)
# Ensure column indices are within range
num_columns = data.shape[1]
if num_columns < 9:
raise ValueError("Input file must have at least 9 columns.")
# Swap columns 7 and 9 (convert to 0-based index)
data[:, [6, 8]] = data[:, [8, 6]]
# Modify the new column 9 (which was swapped from column 7)
data[:, 8] = data[:, 8] * -1 + 180
data[:, 6] = data[:, 6] * -1 - 180
# Save the modified data back to the output file
np.savetxt(output_file, data, fmt='%.6f', delimiter=' ')
if name == "main": if len(sys.argv) != 3: print("Usage: python modify_table_values.py input_file output_file") sys.exit(1)
input_file = sys.argv[1]
output_file = sys.argv[2]
modify_table(input_file, output_file)