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

Move fastq count before cp

parent 785c4858
Branches
Tags
2 merge requests!76Develop,!70Dnanexus
Pipeline #9242 failed with stages
in 2 minutes and 4 seconds
......@@ -257,12 +257,6 @@ process getData {
hostname > ${repRID}.getData.log
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
# get bag basename
replicate=\$(basename "${inputBag}")
echo -e "LOG: bag replicate name \${replicate}" >> ${repRID}.getData.log
......@@ -274,10 +268,9 @@ process getData {
# bag fetch fastq's only and rename by repRID
echo -e "LOG: fetching replicate bdbag" >> ${repRID}.getData.log
sh ${script_bdbagFetch} \${replicate::-13} ${repRID}
fastqCount=\$(sh ${script_bdbagFetch} \${replicate::-13} ${repRID})
echo -e "LOG: fetched" >> ${repRID}.getData.log
fastqCount=\$(find . -name '*.fastq.gz' | wc -l)
if [ "\${fastqCount}" == "0" ]
then
touch dummy.R1.fastq.gz
......
......@@ -18,8 +18,10 @@ if [ "${validate}" != "is valid" ]
then
exit 1
fi
count=$(find */ -name "*[_.]R[1-2].fastq.gz" | wc -l)
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
echo ${count}
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