Skip to content

Commit c1e37b1

Browse files
committed
improve test script by removing redundant commands and checking missing options
1 parent e222e4f commit c1e37b1

1 file changed

Lines changed: 32 additions & 24 deletions

File tree

scripts/test.sh

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -ev
23

34
if [ -d "nanotest" ]; then
@@ -6,32 +7,39 @@ else
67
git clone https://github.com/wdecoster/nanotest.git
78
fi
89

10+
# Quick info tests (no data processing)
911
NanoPlot -h
1012
NanoPlot --listcolors
11-
echo "testing figformat pdf with:"
12-
NanoPlot --bam nanotest/alignment.bam --verbose -o tests -o tests --format pdf --drop_outliers
13-
echo "testing fasta with --tsv_stats:"
14-
NanoPlot --fasta nanotest/reads.fa.gz --verbose --maxlength 35000 -o tests --tsv_stats
15-
echo "testing bam:"
16-
NanoPlot --bam nanotest/alignment.bam --verbose -o tests --title testing
17-
echo "testing bam without supplementary alignments:"
18-
NanoPlot --bam nanotest/alignment.bam --verbose --no_supplementary -o tests
19-
echo "testing summary:"
20-
NanoPlot --summary nanotest/sequencing_summary.txt --loglength --verbose -o tests
21-
echo "testing fastq rich:"
22-
NanoPlot --fastq_rich nanotest/reads.fastq.gz --verbose --downsample 800 -o tests
23-
echo "testing fastq minimal:"
24-
NanoPlot --fastq_minimal nanotest/reads.fastq.gz --store --verbose --plots dot -o tests
25-
echo "testing fastq plain:"
26-
NanoPlot --fastq nanotest/reads.fastq.gz --verbose --minqual 4 --color red -o tests
27-
echo "testing fasta:"
28-
NanoPlot --fasta nanotest/reads.fa.gz --verbose --maxlength 35000 -o tests
29-
echo "testing --no_static:"
30-
NanoPlot --summary nanotest/sequencing_summary.txt --verbose --maxlength 35000 -o tests --no_static
13+
NanoPlot --listcolormaps
14+
NanoPlot --version
3115

16+
# Merged tests - combining multiple options per execution:
17+
18+
echo "testing bam with pdf format, outlier dropping, title, and quality filtering:"
19+
NanoPlot --bam nanotest/alignment.bam --verbose -o tests --format pdf --drop_outliers --title "Test Run" --minqual 8
20+
21+
echo "testing fasta with tsv_stats, length filtering, and huge mode:"
22+
NanoPlot --fasta nanotest/reads.fa.gz --verbose --maxlength 35000 -o tests --tsv_stats --huge
23+
24+
echo "testing bam without supplementary, with colormap and no_static:"
25+
NanoPlot --bam nanotest/alignment.bam --verbose --no_supplementary -o tests --colormap Viridis --no_static
26+
27+
echo "testing summary with loglength, N50, multiple plots, and info_in_report:"
28+
NanoPlot --summary nanotest/sequencing_summary.txt --loglength --verbose -o tests --N50 --plots kde dot --info_in_report
29+
30+
echo "testing fastq_rich with downsample, store, and custom prefix:"
31+
NanoPlot --fastq_rich nanotest/reads.fastq.gz --verbose --downsample 500 -o tests --store --prefix test_
32+
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
35+
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
38+
39+
echo "testing summary with barcoded (warning expected) and raw export:"
40+
NanoPlot --summary nanotest/sequencing_summary.txt --barcoded --verbose -o tests --raw
41+
42+
# Optional legacy test (commented out due to dependency issues)
3243
# echo "testing legacy with summary:"
33-
# echo "installing seaborn and an appropriate version of numpy" # fuck this
3444
# pip install seaborn==0.10.1 "numpy<1.24"
35-
# NanoPlot --summary nanotest/sequencing_summary.txt --loglength --verbose -o tests --legacy hex --raw -p prefix --plots dot
36-
# echo "testing legacy with multiple output formats:"
37-
# NanoPlot --summary nanotest/sequencing_summary.txt --loglength --verbose -o tests --legacy hex --raw -p prefix --plots dot --format pdf png jpeg
45+
# NanoPlot --summary nanotest/sequencing_summary.txt --loglength --verbose -o tests --legacy hex --raw --prefix legacy_ --plots dot --format pdf

0 commit comments

Comments
 (0)