1 // -*-mode:c++; c-style:k&r; c-basic-offset:4;-*- 2 // 3 // Copyright 2013-2017, Julian Catchen <jcatchen@illinois.edu> 4 // 5 // This file is part of Stacks. 6 // 7 // Stacks is free software: you can redistribute it and/or modify 8 // it under the terms of the GNU General Public License as published by 9 // the Free Software Foundation, either version 3 of the License, or 10 // (at your option) any later version. 11 // 12 // Stacks is distributed in the hope that it will be useful, 13 // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 // GNU General Public License for more details. 16 // 17 // You should have received a copy of the GNU General Public License 18 // along with Stacks. If not, see <http://www.gnu.org/licenses/>. 19 // 20 21 #ifndef __CATALOG_UTILS_H__ 22 #define __CATALOG_UTILS_H__ 23 24 #include <vector> 25 #include <string> 26 #include <map> 27 #include <set> 28 29 #include "constants.h" 30 #include "stacks.h" 31 #include "locus.h" 32 #include "PopMap.h" 33 #include "PopSum.h" 34 #include "Vcf.h" 35 36 // find_catalogs() 37 // Looks for catalog files in the given directory and returns the associated ID(s). 38 vector<int> find_catalogs(const string& dir_path); 39 40 int check_whitelist_integrity(map<int, CSLocus *> &, map<int, set<int> > &); 41 int reduce_catalog(map<int, CSLocus *> &, set<int> &, set<int> &); 42 int reduce_catalog(map<int, CSLocus *> &, map<int, set<int> > &, set<int> &); 43 int reduce_catalog_snps(map<int, CSLocus *> &, map<int, set<int> > &, PopMap<CSLocus> *); 44 45 // 46 // Create a single catalog locus based on an external VCF file. 47 // 48 CSLocus *new_cslocus(const VcfRecord rec, int id); 49 50 #endif // __CATALOG_UTILS_H__ 51