dx upload from custom applet
I tried many times to upload files through an applet and all failed. I specified in dxapp.json:
"outputSpec": [
{
"name": "output_file",
"class": "file",
"description": "The output NPZ",
"optional": false
}
],
A python script through run.sh produced some $snp.npz files to be uploaded to project as output_file and the file does exist in the job space (ls -l $snp.npz shows this file). I tried in run.sh:
1. dx upload --path "$DX_PROJECT_CONTEXT_ID:" "${snp}.npz"
#dxpy.exceptions.PermissionDenied: UPLOAD permission required in project-GjJB3fjJ2JpZ5q92VFXkxqj7 to perform this action, code 401. Request Time=1741703687.4684954, Request ID=1741703687470-168899
2. dx-jobutil-add-output output_file "$(pwd)/${snp1}.npz"
#Error validating job's output: i/o value output_file needs to be given using DNAnexus links
3. id=`dx upload $snp1.npz --destination /out --project …..'
dx-jobutil-add-output "output_file" $id
Any idea how to upload the $snp.npz file to the project directory?
Comments
0 comments
Please sign in to leave a comment.