Created
January 30, 2021 16:15
-
-
Save clintval/27ee2d0478f6d7eb8d4171ca995797eb to your computer and use it in GitHub Desktop.
DNAnexus App for checking md5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "md5check", | |
| "title": "MD5 checksum", | |
| "summary": "Generate MD5 checksum of one or more files and save the output info in a text file. Hard timeout policy for 10hrs.Use batch input processing or instance of large storage if you have large amount of data to process. Questions go to [email protected]", | |
| "dxapi": "1.0.0", | |
| "version": "0.0.1", | |
| "inputSpec": [ | |
| { | |
| "name": "i_put", | |
| "label": "Input File(s)", | |
| "class": "array:file", | |
| "optional": false, | |
| "patterns": [ | |
| "*" | |
| ], | |
| "help": "" | |
| } | |
| ], | |
| "outputSpec": [ | |
| { | |
| "name": "md5_output", | |
| "label": "Output File", | |
| "class": "file", | |
| "patterns": [ | |
| "*" | |
| ], | |
| "help": "" | |
| } | |
| ], | |
| "runSpec": { | |
| "timeoutPolicy": { | |
| "*": { | |
| "minutes": 600 | |
| } | |
| }, | |
| "interpreter": "bash", | |
| "release": "16.04", | |
| "distribution": "Ubuntu", | |
| "file": "src/md5check.sh" | |
| }, | |
| "access": {"network": ["*"], "project": "CONTRIBUTE", "allProjects": "VIEW"}, | |
| "regionalOptions": { | |
| "aws:us-east-1": { | |
| "systemRequirements": { | |
| "*": { | |
| "instanceType": "mem1_ssd1_v2_x8" | |
| } | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # md5check 0.0.1 | |
| # Generated by dx-app-wizard. | |
| # Questions go to [email protected] | |
| set +e -x -o pipefail | |
| main() { | |
| echo "Value of i_put: '${i_put[@]}'" | |
| for i in ${!i_put[@]} | |
| do | |
| filename=`dx describe --name "${i_put[$i]}"` | |
| dx download "${i_put[$i]}" -o $filename | |
| md5sum $filename >> md5_output.txt | |
| done | |
| o_put=$(dx upload md5_output.txt --brief) | |
| dx-jobutil-add-output "md5_output" "$o_put" --class=file | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment