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

Change bdbag to use cookie locally

parent 3324d1ea
Branches
Tags
2 merge requests!76Develop,!70Dnanexus
Pipeline #9241 failed with stages
in 2 minutes and 7 seconds
{
"fetch_config": {
"http": {
"http_cookies": {
"file_names": [
"*cookies.txt"
],
"scan_for_cookie_files": true,
"search_paths": [
"."
],
"search_paths_filter": "*cookies.txt"
}
},
"https": {
"http_cookies": {
"file_names": [
"*cookies.txt"
],
"scan_for_cookie_files": true,
"search_paths": [
"."
],
"search_paths_filter": "*cookies.txt"
}
}
}
}
......@@ -72,6 +72,7 @@ spikeForce = params.spikeForce
email = params.email
// Define fixed files and variables
bdbagConfig = Channel.fromPath("${baseDir}/conf/bdbag.json")
replicateExportConfig = Channel.fromPath("${baseDir}/conf/Replicate_For_Input_Bag.json")
executionRunExportConfig = Channel.fromPath("${baseDir}/conf/Execution_Run_For_Output_Bag.json")
if (params.source == "dev") {
......@@ -239,8 +240,9 @@ process getData {
tag "${repRID}"
input:
path bdbagConfig
path script_bdbagFetch
path cookies from bdbag
path cookies, stageAs: "deriva-cookies.txt" from bdbag
path inputBag from inputBag_getData
output:
......@@ -256,10 +258,10 @@ process getData {
ulimit -a >> ${repRID}.getData.log
# link deriva cookie for authentication
echo -e "LOG: linking deriva cookie" >> ${repRID}.getData.log
mkdir -p ~/.bdbag
cp `readlink -e cookies.txt` ~/.bdbag/deriva-cookies.txt
echo -e "LOG: linked" >> ${repRID}.getData.log
#echo -e "LOG: linking deriva cookie" >> ${repRID}.getData.log
#mkdir -p ~/.bdbag
#cp `readlink -e cookies.txt` ~/.bdbag/deriva-cookies.txt
#echo -e "LOG: linked" >> ${repRID}.getData.log
# get bag basename
replicate=\$(basename "${inputBag}")
......
......@@ -9,7 +9,7 @@ then
n=0
until [ "${n}" -ge "3" ]
do
bdbag --resolve-fetch missing --validate full ${1} --debug && validate=$(tail -n validate.txt | grep -o 'is valid') && break
bdbag --resolve-fetch missing --validate full ${1} --debug --config-file bdbag.json && validate=$(tail -n validate.txt | grep -o 'is valid') && break
n=$((n+1))
sleep 15
done
......@@ -22,4 +22,4 @@ for i in $(find */ -name "*[_.]R[1-2].fastq.gz")
do
path=${2}.$(echo ${i##*/} | grep -o "R[1,2].fastq.gz")
cp ${i} ./${path}
done
\ No newline at end of file
done
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