8 * Created by westcott on 9/1/11.
9 * Copyright 2011 Schloss Lab. All rights reserved.
14 #include "mothurout.h"
15 #include "sequence.hpp"
16 #include "qualityscores.h"
22 oligosPair() { forward = ""; reverse = ""; }
23 oligosPair(string f, string r) : forward(f), reverse(r) {}
30 TrimOligos(int,int, map<string, int>, map<string, int>, vector<string>); //pdiffs, bdiffs, primers, barcodes, revPrimers
31 TrimOligos(int,int, int, int, map<string, int>, map<string, int>, vector<string>, vector<string>, vector<string>); //pdiffs, bdiffs, ldiffs, sdiffs, primers, barcodes, revPrimers, linker, spacer
32 TrimOligos(int,int, int, int, map<int, oligosPair>, map<int, oligosPair>); //pdiffs, bdiffs, ldiffs, sdiffs, primers, barcodes
35 int stripBarcode(Sequence&, int&);
36 int stripBarcode(Sequence&, QualityScores&, int&);
37 int stripBarcode(Sequence&, Sequence&, QualityScores&, QualityScores&, int&);
38 int stripBarcode(Sequence&, Sequence&, int&);
40 int stripForward(Sequence&, int&);
41 int stripForward(Sequence&, QualityScores&, int&, bool);
42 int stripForward(Sequence&, Sequence&, QualityScores&, QualityScores&, int&);
43 int stripForward(Sequence&, Sequence&, int&);
45 bool stripReverse(Sequence&);
46 bool stripReverse(Sequence&, QualityScores&);
48 bool stripLinker(Sequence&);
49 bool stripLinker(Sequence&, QualityScores&);
51 bool stripSpacer(Sequence&);
52 bool stripSpacer(Sequence&, QualityScores&);
54 //seq, primerStart, primerEnd
55 bool findForward(Sequence&, int&, int&);
56 bool findReverse(Sequence&, int&, int&);
58 string reverseOligo(string);
59 string getTrashCode() { return trashCode; }
63 int pdiffs, bdiffs, ldiffs, sdiffs;
67 map<string, int> barcodes;
68 map<string, int> primers;
69 vector<string> revPrimer;
70 vector<string> linker;
71 vector<string> spacer;
72 map<string, vector<int> > ifbarcodes;
73 map<string, vector<int> > ifprimers;
74 map<string, vector<int> > irbarcodes;
75 map<string, vector<int> > irprimers;
76 map<int, oligosPair> ipbarcodes;
77 map<int, oligosPair> ipprimers;
79 int maxFBarcodeLength, maxRBarcodeLength, maxFPrimerLength, maxRPrimerLength, maxLinkerLength, maxSpacerLength;
83 bool compareDNASeq(string, string);
84 int countDiffs(string, string);
86 int stripPairedBarcode(Sequence& seq, QualityScores& qual, int& group);
87 int stripPairedPrimers(Sequence& seq, QualityScores& qual, int& group, bool);