我写了一个python包装器脚本,它从命令行调用算法。称为vcftools.
的算法的名称在vcftools中,使用当前命令行,它应该创建日志文件和结果文件。
当我在HPC的head节点中运行我的python脚本时,它运行正常。但是当我发送到排队系统以便在集群中运行时,它会产生错误;
IOError: [Errno 2] No such file or directory: './final/PRAD-US/DO36253/final.9e272bea-9193-4c10-a802-f7e18b2937a3.snv_mnv_dkfz.log'
但是当我在headnode中运行它时,就像我之前说的那样,没有产生错误。但它会按预期创建结果文件。因此只缺少日志文件。
为了不分散线程,我只共享调用vcf工具的行。
vcf_isolation_bash_script=["/mnt/kufs/scratch/tmorova15/softwares/vcftools_0.1.13/bin/vcftools","--gzvcf", output_directory+ 'annotated_full.' + analysis_id+'.snv_mnv_'+analysis_method, "--bed" , bed_file_input , "--recode" ,"--recode-INFO-all", "--out", output_directory + "final." + analysis_id + ".snv_mnv_" + analysis_method ]
r1=subprocess.check_call(' '.join(vcf_isolation_bash_script),shell=True)
这个问题可能是什么原因?为了更清楚我的术语,headnode意味着我直接通过终端运行我的脚本,而在计算节点,我使用一个排队文件,我必须指定一切(python路径等..)
感谢您的帮助,
最佳, Tunc。
编辑:更清楚,
output_directory = './final/%s/%s/' % (folder_prefix[folder][1],folder_prefix[folder][0])
一般结构如下
Top directory
-final/
--final.patientid.resultfile
--final.patientid.log
-input/
--Contains all the input files
编辑2:更新
脚本中的路径是正确的。
- 我们在headnode中运行脚本并按预期输出
- 我们使用qsub文件运行脚本(发送到计算节点)我们最终遇到了当前问题,但是如果我们登录这些计算节点并使用相同的导出行运行脚本,则代码本身按预期工作。 / p>
我们的系统中有Sun Grid Queuing系统,所以我认为它与文件系统有关。