gpt4 book ai didi

r - 我如何才能发现Rscript已由CWL在docker上成功运行?

转载 作者:行者123 更新时间:2023-12-02 20:07:06 25 4
gpt4 key购买 nike

我已经编写了在Docker容器中运行Rscript命令的CWL代码。我有两个cwl和yaml文件,并通过以下命令运行它们:

cwltool --debug a_code.cwl a_input.yaml

我得到的输出表示过程状态为成功,但是没有输出文件,并且结果为“输出”:报告为null。我想知道是否有一种方法可以找到Rscript文件已在docker上成功运行。我实际上想知道输出文件为null的原因。

结果的最后一部分是:
[job a_code.cwl] {
"output": null,
"errorFile": null
}
[job a_code.cwl] Removing input staging directory /tmp/tmpUbyb7k
[job a_code.cwl] Removing input staging directory /tmp/tmpUbyb7k
[job a_code.cwl] Removing temporary directory /tmp/tmpkUIOnw
[job a_code.cwl] Removing temporary directory /tmp/tmpkUIOnw
Removing intermediate output directory /tmp/tmpCG9Xs1
Removing intermediate output directory /tmp/tmpCG9Xs1
{
"output": null,
"errorFile": null
}
Final process status is success
Final process status is success

R代码:
library(cummeRbund)
cuff<-readCufflinks( dbFile = "cuffData.db", gtfFile = NULL, runInfoFile = "run.info", repTableFile = "read_groups.info", geneFPKM = "genes.fpkm_trac .... )
#setwd("/scripts")
sink("cuff.txt")
print(cuff)
sink()

我的cwl文件代码是:
class: CommandLineTool
cwlVersion: v1.0
id: cummerbund
baseCommand:
- Rscript
inputs:
- id: Rfile
type: File?
inputBinding:
position: 0
- id: cuffdiffout
type: 'File[]?'
inputBinding:
position: 1
- id: errorout
type: File?
inputBinding:
position: 99
prefix: 2>
valueFrom: |
error.txt
outputs:
- id: output
type: File?
outputBinding:
glob: cuff.txt
- id: errorFile
type: File?
outputBinding:
glob: error.txt
label: cummerbund
requirements:
- class: DockerRequirement
dockerPull: cummerbund_0

我的输入文件(yaml文件)为:
 inputs:
Rfile:
basename: run_cummeR.R
class: File
nameext: .R
nameroot: run_cummeR
path: run_cummeR.R
cuffdiffout:
- class: File
path: cuffData.db
- class: File
path: genes.fpkm_tracking
- class: File
path: read_groups.info
- class: File
path: genes.count_tracking
- class: File
path: genes.read_group_tracking
- class: File
path: isoforms.fpkm_tracking
- class: File
path: isoforms.read_group_tracking
- class: File
path: isoforms.count_tracking
- class: File
path: isoform_exp.diff
- class: File
path: gene_exp.diff
errorout:
- class: File
path: error.txt

另外,这是我用于创建镜像的Dockerfile:
FROM r-base
COPY . /scripts
RUN apt-get update
RUN apt-get install -y \
libcurl4-openssl-dev\
libssl-dev\
libmariadb-client-lgpl-dev\
libmariadbclient-dev\
libxml2-dev\
r-cran-plyr\
r-cran-reshape2
WORKDIR /scripts
RUN Rscript /scripts/build.R
ENTRYPOINT /bin/bash

最佳答案

我得到了答案!
我的程序中存在一些问题。
1. docker 未正确拉出,那么cwl无法产生任何输出。
2.输入和输出未定义为强制性的。因此,在没有适当输入和输出的情况下,我获得了成功状态。

关于r - 我如何才能发现Rscript已由CWL在docker上成功运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48872884/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com