1# ===========================================================================
2#
3#                            PUBLIC DOMAIN NOTICE
4#               National Center for Biotechnology Information
5#
6#  This software/database is a "United States Government Work" under the
7#  terms of the United States Copyright Act.  It was written as part of
8#  the author's official duties as a United States Government employee and
9#  thus cannot be copyrighted.  This software/database is freely available
10#  to the public for use. The National Library of Medicine and the U.S.
11#  Government have not placed any restriction on its use or reproduction.
12#
13#  Although all reasonable efforts have been taken to ensure the accuracy
14#  and reliability of the software and data, the NLM and the U.S.
15#  Government do not and cannot warrant the performance or results that
16#  may be obtained by using this software or data. The NLM and the U.S.
17#  Government disclaim all warranties, express or implied, including
18#  warranties of performance, merchantability or fitness for any particular
19#  purpose.
20#
21#  Please cite the author in any work or product based on this material.
22#
23# ===========================================================================
24
25default: runtests
26
27TOP ?= $(abspath ../..)
28
29MODULE = test/ngs-pileup
30
31TEST_TOOLS = \
32    test-ngs-pileup
33
34include $(TOP)/build/Makefile.env
35
36$(TEST_TOOLS): makedirs
37	@ $(MAKE_CMD) $(TEST_BINDIR)/$@
38
39.PHONY: $(TEST_TOOLS)
40
41clean: stdclean
42
43#-------------------------------------------------------------------------------
44# test-ngs-pileup
45#
46TEST_NGS_PILEUP_SRC = \
47	test-ngs-pileup
48
49TEST_NGS_PILEUP_OBJ = \
50	$(addsuffix .$(OBJX),$(TEST_NGS_PILEUP_SRC))
51
52TEST_NGS_PILEUP_LIB =   \
53	-sngs-c++           \
54	-sncbi-ngs-c++      \
55	-sncbi-vdb-static   \
56	-skapp              \
57    -sktst              \
58
59$(TEST_BINDIR)/test-ngs-pileup: $(TEST_NGS_PILEUP_OBJ)
60	$(LP) --exe -o $@ $^ $(TEST_NGS_PILEUP_LIB)
61
62#-------------------------------------------------------------------------------
63# slowtests: match output vs sra-pileup
64#
65
66slowtests: diff-vs-sra-pileup
67
68diff-vs-sra-pileup:
69	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 1.0 SRR833251
70	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 2.0 SRR1166393
71	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 3.0 ERR334733                # ILLUMINA
72	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 4.0 SRR1068006
73	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 5.0 SRR619510                # ABSOLID REF_ROWS=36172
74	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 6.0 SRR1251988               # SEC_ROWS=198
75	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 7.0 SRR1186012               # ION_TORRENT
76	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 8.1 SRR556739 -r chrY # COMPLETE_GENOMICS
77	-@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 8.2 SRR556739 -r chrM # COMPLETE_GENOMICS, circular reference
78	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 9.0 SRR341578 -r NC_011752.1         #:19900-20022
79
80onediff:
81	@ ./runtestcase.sh $(BINDIR) $(SRCDIR) 9.1 SRR341578 -r NC_011752.1:19900-20022
82
83#alignment selection:
84#TODO: multiple references in one accession
85#TODO: multiple accessions with overlapping alignments
86#TODO: filter by reference (-r ref) using canonic name
87#TODO: filter by reference (-r ref) using common name
88#TODO: filter by multiple references (-r ref1 -r ref2)
89#TODO: filter by position on the reference (-r ref:from-to)
90#TODO: filter by multiple positions on the same reference (-r ref:from1-to1 -r ref:from2-to2)
91#TODO: primary alignment table only (-t p)
92#TODO: secondary alignment table only (-t s)
93#TODO: evidence  table only (-t e)
94#TODO: include duplicates (-d 1)
95#TODO: do not include duplicates (-d 0) NB: broken in sra-pileup
96#TODO: minimum mapq value (-q min)
97
98#output control:
99#TODO: omit qualities (-n)
100
101#output file control:
102#TODO: redirect output to a file (-o)
103#TODO: bzip2 output (--bzip2)
104#TODO: gzip output (--gzip)
105
106# hidden options:
107#TODO: output alignment information (-i)
108# any more?
109
110#not sure if these are needed:
111#  -p|--spotgroups <spotgroups-modes>  divide by spotgroups
112#  -e|--seqname                     use original seq-name
113#  --minmismatch                    min percent of mismatches used in function
114#                                   mismatch, default is 5%
115#  --merge-dist                     If adjacent slices are closer than this,
116#                                   they are merged and skiplist is created.
117#                                   a value of zero disables the feature,
118#                                   default is 10000
119#  --function ref                   list references
120#  --function ref-ex                list references coverage
121#  --function count                 sort pileup with counters
122#  --function stat                  strand/tlen statistic
123#  --function mismatch              only lines with mismatch
124#  --function index                 list deletion counts
125#  --function varcount              variation counters:  ref-name, ref-pos,
126#                                   ref-base, coverage,  mismatch A, mismatch C,
127#                                   mismatch G, mismatch T, deletes, inserts, ins
128#                                   after A, ins after C, ins after G, ins
129#                                   after T
130#  --function deletes               list deletions greater then 20
131#
132#Grouping of accessions into artificial spotgroups:
133#  sra-pileup SRRXXXXXX=a SRRYYYYYY=b SRRZZZZZZ=a
134
135
136
137.PHONY: diff-vs-sra-pileup
138