aces / cbrain

CBRAIN is a flexible Ruby on Rails framework for accessing and processing of large data on high-performance computing infrastructures.
GNU General Public License v3.0
71 stars 42 forks source link

BTQ integration: error save result with *.mat folder. #1315

Closed natacha-beck closed 1 year ago

natacha-beck commented 1 year ago

I have a tool (mcflirt) that produce a folder named *_mcf.mat. When running the tool I get:

CbrainError: Error: incompatible directory 'D99_template_pd_mcf.mat' given for a SingleFile.

My first try to fix the bug was to set BoutiquesOutputFileTypeSetter for the output to FileCollection but it still failed because it is ignore in name_and_type_for_output_file of boutiques_cluster_task.rb.

prioux commented 1 year ago

Can you please provide a proper explanation? When does this happen? During post processing? What is in the descriptor in the output section? What are the files present in the work directories? COuld it be you have BOTH a file and a directory that ends with _mcf.mat ?

natacha-beck commented 1 year ago

@prioux the issue is that l334

return a FslMatrixFile and a FslMatrixFile is a SingleFile.

prioux commented 1 year ago

OK so I'll add a piece of code that compares the suggested type to the actual filesystem content we're trying to save, and reset to 'SingleFile' or 'FileCollection' if there is a mismatc. This should go just after line 250.

natacha-beck commented 1 year ago

Closed by commit: https://github.com/aces/cbrain/commit/431055c4a7fe97ecfdd9dfc1aed6c26bad44aa8f