3DVA plot raw values

Dear cryosparc team,
when one performs 3DVA, cryosparc gives you nice plots, where the particles of two components are plotted against each other, according to their “variability”.
Is it possible to extract or get the raw data values of these plots, to plot for example only particles of one component as a histogram (in another software) e.g.?

Many thanks in advance.
Best,

Eike

Hi @Eike ,

Glad that our 3DVA job is coming in handy! You can indeed extract and manipulate the raw data for each of the components. The raw data is found in the ‘{…}_particles.cs’ cryoSPARC file that’s located in the 3DVA job folder. You can import this file via a Dataset() object through our interactive Python shell (or a separate script/notebook) and then extract the reaction coordinates for each particle using the components_mode_X/value key. Here’s an example script that will extract two of the components as NumPy arrays, which you can then plot/export as necessary:

#Launch cryoSPARC’s interactive Python shell
cryosparcm icli

# … in the shell

#1. Import necessary modules
from cryosparc_compute import dataset

#2. Load particles
# Modify as necessary
cs_file_path = ‘./P167/J42/cryosparc_P167_J42_particles.cs’ 
particle_dataset = dataset.Dataset()
particle_dataset.from_file(cs_file_path)

#3. Extract components
c0 = particle_dataset.data['components_mode_0/value']  #(N,) numpy array
c1 = particle_dataset.data['components_mode_1/value']  #(N,) numpy array
#… etc.

You can find more information about .cs files in our ‘Manipulating .cs Files’ tutorial.

Hope that helps!
Valentin

1 Like

Hey Valentin,

sorry for the late response.
It really helped a lot and it worked well :slight_smile: !

Many thanks!
Best,

Eike

1 Like