Closed barrystokman closed 3 years ago
Note:
-s : file exists AND is not empty ! -s : file does not exist OR is empty, instead of NOT (file exists AND is not empty) -> [[ -e file.txt && ! -s file.txt ]] should only return TRUE if the file exists AND is empty, which is the purpose of this check!
Yes, also working on the fluffy stuff but will test when I can find some time.
TC1 output:
[hiseq.clinical@thalamus 201203_A00689_0200_AHVKJCDRXX]$ bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/checkfornewrun.bash /home/hiseq.clinical/STAGE/novaseq/runs/ /home/hiseq.clinical/STAGE/novaseq/demux/
demux sheet fetch --application nova --pad --longest HVKJCDRXX > /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX/SampleSheet.csv
mkdir -p /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/
date +'%Y%m%d%H%M%S' > /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX/demuxstarted.txt
bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/demux-novaseq.bash /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX /home/hiseq.clinical/STAGE/novaseq/demux/ &>> /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/projectlog.20201215113443.log
rm -f /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/copycomplete.txt
date +'%Y%m%d%H%M%S' > /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/demuxcomplete.txt
:heavy_check_mark:
TC2 output:
[hiseq.clinical@thalamus 201203_A00689_0200_AHVKJCDRXX]$ bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/checkfornewrun.bash /home/hiseq.clinical/STAGE/novaseq/runs/ /home/hiseq.clinical/STAGE/novaseq/demux/
mkdir -p /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/
date +'%Y%m%d%H%M%S' > /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX/demuxstarted.txt
bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/demux-novaseq.bash /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX /home/hiseq.clinical/STAGE/novaseq/demux/ &>> /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/projectlog.20201215113831.log
rm -f /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/copycomplete.txt
date +'%Y%m%d%H%M%S' > /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/demuxcomplete.txt
:heavy_check_mark:
TC3 output:
[hiseq.clinical@thalamus 201203_A00689_0200_AHVKJCDRXX]$ bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/checkfornewrun.bash /home/hiseq.clinical/STAGE/novaseq/runs/ /home/hiseq.clinical/STAGE/novaseq/demux/
demux sheet fetch --application nova --pad --longest HVKJCDRXX > /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX/SampleSheet.csv
mkdir -p /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/
date +'%Y%m%d%H%M%S' > /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX/demuxstarted.txt
bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/demux-novaseq.bash /home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX /home/hiseq.clinical/STAGE/novaseq/demux/ &>> /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/projectlog.20201215114152.log
rm -f /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/copycomplete.txt
date +'%Y%m%d%H%M%S' > /home/hiseq.clinical/STAGE/novaseq/demux//201203_A00689_0200_AHVKJCDRXX/demuxcomplete.txt
When testing effort >>> coding effort...
But it works and an approval would be greatly appreciated!
Bumped:
Deployed thalamus:
This PR adds/fixes the test for removing an empty samplesheet before fetching a new one, leading to an error email being sent without cause:
ERROR starting novaseq HCTCNDSXY on clinical-preproc.scilifelab.se, line 56
How to prepare for test:
/home/hiseq.clinical/STAGE/novaseq/runs/201203_A00689_0200_AHVKJCDRXX
demuxstarted.txt
andSampleSheet.csv
/home/hiseq.clinical/STAGE/git/
: git clone git@github.com:Clinical-Genomics/demultiplexing.gitbash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/checkfornewrun.bash /home/hiseq.clinical/STAGE/novaseq/runs/ /home/hiseq.clinical/STAGE/novaseq/demux/
The defect is that the bash script is trying to remove a non-existing
SampleSheet.csv
, leading to an error email (rm: cannot remove
/home/hiseq.clinical/STAGE/novaseq/runs//201203_A00689_0200_AHVKJCDRXX/SampleSheet.csv': No such file or directory`)/home/hiseq.clinical/STAGE/git/
:git clone -b fix/demux-emails-rm-samplesheet git@github.com:Clinical-Genomics/demultiplexing.git
How to test:
TC1: no samplesheet
demuxstarted.txt
andSampleSheet.csv
bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/checkfornewrun.bash /home/hiseq.clinical/STAGE/novaseq/runs/ /home/hiseq.clinical/STAGE/novaseq/demux/
TC2: samplesheet already exists
demuxstarted.txt
bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/checkfornewrun.bash /home/hiseq.clinical/STAGE/novaseq/runs/ /home/hiseq.clinical/STAGE/novaseq/demux/
TC3: empty samplesheet exists
demuxstarted.txt
andSamplesheet.csv
, touch 'Samplesheet.csv'bash /home/hiseq.clinical/STAGE/git/demultiplexing/scripts/novaseq/checkfornewrun.bash /home/hiseq.clinical/STAGE/novaseq/runs/ /home/hiseq.clinical/STAGE/novaseq/demux/
Expected test outcome: No errors occur on line 56 of the script
Review:
This version is a: