1 #ifndef INDEXPROPSCLASS_H
2 #define INDEXPROPSCLASS_H
7 #include <experimental/filesystem>
10 namespace fs = std::experimental::filesystem;
15 enum FileType {FQ = 1, FA, GZ};
35 std::string createBash();
37 void printToStdOut(std::string)
const;
44 uint getNumOfIndexes()
const;
45 uint getNumOfReads()
const;
46 uint getReadLength()
const;
48 bool getDelFQFlag()
const;
49 bool getDelFastaFlag()
const;
50 bool getRevCompFlag()
const;
51 bool getPairedReadsFlag()
const;
53 const std::string& getReadSetName()
const;
54 const std::string& getIndexName()
const;
55 const algo::FileType& getReadFileType()
const;
62 void setNumOfIndexes(uint numIndexes);
63 void setNumOfReads(uint numOfReads);
64 void setReadLength(uint readLength);
66 void setDelFQFlag(
bool delFQFlag);
67 void setDelFastaFlag(
bool delFastaFlag);
68 void setRevCompFlag(
bool revCompFlag);
69 void setPairedReadsFlag(
bool pairedReads);
70 void setVerboseFlag(
bool verbose);
71 void setReadSetName(
const std::string readSetName);
72 void setReadFileType(
const algo::FileType& readFileType);
80 const fs::path& getR1()
const;
81 const fs::path& getR2()
const;
83 const fs::path& getBuildDir()
const;
84 const fs::path& getOutputFolder()
const;
85 const fs::path& getppfFolder()
const;
87 const std::map<fs::path, std::pair<u_int, u_int>>& getPreProcessedFastas()
const;
88 const std::map<fs::path, uint>& getIndexSet()
const;
95 bool setR1(
const fs::path& r1);
96 bool setR2(
const fs::path& r2);
98 void setBuildDir(
const fs::path& buildDir);
99 void setIndexName(
const std::string indexName);
100 void setOutputFolder(
const fs::path& outputFolder);
101 void setppfFolder(
const fs::path& ppfFolder);
112 void delReadFastas();
113 void delSpecificReadFasta(
const fs::path& _preProcessedFasta);
120 void setPreProcessedFastas(std::map<fs::path, std::pair<u_int, u_int>>&
_ppFSet);
121 void addPPF(fs::path _ppf, uint start, uint end);
122 void setIndexSet(std::map<fs::path, uint>& indexes);
123 void addToIndexSet(fs::path index, uint offset);
130 void countNumOfReads();
131 void countReadLength(fs::path readFile);
133 void saveIndexProps(
const fs::path& indexPropsFile)
const;
134 void loadFromIni(
const fs::path inifile);
135 u_int getOffsetForIndex(fs::path indexFile);
146 std::map<fs::path, std::pair<u_int, u_int>>
_ppFSet;
155 uint _numOfIndexes = 1;
158 bool _pairedReads = 0;
164 std::string _readSetName;
165 std::string _indexName =
"Index";
166 algo::FileType _readFileType;
168 u_int countLines(fs::path fileToCount);
174 #endif // INDEXPROPSCLASS_H