Skip to content

Commit

Permalink
Merge pull request #574 from RoanKanninga/master
Browse files Browse the repository at this point in the history
upgrade to NGS_DNA/3.2.4 + bugfixing
  • Loading branch information
RoanKanninga authored Aug 4, 2016
2 parents 6431642 + 24feafa commit c36d3f0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion compute5/NGS_Automated/automated_generate_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -u

### NEEDS 2 arguments! PROJECT AND BATCH

module load NGS_DNA/3.2.3
module load NGS_DNA/3.2.4
module list
HOST=$(hostname)
##Running script for checking the environment variables
Expand Down
4 changes: 2 additions & 2 deletions compute5/NGS_Automated/copyProjectDataToPrm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ do

if [ -f ${LOGDIR}/copyProjectDataToPrm.sh.locked ]
then
exit 0
continue
else
touch ${LOGDIR}/copyProjectDataToPrm.sh.locked
fi
Expand All @@ -53,7 +53,7 @@ do
then
countFilesProjectDataDirTmp=$(ls -R ${PROJECTSDIR}/${projectName}/*/results/ | wc -l)
module load hashdeep/4.4-foss-2015b
if [ ! -f ${PROJECTSDIR}/${projectName}.allResultmd5sums ]
if [ ! -f ${PROJECTSDIR}/${projectName}/${projectName}.allResultmd5sums ]
then
cd ${PROJECTSDIR}/${projectName}/
md5deep -r -j0 -o f -l */results/ > ${projectName}.allResultmd5sums
Expand Down
14 changes: 8 additions & 6 deletions compute5/NGS_Automated/copyRawDataToDiagnosticsCluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,19 @@ do
for i in $(ls *.fq.gz.md5 )
do
if md5sum -c $i
then
echo "data copied to DiagnosticsCluster" >> $LOGGER
printf ".. done \n" >> $LOGGER
touch $LOGDIR/${filePrefix}/${filePrefix}.dataCopiedToDiagnosticsCluster
touch ${filePrefix}.md5sums.checked
then

awk '{print $2" CHECKED, and is correct"}' $i >> $LOGGER
else
echo "md5sum check failed, the copying will start again" >> $LOGGER
rsync -r -a ${copyRawGatToDiagnosticsCluster}
echo "data copied to DiagnosticsCluster" >> $LOGGER
echo -e "data copied to DiagnosticsCluster \n" >> $LOGGER

fi
done
touch $LOGDIR/${filePrefix}/${filePrefix}.dataCopiedToDiagnosticsCluster
touch ${filePrefix}.md5sums.checked

else
echo "Retry: Copying data to DiagnosticsCluster" >> $LOGGER
rsync -r -a ${copyRawGatToDiagnosticsCluster}
Expand Down
13 changes: 4 additions & 9 deletions compute5/NGS_Automated/copyRawDataToPrm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ pipeline="dna"

function finish {
echo "TRAPPED"
if [ -f ${LOGDIR}/copyDataToPrm.sh.locked ]
then
rm ${LOGDIR}/copyDataToPrm.sh.locked
fi
rm -f ${LOGDIR}/copyDataToPrm.sh.locked
}
trap finish HUP INT QUIT TERM EXIT ERR

Expand Down Expand Up @@ -87,6 +84,7 @@ do

if [[ -f $LOGDIR/${filePrefix}/${filePrefix}.dataCopiedToDiagnosticsCluster && ! -f $LOGDIR/${filePrefix}/${filePrefix}.dataCopiedToPrm ]]
then
echo "working on ${filePrefix}"
countFilesRawDataDirTmp=$(ls ${RAWDATADIR}/${filePrefix}/${filePrefix}* | wc -l)
if [ "${makeRawDataDir}" == "f" ]
then
Expand Down Expand Up @@ -123,10 +121,7 @@ do
echo -e "De data voor project ${filePrefix} is gekopieerd naar ${RAWDATADIRPRM}" | mail -s "${filePrefix} copied to permanent storage" ${ONTVANGER}
touch $LOGDIR/${filePrefix}/${filePrefix}.dataCopiedToPrm
fi
if [ -f $LOGDIR/${filePrefix}/${filePrefix}.failed ]
then
rm $LOGDIR/${filePrefix}/${filePrefix}.failed
fi
rm -f $LOGDIR/${filePrefix}/${filePrefix}.failed
fi
else
echo "$filePrefix: $countFilesRawDataDirTmp | $countFilesRawDataDirPrm"
Expand All @@ -145,7 +140,7 @@ do
echo -e "De md5sum checks voor project ${filePrefix} op ${RAWDATADIRPRM} zijn mislukt.De originele data staat op ${HOSTNA}:${RAWDATADIR}\n\nDeze mail is verstuurd omdat er al 10 pogingen zijn gedaan om de data te kopieren/md5summen" | mail -s "${filePrefix} failing to copy to permanent storage" ${ONTVANGER}
fi
fi
rm ${LOGDIR}/copyDataToPrm.sh.locked
rm -f ${LOGDIR}/copyDataToPrm.sh.locked
done<${SAMPLESHEETSDIR}/allSampleSheets_DiagnosticsCluster.txt

trap - EXIT
Expand Down

0 comments on commit c36d3f0

Please sign in to comment.