diff --git a/workflow/scripts/get_updated_rep_count.sh b/workflow/scripts/get_updated_rep_count.sh index daeb0575d08f2126b40f2db089ae82af4f01ed0c..d9dd8f022ddf82478794f8fb1d3126af168278c4 100644 --- a/workflow/scripts/get_updated_rep_count.sh +++ b/workflow/scripts/get_updated_rep_count.sh @@ -13,27 +13,52 @@ staging_workflow_RID=$(curl -s https://staging.gudmap.org/ermrest/catalog/2/enti prod_workflow_RID=$(curl -s https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Workflow/Version::ciregexp::%5E${current_pipeline_versionMajor} | grep -o '\"RID\":\".*\",\"RCT' | cut -f4 -d"\"") echo "collecting unique replicates with successful execution runs" -dev_count=0 +dev_total=0 +dev_success=0 +dev_error=0 for rid in ${dev_workflow_RID} do - temp_count=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) - dev_count=$(expr ${dev_count} + ${temp_count}) + temp_total=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + dev_total=$(expr ${dev_total} + ${temp_total}) + temp_sucess=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + dev_success=$(expr ${dev_success} + ${temp_success}) + temp_error=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + dev_error=$(expr ${dev_error} + ${temp_error}) done -staging_count=0 +staging_total=0 +staging_success=0 +staging_error=0 for rid in ${staging_workflow_RID} do - temp_count=$(curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) - staging_count=$(expr ${staging_count} + ${temp_count}) + temp_total=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + staging_total=$(expr ${staging_total} + ${temp_total}) + temp_sucess=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + staging_success=$(expr ${staging_success} + ${temp_success}) + temp_error=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + staging_error=$(expr ${staging_error} + ${temp_error}) done -prod_count=0 +prod_total=0 +prod_success=0 +prod_error=0 for rid in ${prod_workflow_RID} do - temp_count=$(curl -s https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l) - prod_count=$(expr ${prod_count} + ${temp_count}) + temp_total=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + prod_total=$(expr ${prod_total} + ${temp_total}) + temp_sucess=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + prod_success=$(expr ${prod_success} + ${temp_success}) + temp_error=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l) + prod_error=$(expr ${prod_error} + ${temp_error}) done echo "collecting badges" mkdir -p ./badges/counts -curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_count}-lightgrey?style=flat > ./badges/counts/dev_counts.svg -curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Count-${staging_count}-lightgrey?style=flat > ./badges/counts/staging_counts.svg -curl --request GET https://img.shields.io/badge/Production%20Replicate%20Count-${prod_count}-lightgrey?style=flat > ./badges/counts/prod_counts.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_success}/${dev_total}-green?style=flat > ./badges/counts/dev_success.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_error}/${dev_total}-green?style=flat > ./badges/counts/dev_error.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${staging_success}/${staging_total}-green?style=flat > ./badges/counts/staging_success.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${staging_error}/${staging_total}-green?style=flat > ./badges/counts/staging_error.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${prod_success}/${prod_total}-green?style=flat > ./badges/counts/prod_success.svg +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${prod_error}/${prod_total}-green?style=flat > ./badges/counts/prod_error.svg + +curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_success}-lightgrey?style=flat > ./badges/counts/dev_counts.svg +curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Count-${staging_success}-lightgrey?style=flat > ./badges/counts/staging_counts.svg +curl --request GET https://img.shields.io/badge/Production%20Replicate%20Count-${prod_success}-lightgrey?style=flat > ./badges/counts/prod_counts.svg