This repo contains a script to patch CWL tool and/or workflow scripts for public app use on Cavatica. It satisfies the requirements as laid out here
- python3
- ruamel yaml:
pip install ruamel.yaml
parser.add_argument('-i', '--input-cwl', action='store', dest='cwl', help='Input cwl file',required=True)
parser.add_argument('-r', '--readme', action='store', dest='readme', help='Readme file to insert into workflow/tool doc, if applicable', required=False)
parser.add_argument('-n', '--id-name', action='store', dest='id_name', help='Short app ID link name to use, i.e. kfdrc-align-wf', required=False)
parser.add_argument('-l', '--label', action='store', dest='label', help='User-friendly label to add to tool/workflow cwl, if needed', required=False)
parser.add_argument('-t', '--tags', action='store', dest='tags', help='Seven bridges tags file, as csv string, ex RNASEQ,FUSION', required=False)
parser.add_argument('-f', '--files', action='store', dest='files', help='Cavatica-style tsv manifest with file ID, file name, associated cwl input key, and, optionally, secondaryFile name and IDs', required=False)
parser.add_argument('-p', '--publisher', action='store', dest='pub', help='Publisher name', required=False, default="KFDRC")
-r, --readme
: There is no need to copy in or write up a README and comprehensive doc section. The README can be fed to the script and it will automatically place it. Also, in the README, put the general workflow description first before the main header and logo - that way the public app preview will display properly-n, --id-name
: Short app ID, should bekfdrc-what-it-do-tool/workflow
-l, --label
: User-friendly display name, likeKids First DRC Alignment Workflow
-t, --tags
: Keywords in csv string format that users will be able to search, likeDNA,ALIGNMENT
-f, --files
: tsv file manifest with file IDs, file names, cwl input references, and, optionally, any secondaryFile information. The fields for secondaryFile information also accepts comma-separated lists for files that have multiple secondaryFiles. If your file has no secondaryFiles, you can leave the snames and sfids fields empty or simply writeNone
. Usetemplate_files/align_inputs_manifest_APP_PUB.tsv
as an example. If input is an array, just put one per line, using same input key. If order matters, then order them in the correct way-p, --publisher
: simple identifier of center, likelyKFDRC
, unless it;s another center
- All but the input cwl is optional, so if you want to fix something later, only pick the field you need to update
- The file will be output to stdout, it's probably a good idea if you want to keep he file name, to rename the old one until the PR is approved
- After updating the cwl, push the app to make sure it loads and copies/pre-populates files
- Check the app preview after uploading
Simple script to copy final references from a source project to apps publishing project. It will search the destination project and, if the file name already exists, use the existing file ID of the destination, or copy the file if not, and provide the new file ID. Output is to stdout
parser.add_argument('-f', '--files', action='store', dest='files', help='Cavatica-style tsv manifest with file ID, file name, and associated cwl input key', required=False)
parser.add_argument('-p', '--project', action='store', dest='project', help='Project to copy to', required=True, default="cavatica/apps-publisher")
parser.add_argument('-n', '--profile', action='store', dest='profile', help='Cavatica profile name', required=True, default="cavatica")
-f, --files
: Use the same manifest as for the pub script-p, --project
: Cavatica project name to copy to, likelycavatica/apps-publisher
-n, --profile
: This script runs on the assumption that you have a local.sevenbridges/credentials
file.
You'll likely end up having to run just the -f
portion of the cavatica_app_pub.py
again for the final file locations