Broken pipe error
Hello,
I am trying to run the two lines of code below in a python script & am getting the following error on Terra:
command = 'export NHOME=/netMHCpan-4.1; export NETMHCpan=/netMHCpan-4.1/Linux_x86_64; /netMHCpan-4.1/Linux_x86_64/bin/netMHCpan -a '+hlastring+' -f '+pepfile+' -inptype 0 -l ' + str(length) + '-s -xls -xlsfile '+outpath+'/NETMHCpan_out_' + str(length) + varianttype + '.xls -allname /netMHCpan-4.1/Linux_x86_64/data/allelenames -hlapseudo /netMHCpan-4.1/Linux_x86_64/data/MHC_pseudo.dat -t 500 -version /netMHCpan-4.1/Linux_x86_64/data/version -tdir /netMHCpan-4.1/scratch/XXXXXX -rdir /netMHCpan-4.1/Linux_x86_64/ -thrfmt /netMHCpan-4.1/Linux_x86_64/data/threshold/%s.thr.%s > '+outpath+'/netMHCpanoutlen_' + str(length) + varianttype +'.txt'
subprocess.call(command, shell=True)
The script runs successfully locally and I have tried increasing memory and disk space, but that has not helped. I have also tried adding /cromwell_root/ to all paths linking to a file or folder, but have not had success there either.
Do you have any idea where this error is coming from? I'm an affiliate member of the Broad and was also wondering if you might have office hours that I could join?
Comments
7 comments
Hey Cora,
Thanks for writing in. We don't currently offer office hours, but we are happy to dig into this as soon as we can.
Can you share the workspace where you are seeing this issue with GROUP_FireCloud-Support@firecloud.org by clicking the Share button in your workspace? The Share option is in the three-dots menu at the top-right.
Please provide us with
Many thanks,
Jason
Thank you, Jason!
Workspace: https://portal.firecloud.org/#workspaces/vanallen-firecloud-nih/VanAllen-Schoenfeld_16-284_SCC_copy
Submission ID: 23d8e22d-50d6-4fac-aebb-bec4f7530739
Workflow ID: e63e7ada-473b-4481-afa9-30b9c9daf457
Please let me know if there's anything else you need.
Hi Cora,
Thanks for sharing that workspace. I was able to take a look at your job and noticed something interesting.
Your runNetMHCpan task is the one that's showing the error messages you reported, but the task itself is showing as successfully completed.
Is this task perhaps not catching that the script isn't working as expected? Is there a way I can see the script itself?
Kind regards,
Jason
Hi Jason,
The script will create a dummy file that's empty when something isn't working, so the task will still succeed with the dummy file as it's output. The next task mutPostProcessing fails because it tries to use the empty file from runNetMHCpan.
This is the whole script:
Hi Cora,
Thanks for sharing that. I'll take a closer look at the script to see if I can identify what's going on.
As far as the WDL is concerned, if you wanted to make sure it failed in the case of a blank file, perhaps you can perform a check on the contents of the script's output file and fail the workflow in cases where that file is empty?
Kind regards,
Jason
Hi Jason,
Thank you for the recommendation - that helped me figure out the problem! I still get the broken pipe error, but I'm able to run the tasks successfully.
My original assumption was wrong, it wasn't failing because of a blank file. The mutPostProcessing task was failing because it was trying to look for files that are labeled 'InDel' or 'SNV', as below:
But instead the runNetMHCpan was simply labeling the files as follows:
This was because my script was not getting the variant type from the pepfile name (i.e. len9pep_FASTA_indel.txt). I changed my code to the following & it worked:
Thank you again!
Best,
Cora
Hi Cora,
Ah, I see! I'm glad to hear the recommendation was helpful and that you were able to find the true cause of the issue.
If we can help with anything else, please let us know!
Kind regards,
Jason
Please sign in to leave a comment.