diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e1028aba7a0d2969e4766b210f1c13c30d0c538..94c45b3e53e6ca58477585f212045c841a751c04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ getData: script: - ln -sfn `readlink -e ./test_data/auth/cookies.txt` ~/.bdbag/deriva-cookies.txt - unzip ./test_data/bagit/Replicate_16-1ZX4 - - singularity run 'docker://bicf/gudmaprbkfilexfer:1.3' sh ./workflow/scripts/bdbagFetch.sh Replicate_16-1ZX4 16-1ZX4 + - singularity run 'docker://bicf/gudmaprbkfilexfer:1.3' sh ./workflow/scripts/bdbagFetch.sh Replicate_16-1ZX4 16-1ZX4 TEST - pytest -m getData parseMetadata: @@ -38,8 +38,12 @@ parseMetadata: getRef: stage: unit script: - - singularity run 'docker://bicf/awscli:1.1' aws s3 ls s3://bicf-references/mouse/0.0.1/GRCm38.P6 - - singularity run 'docker://bicf/awscli:1.1' aws s3 ls s3://bicf-references/human/0.0.1/GRCh38.p12 + - #singularity run 'docker://bicf/awscli:1.1' aws s3 ls s3://bicf-references/mouse/0.0.1/GRCm38.P6 + - #singularity run 'docker://bicf/awscli:1.1' aws s3 ls s3://bicf-references/human/0.0.1/GRCh38.p12 + - mkdir -p hu + - mkdir -p mo + - cp -R /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12.v31/hisat2 ./hu/ + - cp -R /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12.v31/hisat2 ./mo/ trimData: stage: unit diff --git a/workflow/scripts/bdbagFetch.sh b/workflow/scripts/bdbagFetch.sh index 902222a2ebb6aa7e978f0a820ad3c04472395848..15bc977c740ea90c1dbe85c8cb9f1b8eeb4ab70a 100644 --- a/workflow/scripts/bdbagFetch.sh +++ b/workflow/scripts/bdbagFetch.sh @@ -1,7 +1,14 @@ #!/bin/bash -bdbag --resolve-fetch all --fetch-filter filename\$*fastq.gz $1 -for i in $(find */ -name "*.R*.fastq.gz"); do - path=${2}$(echo ${i##*/} | grep -o "\.R.\.fastq\.gz"); - mv ${i} ./${path} -done; \ No newline at end of file +if [ ! -z ${3}} ] +then +bdbag --resolve-fetch all --fetch-filter filename\$*fastq.gz ${1} + for i in $(find */ -name "*.R*.fastq.gz") + do + path=${2}$(echo ${i##*/} | grep -o "\.R.\.fastq\.gz") + mv ${i} ./${path} + done +elif [ ${3} == "TEST" ] +then + bdbag --resolve-fetch all --fetch-filter filename\$*.txt ${1} +fi \ No newline at end of file