diff --git a/conf/bdbag.json b/conf/bdbag.json new file mode 100644 index 0000000000000000000000000000000000000000..2c2ab245e7d3470d8bb341136dac278360b4d99f --- /dev/null +++ b/conf/bdbag.json @@ -0,0 +1,28 @@ +{ + "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" + } + } + } +} diff --git a/rna-seq.nf b/rna-seq.nf index 763581ac156e5139f51d027792489087bd8df954..5b1536731ff53a25188fa583474359710770cabb 100644 --- a/rna-seq.nf +++ b/rna-seq.nf @@ -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}") diff --git a/workflow/scripts/bdbag_fetch.sh b/workflow/scripts/bdbag_fetch.sh index 45ee14a7da409e011494921bafa204b44e96f795..59e113647de75340ba7573a9e0db324bc89e8597 100644 --- a/workflow/scripts/bdbag_fetch.sh +++ b/workflow/scripts/bdbag_fetch.sh @@ -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