Latest Release: 12/4/18
Release Notes can be found here.

"Bad output 'covered_bases': For input string: "2672692578""

cbaocbao Member, Broadie ✭✭
edited February 13 in Ask the FireCloud Team

Hi,

Besed on the log files, I think my pipeline is succeeded. But, there is an issue on one of the outputs. I want to attach both the output file and the first line value (Int) in that file to entity attributes. However, there are something wrong with the the first line value. Could you please help me? Any suggestions are welcome. Thanks a lot!

workflow:
https://portal.firecloud.org/#workspaces/broad-4900028-bn10-adam/BN10_test_cbao/monitor/e89ae8eb-a842-44e3-aa19-139c96ad0463/0774c628-41b6-40d9-b157-2ac577a945d1

My WDL:

workflow x_workflow {
    # inputs
    File wc
    String pair_id

    call x {
        input:
            cw = cw,
            pair_id = pair_id,
    }

    output {
        x.covered_bases_file
        x.covered_bases
    }
}

task x {
    # inputs
    File cw
    String pair_id

    command {
        ...
    }

    runtime {
                     ...
    }

    output {
        File covered_bases_file="${pair_id}.covered_bases.txt"
        Int covered_bases=read_int("${pair_id}.covered_bases.txt")
    }
}

Outputs:
The value of "covered_bases" is "this.covered_bases".

Thanks,
Chunyang

Post edited by KateN on
Tagged:

Best Answers

Answers

  • KateNKateN Cambridge, MAMember, Broadie, Moderator admin

    (I edited your post to add formatting in order to make the script display a bit nicer.)

    For this section of your code:

        File wc
        String pair_id
    
        call x {
            input:
                cw = cw,
                pair_id = pair_id,
        }
    

    Did you mean to say cw=wc, or possibly initalize the workflow level variable to File cw rather than wc?

    That was the only tiny thing I spotted in your workflow there that might be causing a small issue. Does this particular WDL work outside of FireCloud? Are there any error messages you're getting when you run, or are you just getting the wrong thing for your output?

  • cbaocbao Member, Broadie ✭✭

    Hi, @KateN,

    I really sorry about that! It is not the exact WDL on FC, you know. All of them are 'cw'. I just simplified it because the original one it a little bit long. Thanks a lot!

    The new one:

    `
    workflow x_workflow {
    # inputs
    File cw
    String pair_id

    call x {
        input:
            cw = cw,
            pair_id = pair_id,
    }
    
    output {
        x.covered_bases_file
        x.covered_bases
    }
    

    }

    task x {
    # inputs
    File cw
    String pair_id

    command {
        ...
    }
    
    runtime {
                     ...
    }
    
    output {
        File covered_bases_file="${pair_id}.covered_bases.txt"
        Int covered_bases=read_int("${pair_id}.covered_bases.txt")
    }
    

    }
    `

  • KateNKateN Cambridge, MAMember, Broadie, Moderator admin

    Ah, if the wc/cw was just a typo here, then that certainly wouldn't be the issue.

    The outputs section merely declares outputs of the workflow or task itself, so I don't believe that would be an issue either.

    Does this WDL run outside of FireCloud for you?

  • cbaocbao Member, Broadie ✭✭

    Hi @KateN,

    It works if I changed the data type of output to "String". Based on the ERROR message, is "2672692578" too long to be an integer? Thanks.

    Before:
    Int covered_bases=read_int("${pair_id}.covered_bases.txt")
    ERROR: "Bad output 'covered_bases': For input string: "2672692578""

    After:
    String covered_bases=read_string("${pair_id}.somatic_coverage_summary.txt")
    No issue...

  • cbaocbao Member, Broadie ✭✭
    Accepted Answer

    It seems that the format of output is uncorrect. Thanks!

  • cbaocbao Member, Broadie ✭✭

    Thanks @KateN,
    I can just say that the workflow was completed without any issue. In the downstream analysis, I will do some simple calculation using this value. But, I not sure whether it is easy to transfer String type to Int type. Much appreciated!

Sign In or Register to comment.