Skip to main content
added 1685 characters in body
Source Link

In Nextflow I have a process that creates a channel that holds several files in a tuple. I'm trying to call only one of those files as input for a subsequent process.

So basically if I run channel_name.view() the channel shows [/home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bestTree.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bipartitions.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bipartitionsBranchLabels.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bootstrap.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_info.tree] . I need just one file so I'm using the full name in the input section of the process.

input:
file 'RAxML_bipartitionsBranchLabels.tree' from channel_name

That does not find the file. On the other hand, if I use .flatten(), like this:

input:
file 'RAxML_bipartitionsBranchLabels.tree' from raxml_out_ch.flatten()

It works but reads some files before reaching to the one that matches and so the process results in error even after completing the task for this file properly and gives several outputs (for each file it looks into), some of them empty and one with the result.

[7c/2971f1] Submitted process > tree_visualisation (4)
[8d/dd129b] Submitted process > tree_visualisation (1)
[cb/0f91f5] Submitted process > tree_visualisation (5)
[6c/fb23c8] Submitted process > tree_visualisation (3)
ERROR ~ Error executing process > 'tree_visualisation (5)'

Caused by:
  Process `tree_visualisation (5)` terminated with an error exit status (1)

Command executed:

  Rscript tree.R RAxML_bipartitionsBranchLabels.tree phylogram.png

I'm looking for a way to filter this input so that the process only runs for this file and doesn't try with the others.

How can I do that?

In Nextflow I have a process that creates a channel that holds several files. I'm trying to call only one of those files as input for a subsequent process.

How can I do that?

In Nextflow I have a process that creates a channel that holds several files in a tuple. I'm trying to call only one of those files as input for a subsequent process.

So basically if I run channel_name.view() the channel shows [/home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bestTree.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bipartitions.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bipartitionsBranchLabels.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_bootstrap.tree, /home/nextflow/work/e4/bc47bceb4569cffc01bd76e49245e9/RAxML_info.tree] . I need just one file so I'm using the full name in the input section of the process.

input:
file 'RAxML_bipartitionsBranchLabels.tree' from channel_name

That does not find the file. On the other hand, if I use .flatten(), like this:

input:
file 'RAxML_bipartitionsBranchLabels.tree' from raxml_out_ch.flatten()

It works but reads some files before reaching to the one that matches and so the process results in error even after completing the task for this file properly and gives several outputs (for each file it looks into), some of them empty and one with the result.

[7c/2971f1] Submitted process > tree_visualisation (4)
[8d/dd129b] Submitted process > tree_visualisation (1)
[cb/0f91f5] Submitted process > tree_visualisation (5)
[6c/fb23c8] Submitted process > tree_visualisation (3)
ERROR ~ Error executing process > 'tree_visualisation (5)'

Caused by:
  Process `tree_visualisation (5)` terminated with an error exit status (1)

Command executed:

  Rscript tree.R RAxML_bipartitionsBranchLabels.tree phylogram.png

I'm looking for a way to filter this input so that the process only runs for this file and doesn't try with the others.

How can I do that?

deleted 109 characters in body
Source Link

I'm trying this as input:

file 'RAxML_bipartitionsBranchLabels.tree' from raxml_out_ch.flatten()

.flatten() helps to run it but theIn Nextflow I have a process also looks in the otherthat creates a channel that holds several files until it finds this one. Can I make it more specificI'm trying to call only read this one?

Thanks before hand, of those files as input for a subsequent process.

JoseHow can I do that?

I'm trying this as input:

file 'RAxML_bipartitionsBranchLabels.tree' from raxml_out_ch.flatten()

.flatten() helps to run it but the process also looks in the other files until it finds this one. Can I make it more specific to only read this one?

Thanks before hand,

Jose

In Nextflow I have a process that creates a channel that holds several files. I'm trying to call only one of those files as input for a subsequent process.

How can I do that?

Post Undeleted by jose lopez
Post Deleted by jose lopez
Source Link

How can I call one file from a channel that's composed of several files in Nextflow?

I'm trying this as input:

file 'RAxML_bipartitionsBranchLabels.tree' from raxml_out_ch.flatten()

.flatten() helps to run it but the process also looks in the other files until it finds this one. Can I make it more specific to only read this one?

Thanks before hand,

Jose