salilab / PMI_analysis

2 stars 7 forks source link

run_extract_models_single_rmf.py fails with linkHierarchies error #12

Open grandrea opened 5 months ago

grandrea commented 5 months ago

Hello,

I am trying to extract models with run_extract_models_single_rmf.py after running run_analysis_trajectories. After specifying my cluster of interest and checking the .csv score files aren't empty, I get

WARNING Frame f5 saved to RMF file "A_models_clust1.rmf3" but no IMP objects were included - perhaps you forgot to call, for example, IMP.rmf.link_hierarchies() or IMP.rmf.add_hierarchies() first? WARNING Frame f6 saved to RMF file "A_models_clust1.rmf3" but no IMP objects were included - perhaps you forgot to call, for example, IMP.rmf.link_hierarchies() or IMP.rmf.add_hierarchies() first? WARNING Frame f7 saved to RMF file "A_models_clust1.rmf3" but no IMP objects were included - perhaps you forgot to call, for example, IMP.rmf.link_hierarchies() or IMP.rmf.add_hierarchies() first? WARNING Frame f8 saved to RMF file "A_models_clust1.rmf3" but no IMP objects were included - perhaps you forgot to call, for example, IMP.rmf.link_hierarchies() or IMP.rmf.add_hierarchies() first?

I am on imp-2.20. My command is

HA = AT.get_models_to_extract('selected_models_A_cluster1_detailed_random.csv')
HB = AT.get_models_to_extract('selected_models_B_cluster1_detailed_random.csv')

rmf_file_out_A = 'A_models_clust'+str(c)+'.rmf3'
rmf_file_out_B = 'B_models_clust'+str(c)+'.rmf3'

# Arguments for do_extract_models_single_rmf:
# HA :: Dataframe object from AT.get_models_to_extract()
# file_out :: The output rmf file
AT.do_extract_models_single_rmf(HA,
                            rmf_file_out_A, # RMF file outputted for Sample A
                            top_dir,        # Top directory containing the PMI output folders
                            analys_dir,     # Analysis directory to write RMF and score files
    scores_prefix = "A_models_clust"+str(c))  # Prefix for the scores file

Any idea? is this something that changed with rmf_slice and provenance in recent versions, or am I pointing to the wrong place for my rmfs? thanks!

benmwebb commented 5 months ago

WARNING Frame f5 saved to RMF file "A_models_clust1.rmf3" but no IMP objects were included - perhaps you forgot to call, for example, IMP.rmf.link_hierarchies() or IMP.rmf.add_hierarchies() first?

Right, IMP has warned for a while if you call a function like IMP.rmf.save_frame() without first linking IMP objects, as usually the intention here is to write some IMP data (e.g. a molecular hierarchy) to an RMF file: salilab/imp@32628b8afd0.

@iecheverria, if your intention here is to just read/write raw RMF frames and not transfer them to the IMP model, use the RMF functions directly, not the IMP functions, e.g. RMF's set_current_frame rather than IMP.rmf.load_frame, e.g. salilab/pmi@622f16e02f.