Skip to content

Can't redirect stdin #195

Closed as not planned
Closed as not planned
@serverhorror

Description

@serverhorror

Hi,

It seems impossible to redirect stdin so that a tool would read this. Am I using it wrong?

$ cwl-runner --debug tr.cwl params.yml
/home/marcherm/cwlSamples/bin/cwl-runner 1.0.20160919152321
[job tr.cwl] initializing from file:///home/marcherm/cwlSamples/tr.cwl
[job tr.cwl] {
    "message": "I am cleartext\nV nz pyrnegrkg\n"
}
[job tr.cwl] path mappings is {}
[job tr.cwl] command line bindings is [
    {
        "position": [
            -1000000,
            0
        ],
        "datum": "tr"
    },
    {
        "position": [
            0,
            0
        ],
        "datum": "[A-Za-z]"
    },
    {
        "position": [
            0,
            1
        ],
        "datum": "[N-ZA-Mn-za-m]"
    }
]
[job tr.cwl] /tmp/tmpcri0kw$ tr \
    [A-Za-z] \
    [N-ZA-Mn-za-m] < infile.tr
[job tr.cwl] initial work dir {
    "_:6f8a753d-6dde-4a4a-9c56-870b062cfa5f": [
        "_:6f8a753d-6dde-4a4a-9c56-870b062cfa5f",
        "/tmp/tmpcri0kw",
        "Directory"
    ],
    "_:dbdb06cc-41fa-41bb-a725-a4c75065d0ca": [
        "I am cleartext\nV nz pyrnegrkg\n",
        "/tmp/tmpcri0kw/infile.tr",
        "CreateFile"
    ]
}
Exception while running job
Traceback (most recent call last):
  File "/home/marcherm/cwlSamples/lib/python2.7/site-packages/cwltool/job.py", line 190, in run
    stdin = open(self.pathmapper.reversemap(self.stdin)[1], "rb")
TypeError: 'NoneType' object has no attribute '__getitem__'
[job tr.cwl] completed permanentFail
[job tr.cwl] {}
Final process status is permanentFail
[job tr.cwl] Removing input staging directory /tmp/tmpI9MKrF
[job tr.cwl] Removing temporary directory /tmp/tmpczQTwN
Workflow error, try again with --debug for more information:
  Process status is ['permanentFail']
Traceback (most recent call last):
  File "/home/marcherm/cwlSamples/lib/python2.7/site-packages/cwltool/main.py", line 672, in main
    **vars(args))
  File "/home/marcherm/cwlSamples/lib/python2.7/site-packages/cwltool/main.py", line 228, in single_job_executor
    raise WorkflowException(u"Process status is %s" % (final_status))
WorkflowException: Process status is ['permanentFail']
# tr.cwl
class: CommandLineTool
cwlVersion: v1.0
baseCommand: "tr"
arguments: ["[A-Za-z]", "[N-ZA-Mn-za-m]"]
#arguments: ["[A-Za-z]", "[N-ZA-Mn-za-m]", "infile.tr"]
#baseCommand: ["cat"]
#arguments: ["infile.tr"]

requirements:
  InitialWorkDirRequirement:
    listing:
      - entryname: infile.tr
        entry: $(inputs.message)

stdin: infile.tr
inputs:
  message:
    type: string
outputs: []
#outputs:
#  result:
#    type: stdout
# params.yml
message: |
  I am cleartext
  V nz pyrnegrkg

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions