diff --git a/CHANGELOG.md b/CHANGELOG.md index cf09ca6..c128254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Use codecov badge and fix scout link on README page - Added a test for TRGT MCs set to `.` +- Added CLI test for TRGT file ## [0.9.1] ### Added diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index 51d8e50..05fd067 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -21,6 +21,12 @@ def test_stranger_cli_zipped(vcf_zipped_path): assert result.exit_code == 0 +def test_stranger_trgt(vcf_trgt_path): + runner = CliRunner() + result = runner.invoke(cli, ["--trgt", vcf_trgt_path]) + assert result.exit_code == 0 + + def test_stranger_trgt_dot_mc(vcf_trgt_path_dot_mc): runner = CliRunner() result = runner.invoke(cli, ["--trgt", vcf_trgt_path_dot_mc]) diff --git a/tests/conftest.py b/tests/conftest.py index 67b5933..5ebf66f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,6 +13,11 @@ def vcf_zipped_path(): return "tests/fixtures/643594.clinical.str.vcf.gz" +@pytest.fixture() +def vcf_trgt_path(): + return "tests/fixtures/sample.trgt.vcf" + + @pytest.fixture() def vcf_trgt_path_dot_mc(): return "tests/fixtures/HG002_Revio.sort.vcf.gz" diff --git a/tests/fixtures/sample.trgt.vcf b/tests/fixtures/sample.trgt.vcf new file mode 100644 index 0000000..a27107d --- /dev/null +++ b/tests/fixtures/sample.trgt.vcf @@ -0,0 +1,44 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##INFO= +##INFO= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##trgtVersion=0.7.0-4941fbb +##trgtCommand=./singularity/trgt-v0.7.0-linux_x86_64 --genome /home/proj/development/rare-disease/ONT/analysis/poorpipe/references/human_g1k_v37.fasta --repeats hg19.STRchive-disease-loci.TRGT.bed --reads sample.bam --output-prefix sample.trgt +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample +1 57832717 . AAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAATAAA AAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAATAAA,AAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAAATAAATAAA 0 . TRID=SCA37_DAB1;END=57832797;MOTIFS=AAAAT,GAAAT;STRUC=(AAAAT)n(GAAAT)n(AAAAT)n GT:AL:ALLR:SD:MC:MS:AP:AM 1/2:76,101:69-79,94-101:25,27:15_0,20_0:0(0-76)_1(76-76)_0(76-76),0(0-101)_1(101-101)_0(101-101):0.947368,0.960396:.,. +16 24624761 . TTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTT TTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTT,TTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTTTATTT 0 . TRID=FAME6_TNRC6A;END=24624853;MOTIFS=TTTTA,TTTCA;STRUC=(TTTTA)n(TTTCA)n(TTTTA)n GT:AL:ALLR:SD:MC:MS:AP:AM 1/2:58,68:46-62,64-71:11,22:11_1,13_1:0(0-55)_1(55-58)_0(58-58),0(0-65)_1(65-68)_0(68-68):0.965517,0.970588:.,.