1 #ifndef PROPERTIESCLASS_H
2 #define PROPERTIESCLASS_H
11 #include <experimental/filesystem>
18 namespace fs = std::experimental::filesystem;
21 enum Orientation {FWD = 1, REV};
35 const std::string QUERYTYPE_REF =
"REF";
36 const std::string QUERYTYPE_ALT =
"ALT";
37 const std::string QUERYTYPE_CRO =
"CRO";
42 typedef std::pair<int, QueryType>
QIdT;
52 typedef std::tuple<uint, std::string, std::string, std::string>
Query;
56 enum FlagType { ABK = 0x0001, OCK = 0x0002, NUK = 0x0003, MUL = 0x0004};
73 std::string outputFile;
114 void init(
const fs::path& pathToQueryFile ,
117 const fs::path& indexPropsFile ,
118 const fs::path& outputFolder ,
119 const fs::path& outputFile ,
123 bool multithread =
false ,
125 bool returnMatchesOnly =
false ,
127 uint maxOccurences = 200 ,
128 uint numOfThreads = 1 ,
129 bool outputNonUniqueKmers =
false ,
130 bool outputOverCountedKmers =
false ,
131 bool ignoreNonUniqueKmers =
true ,
132 bool ignoreOverCountedKmers =
true ,
133 bool countAsPairs =
false ,
134 bool crossover =
false ,
135 bool uniqueReads =
false ,
136 uint maxKmers = UINT_MAX,
137 uint totalKmers = UINT_MAX,
138 bool printInputs =
false,
139 bool matchingReads =
false);
141 void initFromQSettings(FTProp::CmdLineArg& arg);
144 void setVerbose(
bool verbose);
145 void printToStdOut(
const std::string outputString)
const;
151 void loadIndexProps(
const fs::path& _indexPropsFile,
bool printInputs);
152 void initIndexProps(
const bool pairedReads,
156 std::string indexFileName,
157 std::string readSetName,
161 bool printInputs =
false);
174 std::string getReadSetName()
const ;
175 std::string getIndexFileName()
const ;
177 uint getKmerSize()
const;
178 uint getOverlap()
const;
179 uint getStride()
const;
180 uint getReadLength()
const;
181 uint getMaxOcc()
const;
182 uint getMaxThreads()
const;
183 uint getMaxKmersPerQuery()
const;
184 uint getMaxTotalKmers()
const;
185 uint getNumOfIndexes()
const;
186 uint getNumOfReads()
const;
193 const std::bitset<8>& getFlagsToOutput()
const;
194 const std::bitset<8>& getFlagsToNotCount()
const;
207 bool getMultithreadFlag()
const;
208 bool getRefOnlyFlag()
const;
209 bool getMatchesOnlyFlag()
const;
210 bool getCrossoverFlag()
const;
211 bool getPairedReadFlag()
const;
212 bool getCountAsPairsFlag()
const;
213 bool getRevCompSearchFlag()
const;
214 bool getIndexRevCompFlag()
const;
215 bool getMatchingReadsFlag()
const;
216 bool getUniqueReadsFlag()
const;
218 bool isVerbose()
const;
224 const fs::path& getPathToQueryFile()
const;
225 const fs::path& getIndexDir()
const;
226 const fs::path& getOutputFolder()
const;
227 const fs::path& getMatchingReadFQ()
const;
228 const fs::path& getInputFastQ()
const;
229 const fs::path& getOutputFile()
const;
230 const std::map<fs::path, uint>& getIndexSet()
const;
231 const fs::path& getBuildDir()
const;
232 const fs::path& getR1()
const;
233 const fs::path& getR2()
const;
236 void addToIndexSet(
const fs::path& index, u_int offset);
238 void setTestProps(
const uint numOfReads,
const uint readLength,
bool _revComp,
bool countAsPairs =
false);
239 void setOutputFolder(
const fs::path& outputFolder);
248 std::string _readSetName;
249 std::string _indexFileName;
254 fs::path _pathToQueryFile;
261 fs::path _inputFastQ;
263 fs::path _outputFolder;
264 fs::path _outputFile;
270 uint _maxOccurences ;
272 uint _maxKmersPerQuery;
275 std::bitset<8> _flagsToOutput;
276 std::bitset<8> _flagsToNotCount;
295 #endif // PROPERTIESCLASS_H
uint _numOfReads
total individual reads, note: if countAsPairs, then equal to the number of Pairs of reads.
Definition: ftPropsClass.h:251
std::tuple< uint, std::string, std::string, std::string > Query
A tuple of QueryID, Ref string, Alt string, Cro String.
Definition: ftPropsClass.h:52
const std::string CENTERED
search type centered approach
Definition: ftPropsClass.h:26
bool _pairedReads
paired reads
Definition: ftPropsClass.h:282
std::string SearchType
SearchType declaration.
Definition: ftPropsClass.h:25
bool _multithread
run search in parallel
Definition: ftPropsClass.h:278
std::pair< int, QueryType > QIdT
Pair to create a unique ID: (Query Number, Query Type)
Definition: ftPropsClass.h:42
const std::string SLIDING
search type sliding approach
Definition: ftPropsClass.h:27
This namespace contains all the functions to interact with the search.
Definition: directSearch.h:16
bool _indexRevComp
do the index files contain the reverse complement
Definition: ftPropsClass.h:285
FlagType
Definition: ftPropsClass.h:56
FTProp()
Constructor.
Definition: ftPropsClass.cpp:12
A class that contains all the properties for a FlexTyper instance.
Definition: ftPropsClass.h:63
bool _matchingReads
create files that contain reads that match to each query
Definition: ftPropsClass.h:286
std::pair< int, int > ReadID
Pair to create a unique Read ID: (Read Number, Read Pair)
Definition: ftPropsClass.h:48
QueryType
Definition: ftPropsClass.h:34
bool _revCompSearch
generate and search for _qkRCMap
Definition: ftPropsClass.h:284
std::map< fs::path, uint > _indexSet
Malliable map containing the paths of indexes to be processed.
Definition: ftPropsClass.h:166
virtual ~FTProp()
Destructor.
Definition: ftPropsClass.cpp:464
bool _refOnly
single sequence for each query
Definition: ftPropsClass.h:279
bool _uniqueReads
Enforce a unique match between Reads and Queries (i.e. no multi-hits)
Definition: ftPropsClass.h:288
bool _verbose
print to std::cout
Definition: ftPropsClass.h:287
bool _countAsPairs
only count one hit per read pair
Definition: ftPropsClass.h:283