Import Particles: AssertionError: Could not find match when trying to find corresponding micrographs

Dear all,
I attempt to import particles coordinates (not stack.) from relion3.1.2.
The following output and error messages are reported at the end of the message.
I tried to use the star file as generated by relion . I tried to remove the path in the rlnMicrographName to keep just the micrograph name with the same error. There are particles for the ‘189-100_001.mrc’ micrograph in the star file.
Do you have any suggestion?

Thank you very much.

License is valid.

Running job on master node

[CPU: 67.7 MB]   Project P3 Job J63 Started

[CPU: 67.8 MB]   Master running v3.2.0, worker running v3.2.0

[CPU: 67.8 MB]   Running on lane default

[CPU: 67.8 MB]   Resources allocated: 

[CPU: 67.8 MB]     Worker:  headnode

[CPU: 67.8 MB]   --------------------------------------------------------------

[CPU: 67.8 MB]   Importing job module for job type import_particles...

[CPU: 207.1 MB]  Job ready to run

[CPU: 207.1 MB]  ***************************************************************

[CPU: 207.1 MB]  Importing particles from  /data/DATA/02-Aurelien/202104-V2arr-EMBL/Select/job264/

[CPU: 207.1 MB]  File extension is  star

[CPU: 207.1 MB]  Importing star file.

[CPU: 596.7 MB]  --------------------------------------------------------------

[CPU: 596.7 MB]  Loaded star file with 728141 items

[CPU: 596.7 MB]  Fields loaded from star file:  ['rlnOpticsGroupName', 'rlnOpticsGroup', 'rlnMtfFileName', 'rlnMicrographOriginalPixelSize', 'rlnVoltage', 'rlnSphericalAberration', 'rlnAmplitudeContrast', 'rlnImagePixelSize', 'rlnImageSize', 'rlnImageDimensionality', 'rlnAutopickFigureOfMerit', 'rlnMicrographName', 'rlnCoordinateX', 'rlnCoordinateY', 'rlnImageName', 'rlnCtfMaxResolution', 'rlnCtfFigureOfMerit', 'rlnDefocusU', 'rlnDefocusV', 'rlnDefocusAngle', 'rlnCtfBfactor', 'rlnCtfScalefactor', 'rlnPhaseShift', 'rlnAngleRot', 'rlnAngleTilt', 'rlnAnglePsi', 'rlnOriginXAngst', 'rlnOriginYAngst', 'rlnClassNumber', 'rlnNormCorrection', 'rlnLogLikeliContribution', 'rlnMaxValueProbDistribution', 'rlnNrOfSignificantSamples', 'rlnGroupName', 'rlnGroupNumber']

[CPU: 596.7 MB]  --------------------------------------------------------------

[CPU: 596.7 MB]  Compiling CTF information...

[CPU: 596.8 MB]  --------------------------------------------------------------

[CPU: 596.9 MB]  Compiling particle location information...

[CPU: 596.9 MB]    Attempting to find corresponding filenames in rlnMicrographName and connected input micrographs..

[CPU: 601.2 MB]    Example source micrograph filename: 

[CPU: 601.2 MB]       002491036604419363487_189-100_001_patch_aligned_doseweighted.mrc

[CPU: 601.2 MB]    Example query micrograph filename: 

[CPU: 601.2 MB]       189-100_001.mrc
[CPU: 601.6 MB]  Traceback (most recent call last):
  File "cryosparc_master/cryosparc_compute/", line 84, in
  File "/cm/shared/apps/cryosparc2/cryosparc2_master/cryosparc_compute/jobs/imports/", line 223, in run_import_particles
    assert qname in inv_index_source, "Could not find match for %s" % qname
AssertionError: Could not find match for 189-100_001.mrc

Hi @julienb,

You can use the parameters:
Remove leading UID in input micrograph path,
Length of input micrograph path prefix to cut,
Length of input micrograph path suffix to cut,
Length of rlnMicrographName path prefix to cut for query, and
Length of rlnMicrographName path suffix to cut for query
to match the micrograph filenames in rlnMicrographName to the filenames in cryoSPARC.

Looking at the output of the job, you can see what it’s trying to query:

Example source micrograph filename: 

Example query micrograph filename:

It looks like you can match them using the part that’s in common, 189-100_001
To do that, you’ll have to remove the UID (002491036604419363487_) part of the source filename, the _patch_aligned_doseweighted.mrc part of the source filename, and the .mrc part of the query filename.

Here’s what your parameters will look like (hover over each parameter to see it’s description):
Screen Shot 2021-05-12 at 11.27.27 AM


Dear Stephan,
Thank you for your nice explanation, I didn’t understand that up until now.