diff --git a/CHANGELOG.md b/CHANGELOG.md index a6bb587..af261c5 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.3.2] +### Fixed +- Remove extra character in hg19 metadata file + +### Added +- System tests of hg002 real variation with hg19 reference + ## [v0.3.1] ### Changed - This is a housekeeping release to update the ont-spectre conda package requirements. diff --git a/spectre/__init__.py b/spectre/__init__.py index 260c070..f9aa3e1 100644 --- a/spectre/__init__.py +++ b/spectre/__init__.py @@ -1 +1 @@ -__version__ = "0.3.1" +__version__ = "0.3.2" diff --git a/spectre/data/hg19_metadata.mdr b/spectre/data/hg19_metadata.mdr index a259064..b1c8a9c 100644 --- a/spectre/data/hg19_metadata.mdr +++ b/spectre/data/hg19_metadata.mdr @@ -569,4 +569,4 @@ NSPOS chrY 23901000 23952000 NSPOS chrY 28819000 58820000 NSPOS chrY 58917000 58968000 NSPOS chrGL000210.1 9000 11000 -NSPOS chrGL000197.1 23000 24000s +NSPOS chrGL000197.1 23000 24000 diff --git a/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.bed b/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.bed new file mode 100644 index 0000000..34ab75c --- /dev/null +++ b/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.bed @@ -0,0 +1 @@ +18 75152000 75392000 DEL \ No newline at end of file diff --git a/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.vcf.gz b/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.vcf.gz new file mode 100644 index 0000000..2a6079a Binary files /dev/null and b/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.vcf.gz differ diff --git a/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.vcf.gz.tbi b/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.vcf.gz.tbi new file mode 100644 index 0000000..7e6b7fe Binary files /dev/null and b/tests/data/system_tests/hg002_chr18_realvar_hg19/expected.vcf.gz.tbi differ diff --git a/tests/data/system_tests/hg002_chr18_realvar/input/blacklist.bed b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/blacklist.bed similarity index 100% rename from tests/data/system_tests/hg002_chr18_realvar/input/blacklist.bed rename to tests/data/system_tests/hg002_chr18_realvar_hg19/input/blacklist.bed diff --git a/tests/data/system_tests/hg002_chr18_realvar/input/metadata.mdr b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/metadata.mdr similarity index 100% rename from tests/data/system_tests/hg002_chr18_realvar/input/metadata.mdr rename to tests/data/system_tests/hg002_chr18_realvar_hg19/input/metadata.mdr diff --git a/tests/data/system_tests/hg002_chr18_realvar_hg19/input/mosdepth/SAMPLE.mosdepth.summary.txt b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/mosdepth/SAMPLE.mosdepth.summary.txt new file mode 100644 index 0000000..33b0204 --- /dev/null +++ b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/mosdepth/SAMPLE.mosdepth.summary.txt @@ -0,0 +1,5 @@ +chrom length bases mean min max +18 78077248 3089503474 39.570 0 4899 +18_region 78077248 3089503474 39.570 0 4899 +total 78077248 3089503474 39.570 0 4899 +total_region 78077248 3089503474 39.570 0 4899 diff --git a/tests/data/system_tests/hg002_chr18_realvar_hg19/input/mosdepth/SAMPLE.regions.bed.gz b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/mosdepth/SAMPLE.regions.bed.gz new file mode 100644 index 0000000..45b07d7 Binary files /dev/null and b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/mosdepth/SAMPLE.regions.bed.gz differ diff --git a/tests/data/system_tests/hg002_chr18_realvar_hg19/input/ref.fna.gz b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/ref.fna.gz new file mode 100644 index 0000000..626413d Binary files /dev/null and b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/ref.fna.gz differ diff --git a/tests/data/system_tests/hg002_chr18_realvar_hg19/input/wf_snp.vcf.gz b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/wf_snp.vcf.gz new file mode 100644 index 0000000..d38eedb Binary files /dev/null and b/tests/data/system_tests/hg002_chr18_realvar_hg19/input/wf_snp.vcf.gz differ diff --git a/tests/data/system_tests/hg002_chr19_simulations/input/blacklist.bed b/tests/data/system_tests/hg002_chr19_simulations/input/blacklist.bed deleted file mode 100644 index e3a6ae9..0000000 --- a/tests/data/system_tests/hg002_chr19_simulations/input/blacklist.bed +++ /dev/null @@ -1,37 +0,0 @@ -chr19 0 60000 GAP -chr19 62000 224000 COMMON_VAR -chr19 245000 259000 COMMON_VAR -chr19 1228000 1231000 COMMON_VAR -chr19 1268000 1270000 COMMON_VAR -chr19 6529000 6531000 COMMON_VAR -chr19 7020000 7061000 COMMON_VAR -chr19 8274000 8298000 COMMON_VAR -chr19 8737000 8790000 COMMON_VAR -chr19 8888000 8906000 COMMON_VAR -chr19 21560000 21580000 COMMON_VAR -chr19 24330000 24419000 COMMON_VAR -chr19 24420000 24439000 COMMON_VAR -chr19 24448980 24891356 GAP -chr19 24895790 24895890 GAP -chr19 24898313 24904771 GAP -chr19 24908589 27240874 GAP -chr19 27333000 27399000 COMMON_VAR -chr19 36265000 36309000 COMMON_VAR -chr19 37269000 37306000 COMMON_VAR -chr19 39873000 39906000 COMMON_VAR -chr19 40567000 40572000 COMMON_VAR -chr19 42247000 42256000 COMMON_VAR -chr19 43196000 43264000 COMMON_VAR -chr19 47903000 47959000 COMMON_VAR -chr19 50091000 50139000 COMMON_VAR -chr19 51631000 51644000 COMMON_VAR -chr19 54220000 54244000 COMMON_VAR -chr19 54739000 54749000 COMMON_VAR -chr19 54751000 54753000 COMMON_VAR -chr19 54754000 54755000 COMMON_VAR -chr19 54766000 54785000 COMMON_VAR -chr19 54808000 54809000 COMMON_VAR -chr19 54812000 54829000 COMMON_VAR -chr19 55756000 55774000 COMMON_VAR -chr19 58562000 58598000 COMMON_VAR -chr19 58607616 58617616 GAP diff --git a/tests/data/system_tests/hg002_chr19_simulations/input/metadata.mdr b/tests/data/system_tests/hg002_chr19_simulations/input/metadata.mdr deleted file mode 100644 index 7e8cbd6..0000000 --- a/tests/data/system_tests/hg002_chr19_simulations/input/metadata.mdr +++ /dev/null @@ -1,11 +0,0 @@ -##### Statistic report -##### Basepair statistic -BPDEF A T C G GC% Total bp -BPSTA 14380791 14418925 13467225 13499456 46.00439738115586 58617616 -##### N-Sequence positions in given reference file -NSDEF From To -NSPOS chr19 0 60000 -NSPOS chr19 24448000 24892000 -NSPOS chr19 24895000 24896000 -NSPOS chr19 24898000 24905000 -NSPOS chr19 24908000 27241000 diff --git a/tests/system_tests.sh b/tests/system_tests.sh index d2cce7f..595a4ab 100644 --- a/tests/system_tests.sh +++ b/tests/system_tests.sh @@ -3,6 +3,7 @@ set -euo pipefail declare -a data=( "hg002_chr18_realvar" + "hg002_chr18_realvar_hg19" "hg002_chr19_simulations" ) @@ -15,7 +16,17 @@ do pfx="tests/data/system_tests/$sample/" echo "Data path prefix: $pfx" - # spectre cleanup and run + if [[ "$sample" == *"hg19"* ]]; then + metadata="hg19_metadata" + blacklist="hg19_blacklist_v1.0" + else + metadata="hg38_metadata" + blacklist="hg38_blacklist_v1.0" + fi + + echo "Using metadata: $metadata" + echo "Using blacklist: $blacklist" + rm -rf $pfx/output_spectre spectre CNVCaller \ --bin-size 1000 \ @@ -24,8 +35,8 @@ do --sample-id sample \ --output-dir $pfx/output_spectre \ --reference $pfx/input/ref.fna.gz \ - --metadata $pfx/input/metadata.mdr \ - --blacklist $pfx/input/blacklist.bed + --metadata $metadata \ + --blacklist $blacklist # gziping and indexing for truvari input vcf_output="$pfx/output_spectre/sample.vcf" @@ -52,6 +63,4 @@ do exit 1 fi -done - - +done \ No newline at end of file