diff --git a/workflow/conf/replicate_export_config.json b/workflow/conf/replicate_export_config.json index ff17fa513c5bc130a2e2bdaf9aa41b070c99b290..4380e46734a4425f7df57ad0cf0553a868b03c9d 100644 --- a/workflow/conf/replicate_export_config.json +++ b/workflow/conf/replicate_export_config.json @@ -1,6 +1,6 @@ { "bag": { - "bag_name": "Replicate_{rid}", + "bag_name": "{rid}_inputBag", "bag_algorithms": [ "md5" ], diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index 09d35d6c7943d78924dbc0aeac3dc4bcae58d681..ccedc85a24ee1856d4284d6b2f92595cde55b125 100644 --- a/workflow/rna-seq.nf +++ b/workflow/rna-seq.nf @@ -157,7 +157,7 @@ process getBag { path replicateExportConfig output: - path ("Replicate_*.zip") into bag + path ("*.zip") into bag when: inputBagForce == "" @@ -222,7 +222,7 @@ process getData { echo -e "LOG: linked" >> ${repRID}.getData.log # get bag basename - replicate=\$(basename "${inputBag}" | cut -d "." -f1) + replicate=\$(basename "${inputBag}" | cut -d "_" -f1) echo -e "LOG: bag replicate name \${replicate}" >> ${repRID}.getData.log # unzip bag @@ -1511,10 +1511,11 @@ process outputBag { hostname > ${repRID}.outputBag.log ulimit -a >> ${repRID}.outputBag.log - mkdir -p ./deriva/Seq/Workflow_Runs/${studyRID}/${executionRunRID}/ - cp ${bam} ./deriva/Seq/Workflow_Runs/${studyRID}/${executionRunRID}/ - cp ${bigwig} ./deriva/Seq/Workflow_Runs/${studyRID}/${executionRunRID}/ - cp ${counts} ./deriva/Seq/Workflow_Runs/${studyRID}/${executionRunRID}/ + mkdir -p ./deriva/Seq/pipeline/${studyRID}/${executionRunRID}/ + cp ${bam} ./deriva/Seq/pipeline/${studyRID}/${executionRunRID}/ + cp ${bai} ./deriva/Seq/pipeline/${studyRID}/${executionRunRID}/ + cp ${bigwig} ./deriva/Seq/pipeline/${studyRID}/${executionRunRID}/ + cp ${counts} ./deriva/Seq/pipeline/${studyRID}/${executionRunRID}/ cookie=\$(cat credential.json | grep -A 1 '\\"${source}\\": {' | grep -o '\\"cookie\\": \\".*\\"') cookie=\${cookie:20:-1} diff --git a/workflow/scripts/bdbagFetch.sh b/workflow/scripts/bdbagFetch.sh index 606b88397d5a6cf4feb4aa38d7615e3e3ba48735..1cab13098ce042e03a8a7506b551323f2c24c2e5 100644 --- a/workflow/scripts/bdbagFetch.sh +++ b/workflow/scripts/bdbagFetch.sh @@ -2,7 +2,7 @@ if [ -z "${3}" ] then - bdbag --resolve-fetch all --fetch-filter filename\$*fastq.gz ${1} + bdbag --resolve-fetch all --fetch-filter filename\$*fastq.gz ${1}_inputBag for i in $(find */ -name "*R*.fastq.gz") do path=${2}.$(echo ${i##*/} | grep -o "R[1,2].fastq.gz")