9 #ifndef IMPMULTIFIT_PROTEIN_ANCHORS_MAPPING_READER_H
10 #define IMPMULTIFIT_PROTEIN_ANCHORS_MAPPING_READER_H
12 #include <IMP/multifit/multifit_config.h>
18 IMPMULTIFIT_BEGIN_NAMESPACE
26 void set_anchors(
const multifit::AnchorsData &data) {
28 multifit::AnchorsData get_anchors()
const {
return anchors_data_;}
29 inline std::string get_anchors_filename()
const {
return anchors_fn_;}
30 void set_anchors_filename(
const std::string &fn) {anchors_fn_=fn;}
31 multifit::ProteomicsData *get_proteomics_data()
const {
return prots_;}
32 void add_protein(
const multifit::ProteinRecordData &rec) {
33 prots_->add_protein(rec);
35 IntsList get_paths_for_protein(
const std::string &prot_name)
const {
37 <<prot_name<<
" is not found");
38 return paths_map_.find(prot_name)->second;}
39 void set_paths_filename_for_protein(
const std::string &prot_name,
40 const std::string &paths_filename){
42 "Protein:"<<prot_name<<
" is already set");
43 paths_filename_[prot_name]=paths_filename;
45 std::string get_paths_filename_for_protein(
const std::string &prot_name)
48 "Protein:"<<prot_name<<
" is not found");
49 return paths_filename_.find(prot_name)->second;}
50 void set_paths_for_protein(
const std::string &prot_name,
IntsList paths){
52 <<prot_name<<
" is already set");
53 paths_map_[prot_name]=paths;
56 void show(std::ostream &s=std::cout)
const;
59 std::map<std::string, IntsList> paths_map_;
60 std::map<std::string,std::string> paths_filename_;
61 multifit::AnchorsData anchors_data_;
63 std::string anchors_fn_;
69 multifit::ProteomicsData *prots,
70 const std::string &anchors_prot_map_fn,
71 int max_paths=INT_MAX);
73 void write_protein_anchors_mapping(
74 const std::string &anchors_prot_map_fn,
75 const std::string &anchors_fn,
76 const std::vector<std::pair<String,String> > &prot_paths);
80 void write_protein_anchors_mapping(
81 const std::string &anchors_prot_map_fn,
96 IMPMULTIFIT_END_NAMESPACE