作为我正在尝试创建的管道的一部分,我需要从作为 .tab 结果文件的进程中获取输出,以用作在 Nextflow 中运行一系列进一步的条件进程的变量。我可以在 Perl 中使用类似下面的方法来管理它,尽管我似乎无法将变量添加到 Nextflow 脚本中:
my $resultsfile = 'path/to/resultsfile';
open (RESLIST, "<$resultsfile") or die$!;
my @resultlist=<RESLIST>;
$LINE = $resultlist[1];
close RESLIST or die$!;
my @topresults = split ("\t", $LINE);
my $topidentity = $topresults[5];
chomp $topidentity
有没有办法将变量 $topidentity 用作 Nextflow 中的变量,或者可能以不同的方式在 Nextflow 中运行类似的脚本以生成相同的变量?