You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had two cases where alignment jobs failed, but the alignment files where already moved to the final location, so that a rerun required finding and deleting those cases of wrongly 'completed' alignment files.
Not sure why this happened. One likely explanation is that the files are not moved to their final destination at the very end of the script, but rather before a couple of final BWA checks. So if one of those fails, the job fails, but the alignment files are not marked as temporary. This is unwanted, as the BWA checks are used to indicate alignments which need to be replaced/taken care of.
Things to do in summary:
Alignment files should be moved to the final path at the very end of the alignment workflow
are the BWA checks carried out at the end of the alignment workflow still necessary?
If yes, change the code for the BWA checks so that they work on the temporary alignment file paths (since we will now move the alignments only after the checks)
The text was updated successfully, but these errors were encountered:
By @schmattes42:
It seems that the temporary bam file is only moved to its final destination at the end of the bwa error checks (see line 10 of the following code fragment). Out of some reason the bwa error checking script ends with a non-zero exit code
lang=bash
if [[ ${bamFileExists}==true ]];thenwait$procIDOutPipe|| throw 13 "Error from sambamba view pipe"else# make sure to rename BAM file when it has been produced correctly
[[ -p$i1 ]] && rm $i1$i2$o1$o22> /dev/null
rm -rf ${WORKDIR}2> /dev/null # Remove temporary files sorting
rm $FNPIPE1
rm $FNPIPE2
errorString="There was a non-zero exit code in the bwa mem - sort pipeline; exiting..."source${TOOL_BWA_ERROR_CHECKING_SCRIPT}
mv ${tempSortedBamFile}${FILENAME_SORTED_BAM}|| throw 36 "Could not move file"# index is only created by samtools or biobambam when producing the BAM, it may be older than the BAM, so update time stampif [[ -f${tempBamIndexFile} ]];then
mv ${tempBamIndexFile}${INDEX_FILE}&& touch ${INDEX_FILE}|| throw 37 "Could not move file"fi# clean up adapter trimming pipes if they exist
[[ -p$i1 ]] && rm $i1$i2$o1$o22> /dev/null
fi
Still we have to find out what exactly is the reason for crashing the script.
We had two cases where alignment jobs failed, but the alignment files where already moved to the final location, so that a rerun required finding and deleting those cases of wrongly 'completed' alignment files.
Not sure why this happened. One likely explanation is that the files are not moved to their final destination at the very end of the script, but rather before a couple of final BWA checks. So if one of those fails, the job fails, but the alignment files are not marked as temporary. This is unwanted, as the BWA checks are used to indicate alignments which need to be replaced/taken care of.
Things to do in summary:
The text was updated successfully, but these errors were encountered: