Skip to content
Snippets Groups Projects
Commit d35b3d62 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Fix upload execution run unique exist check

parent 2f23de58
Branches
Tags
2 merge requests!58Develop,!53Resolve "process_derivaUpload"
Pipeline #8584 canceled with stages
...@@ -331,14 +331,14 @@ uploadQC: ...@@ -331,14 +331,14 @@ uploadQC:
cookie=$(cat credential.json | grep -A 1 '\"staging.gudmap.org\": {' | grep -o '\"cookie\": \".*\"') && cookie=$(cat credential.json | grep -A 1 '\"staging.gudmap.org\": {' | grep -o '\"cookie\": \".*\"') &&
cookie=${cookie:11:-1} && cookie=${cookie:11:-1} &&
if [ "${exist}" != "[]" ]; then if [ "${exist}" != "[]" ]; then
rids=$(echo ${exist} | grep -o '\"RID\":\".\{7\}' | sed 's/^.\{7\}\/\/') rids=$(echo ${exist} | grep -o '\"RID\":\".\{7\}' | sed 's/^.\{7\}\/\/') &&
for rid in ${rids}; do for rid in ${rids}; do
singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' python3 ./workflow/scripts/deleteEntry.py -r ${rid} -t mRNA_QC -o staging.gudmap.org -c ${cookie} && singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' python3 ./workflow/scripts/deleteEntry.py -r ${rid} -t mRNA_QC -o staging.gudmap.org -c ${cookie} &&
echo old mRNA QC RID deleted - ${rid} echo old mRNA QC RID deleted - ${rid}
done done
echo all old mRNA QC RIDs deleted echo all old mRNA QC RIDs deleted
fi fi
rid=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' python3 ./workflow/scripts/uploadQC.py -r 17-BTFJ -e 17-BTG4 -p "Single Read" -s forward -l 35 -w 5 -f 1 -n 'This is a test mRNA QC' -o staging.gudmap.org -c ${cookie} -u F) && rid=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' python3 ./workflow/scripts/uploadQC.py -r 17-BTFJ -e 17-BTG4 -p "Single Read" -s forward -l 35 -w 5 -f 1 -n "This is a test mRNA QC" -o staging.gudmap.org -c ${cookie} -u F) &&
echo ${rid} test mRNA QC created echo ${rid} test mRNA QC created
uploadProcessedFile: uploadProcessedFile:
...@@ -355,7 +355,7 @@ uploadProcessedFile: ...@@ -355,7 +355,7 @@ uploadProcessedFile:
- mv 17-BTFJ_test.csv ./deriva/Seq/pipeline/17-BTFA/17-BTG4/17-BTFJ_test.csv - mv 17-BTFJ_test.csv ./deriva/Seq/pipeline/17-BTFA/17-BTG4/17-BTFJ_test.csv
- > - >
exist=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Processed_File/Replicate=17-BTFJ) && exist=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Processed_File/Replicate=17-BTFJ) &&
cookie=$(cat credential.json | grep -A 1 '"staging.gudmap.org\: {' | grep -o '"cookie": ".*"') && cookie=$(cat credential.json | grep -A 1 '\"staging.gudmap.org\": {' | grep -o '\"cookie\": \".*\"') &&
cookie=${cookie:11:-1} && cookie=${cookie:11:-1} &&
if [ "${exist}" != "[]" ]; then if [ "${exist}" != "[]" ]; then
rids=$(echo $exist | grep -o '\"RID\":\".\{7\}' | sed 's/^.\{7\}//') rids=$(echo $exist | grep -o '\"RID\":\".\{7\}' | sed 's/^.\{7\}//')
......
...@@ -1391,7 +1391,7 @@ process uploadExecutionRun { ...@@ -1391,7 +1391,7 @@ process uploadExecutionRun {
cookie=\$(cat credential.json | grep -A 1 '\\"${source}\\": {' | grep -o '\\"cookie\\": \\".*\\"') cookie=\$(cat credential.json | grep -A 1 '\\"${source}\\": {' | grep -o '\\"cookie\\": \\".*\\"')
cookie=\${cookie:11:-1} cookie=\${cookie:11:-1}
exist=\$(curl -s https://${source}/ermrest/catalog/2/entity/RNASeq:Execution_Run/Workflow=\${workflow}/Replicate=${repRID}) exist=\$(curl -s https://${source}/ermrest/catalog/2/entity/RNASeq:Execution_Run/Workflow=\${workflow}/Replicate=${repRID}/Input_Bag=${inputBagRID})
echo \${exist} >> ${repRID}.uploadExecutionRun.log echo \${exist} >> ${repRID}.uploadExecutionRun.log
if [ "\${exist}" == "[]" ] if [ "\${exist}" == "[]" ]
then then
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment