Skip to content

Commit 299dddd

Browse files
committed
check if cram file exists before testing
1 parent c1e37b1 commit 299dddd

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

scripts/test.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@ NanoPlot --summary nanotest/sequencing_summary.txt --loglength --verbose -o test
3030
echo "testing fastq_rich with downsample, store, and custom prefix:"
3131
NanoPlot --fastq_rich nanotest/reads.fastq.gz --verbose --downsample 500 -o tests --store --prefix test_
3232

33-
echo "testing fastq_minimal with plots, color, and threads:"
34-
NanoPlot --fastq_minimal nanotest/reads.fastq.gz --verbose --plots dot -o tests --color red --threads 2
33+
echo "testing fastq_minimal with plots, color, threads, and only-report:"
34+
NanoPlot --fastq_minimal nanotest/reads.fastq.gz --verbose --plots dot -o tests --color red --threads 2 --only-report
3535

36-
echo "testing cram with multiple formats, length filtering, and only_report:"
37-
NanoPlot --cram nanotest/alignment.cram --verbose -o tests --format png jpeg --minlength 1000 --maxlength 40000 --only_report
36+
# Check if CRAM file exists before testing
37+
if [ -f "nanotest/alignment.cram" ]; then
38+
echo "testing cram with multiple formats, length filtering:"
39+
NanoPlot --cram nanotest/alignment.cram --verbose -o tests --format png jpeg --minlength 1000 --maxlength 40000
40+
else
41+
echo "CRAM file not found, skipping CRAM test (run make_cram.sh to create it)"
42+
fi
3843

3944
echo "testing summary with barcoded (warning expected) and raw export:"
4045
NanoPlot --summary nanotest/sequencing_summary.txt --barcoded --verbose -o tests --raw

0 commit comments

Comments
 (0)