Pass extra arguements to processes

Hi Tractoflow team,
Is it possible to pass extra arguments to a process inside Tractoflow, an arguement that is not exposed by Tractoflow itself?

I would like to run eddy with --ol_nstd=6 instead of the default 4.

Please let me know.

Many Thanks,
Christopher Fleetwood

Hi Christopher. Not a member of Tractoflow, but the function of interest is here: https://github.com/scilus/scilpy/blob/master/scripts/scil_prepare_eddy_command.py . This is invoked during the Eddy or Eddy-Topup processes in the main.nf file. The function prepares the text that is used to call eddy and saves it as eddy.sh. In the function, you can see at around line 140 what is written, and that you could hard code in your --ol_nstd argument.

However, since you are presumably using a singularity image, that makes it hard to edit these functions directly. As an alternative method, in the main.nf file between calling the prepare-eddy command and calling eddy.sh, you can add a line of code appending “–ol_nstd=6” to eddy.sh

Does that make sense?

1 Like

Hi Christopher,

Steven is right the only way right now is to skip the use of the singularity, build scilpy with a small modification and then modify the main.nf and nextflow.config.

During the next week or so we will add this modification so you will be able to easily use this parameter.

Have a good day.
Arnaud

1 Like

Hi Steven,
I appreciate you taking the time to look at this. I will wait for the tractoflow team to implement the modifications mentioned in the post below.

Many Thanks,
Christopher Fleetwood

Hi Arnaud,
Thanks for getting back to me. I eagerly await this feature implementation.

Many Thanks,
Christopher Fleetwood

Hi Christopher,

From my understanding, it is more of an either/or situation, in that it could be solved by either editing the scilpy function directly (not recommended because of singularity), or editing main.nf to append the text to eddy.sh . Both would achieve the same end of changing eddy.sh to include your extra argument.

This should do the trick, added in main.nf in the Eddy process block after scil_prepare_eddy_command is called: echo -n " --ol_nstd=6" >> eddy.sh

That should append the argument to the eddy command, which is then run in the next line. If doing this processing is not too time sensitive then you can wait for this to be implemented in the official Tractoflow distribution (thank you Arnaud for doing this!).

Hi Steven,

This could be a temporary fix for Christopher but we are working on a new version where you can add whatever option you want for eddy and topup.

Arnaud