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

Change datahub ref ci form get to ls

parent 160b314c
Branches
Tags
2 merge requests!58Develop,!45Resolve "Move references to GUDMAP/RBK"
Pipeline #8122 failed with stages
in 2 minutes and 29 seconds
......@@ -239,8 +239,10 @@ 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)
- singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' deriva-hatrac-cli --host ${referenceBase} get ${refURL}
- refURL=$(python ./workflow/scripts/extractRefData.py --return URL)
- refMD5=$(python ./workflow/scripts/extractRefData.py --return 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
mousenDataHub:
stage: reference
......@@ -260,9 +262,10 @@ 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)
- pip install --user deriva==1.3.0
- singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' deriva-hatrac-cli --host ${referenceBase} get ${refURL}
- refURL=$(python ./workflow/scripts/extractRefData.py --return URL)
- refMD5=$(python ./workflow/scripts/extractRefData.py --return 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
integration_se:
......
......@@ -5,10 +5,20 @@ import pandas as pd
import warnings
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)
args = parser.parse_args()
return args
def main():
args = get_args()
refQuery=pd.read_json("refQuery.json")
if refQuery["File_URL"].count() == 1:
print(refQuery["File_URL"].values[0])
if args.return == "URL":
print(refQuery["File_URL"].values[0])
elif args.return == "MD5":
print(refQuery["File_MD5"].values[0])
else:
raise Exception("Multple references found: \n%s" %
refQuery["RID"])
......
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