Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/mash/CommandTriangle.h @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 69:33d812a61356 |
---|---|
1 // Copyright © 2015, Battelle National Biodefense Institute (BNBI); | |
2 // all rights reserved. Authored by: Brian Ondov, Todd Treangen, | |
3 // Sergey Koren, and Adam Phillippy | |
4 // | |
5 // See the LICENSE.txt file included with this software for license information. | |
6 | |
7 #ifndef INCLUDED_CommandTriangle | |
8 #define INCLUDED_CommandTriangle | |
9 | |
10 #include "Command.h" | |
11 #include "CommandDistance.h" | |
12 #include "Sketch.h" | |
13 | |
14 namespace mash { | |
15 | |
16 class CommandTriangle : public Command | |
17 { | |
18 public: | |
19 | |
20 struct TriangleInput | |
21 { | |
22 TriangleInput(const Sketch & sketchNew, uint64_t indexNew, const Sketch::Parameters & parametersNew, double maxDistanceNew, double maxPValueNew) | |
23 : | |
24 sketch(sketchNew), | |
25 index(indexNew), | |
26 parameters(parametersNew), | |
27 maxDistance(maxDistanceNew), | |
28 maxPValue(maxPValueNew) | |
29 {} | |
30 | |
31 const Sketch & sketch; | |
32 uint64_t index; | |
33 const Sketch::Parameters & parameters; | |
34 double maxDistance; | |
35 double maxPValue; | |
36 }; | |
37 | |
38 struct TriangleOutput | |
39 { | |
40 TriangleOutput(const Sketch & sketchNew, uint64_t indexNew) | |
41 : | |
42 sketch(sketchNew), | |
43 index(indexNew) | |
44 { | |
45 pairs = new CommandDistance::CompareOutput::PairOutput[index]; | |
46 } | |
47 | |
48 ~TriangleOutput() | |
49 { | |
50 delete [] pairs; | |
51 } | |
52 | |
53 const Sketch & sketch; | |
54 uint64_t index; | |
55 | |
56 CommandDistance::CompareOutput::PairOutput * pairs; | |
57 }; | |
58 | |
59 CommandTriangle(); | |
60 | |
61 int run() const; // override | |
62 | |
63 private: | |
64 | |
65 double pValueMax; | |
66 bool comment; | |
67 | |
68 void writeOutput(TriangleOutput * output, bool comment, bool edge, double & pValuePeakToSet) const; | |
69 }; | |
70 | |
71 CommandTriangle::TriangleOutput * compare(CommandTriangle::TriangleInput * input); | |
72 | |
73 } // namespace mash | |
74 | |
75 #endif |