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

Fix extractRefData arg

parent 0883570c
Branches
Tags
2 merge requests!58Develop,!45Resolve "Move references to GUDMAP/RBK"
Pipeline #8124 failed with stages
in 2 minutes and 8 seconds
......@@ -239,8 +239,8 @@ humanDataHub:
- GENCODE=$(echo ${references} | grep -o ${refName}.* | cut -d '.' -f3)
- query=$(echo 'https://'${referenceBase}'/ermrest/catalog/2/entity/RNASeq:Reference_Genome/Reference_Version='${GRCv}'.'${GRCp}'/Annotation_Version=GENCODE%20'${GENCODE})
- curl --request GET ${query} > refQuery.json
- refURL=$(python ./workflow/scripts/extractRefData.py --return URL)
- refMD5=$(python ./workflow/scripts/extractRefData.py --return MD5)
- refURL=$(python ./workflow/scripts/extractRefData.py --returnParam URL)
- refMD5=$(python ./workflow/scripts/extractRefData.py --returnParam MD5)
- test=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' deriva-hatrac-cli --host ${referenceBase} ls /hatrac/resources/rnaseq/pipeline/reference_genome/ | grep -o ${refMD5})
- if [ "${test}" == "" ]; then exit 1; fi
......@@ -262,8 +262,8 @@ mousenDataHub:
- GENCODE=$(echo ${references} | grep -o ${refName}.* | cut -d '.' -f3)
- query=$(echo 'https://'${referenceBase}'/ermrest/catalog/2/entity/RNASeq:Reference_Genome/Reference_Version='${GRCv}'.'${GRCp}'/Annotation_Version=GENCODE%20'${GENCODE})
- curl --request GET ${query} > refQuery.json
- refURL=$(python ./workflow/scripts/extractRefData.py --return URL)
- refMD5=$(python ./workflow/scripts/extractRefData.py --return MD5)
- refURL=$(python ./workflow/scripts/extractRefData.py --returnParam URL)
- refMD5=$(python ./workflow/scripts/extractRefData.py --returnParam MD5)
- test=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' deriva-hatrac-cli --host ${referenceBase} ls /hatrac/resources/rnaseq/pipeline/reference_genome/ | grep -o ${refMD5})
- if [ "${test}" == "" ]; then exit 1; fi
......
......@@ -7,7 +7,7 @@ warnings.simplefilter(action='ignore', category=FutureWarning)
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('-r', '--return',help="The parameter to return (URL or MD5).",required=True)
parser.add_argument('-r', '--returnParam',help="The parameter to return (URL or MD5).",required=True)
args = parser.parse_args()
return args
......@@ -15,9 +15,9 @@ def main():
args = get_args()
refQuery=pd.read_json("refQuery.json")
if refQuery["File_URL"].count() == 1:
if args.return == "URL":
if args.returnParam == "URL":
print(refQuery["File_URL"].values[0])
elif args.return == "MD5":
elif args.returnParam == "":
print(refQuery["File_MD5"].values[0])
else:
raise Exception("Multple references found: \n%s" %
......
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