reportsystem.h File Reference
#include <iostream>
#include <cstring>
#include <iomanip>
#include <vector>
#include <array>
#include <map>

Go to the source code of this file.

Classes

class  reporting::reportWrapper
 Internal class used by reporting::reportManager
This class serves as a proxy for message reporting.
It will only output to std::cout if reporting::reportWrapper::CanReport it's true. More...
 
class  reporting::reportManager
 Class that allows us to centralize all the reporting messages that should be used to inform the user of Errors, Warnings and Info.
The object can also be used as a substitute to cout for temporal messages using the << overloaded operator or the log method, and the messages will be behind the IsDebug variable, which should be set to false in Release.
This allows us to protect the user from receiving Debug/Developing messages that shouldn't bother them, in case any of them is not removed by error. More...
 

Namespaces

 reporting
 Internal classes to handle reporting to user in several ways.
The reporting system is made so a developer that wants to use the system doesn't need to enter to the namespace, but use the global variable debug.
 

Enumerations

enum  VerboseLevel {
  INFO = 1,
  WARNING = 2,
  ERROR = 3,
  NONE = 4
}
 VerboseLevel used to report messages. More...
 
enum  ErrorCode {
  SomethingWentWrong_reportToDeveloper = 0,
  AlignmentNotLoaded = 1,
  NoFormatsSpecified = 2,
  AlternativeMatrixNotRecognized = 3,
  ReferenceFileNotLoaded = 4,
  GapThresholdOutOfRange = 5,
  GapThresholdNotRecognized = 6,
  SimilarityThresholdOutOfRange = 7,
  SimilarityThresholdNotRecognized = 8,
  ConsistencyThresholdOutOfRange = 9,
  ConsistencyThresholdNotRecognized = 10,
  ConservationThresholdOutOfRange = 11,
  ConservationThresholdNotRecognized = 12,
  ResidueOverlapOutOfRange = 13,
  ResidueOverlapNotRecognized = 14,
  SequencesOverlapOutOfRange = 15,
  SequencesOverlapNotRecognized = 16,
  MaxIdentityOutOfRange = 17,
  MaxIdentityNotRecognized = 18,
  ClustersValueOutOfRange = 19,
  ClustersValueNotRecognized = 20,
  WindowValueOutOfRange = 21,
  WindowValueNotRecognized = 22,
  SelectSeqsNotRecognized = 23,
  SelectColsNotRecognized = 24,
  GapWindowValueOutOfRange = 25,
  GapWindowValueNotRecognized = 26,
  SimilarityWindowValueOutOfRange = 27,
  SimilarityWindowValueNotRecognized = 28,
  ConsistencyWindowValueOutOfRange = 27,
  ConsistencyWindowValueNotRecognized = 28,
  BlockSizeOutOfRange = 29,
  BlockSizeNotRecognized = 30,
  InFileComparisonStatistics = 31,
  IncompatibleArguments = 32,
  SelectSeqsResAndThresholdIncompatibilities = 33,
  SelectSeqsResAndAutomathedMethodsIncompatibilities = 34,
  SelectSeqsResAndWindowIncompatibilities = 35,
  SelectSeqsResAndOverlapIncompatibilites = 36,
  OnlyOneSequencesSelectionMethodAllowed = 37,
  CombinationAmongTrimmingMethods = 38,
  AutomathicMethodAndBlock = 39,
  WindowAndArgumentIncompatibilities = 40,
  CombinationAmongThresholdsMethods = 41,
  GeneralAndSpecificWindows = 42,
  StatisticsArgumentIncompatibilities = 43,
  TrimmingMethodNeeded = 44,
  ForceFileWithoutCompareDataset = 45,
  BacktranslationWithoutMainAlignment = 46,
  NotAligned = 47,
  MatrixGivenWithNoMethodToUseIt = 48,
  SameNameOutput = 49,
  SequenceAndResiduesOverlapMutuallyNeeded = 50,
  OutFileNeededWhenPrintingStatistics = 51,
  AlignmentTypesNotMatching = 52,
  BlocksizeTooBig = 53,
  ParemeterOnlyOnBacktranslation = 54,
  ProteinAlignmentMustBeAligned = 55,
  BacktransAlignIsDNA = 56,
  ImpossibleToGenerate = 57,
  ImpossibleToProcessMatrix = 58,
  SelectOnlyAccepts = 59,
  MoreClustersThanSequences = 60,
  LeftBoundaryBiggerThanRightBoundary = 61,
  DifferentNumberOfSequencesInCompareset = 62,
  DifferentSeqsNamesInCompareset = 63,
  CDScontainsProteinSequences = 64,
  SequenceContainsGap = 65,
  SequenceNotMultipleOfThree = 66,
  SequenceHasStopCodon = 67,
  SequenceNotPresentInCDS = 68,
  UnknownCharacter = 69,
  SequencesNotSameSize = 70,
  IncorrectSymbol = 71,
  UndefinedSymbol = 72,
  ParameterNotFoundOrRepeated = 73,
  SimilarityMatrixNotCompatibleWindow = 74,
  PossibleMissmatch = 75,
  BracketsMissmatchFound = 76,
  UnalignedAlignmentToAlignedFormat = 77,
  CantOpenFile = 78,
  FileIsEmpty = 79,
  AlignmentFormatNotRecognized = 80,
  OutputFormatNotRecognized = 81,
  OnlyOneFormatOnConsoleOutput = 82,
  AlignmentNotSaved = 83,
  VerboseLevelNotRecognized = 84,
  NeedToSpecifyVerboseLevel = 85,
  NoReferenceSequenceForContig = 86,
  SNPoutOfBounds = 87,
  NoInputFile = 88,
  ComparesetFailedAlignmentMissing = 89,
  GapWindowTooBig = 90,
  SimilarityWindowTooBig = 91,
  ConsistencyWindowTooBig = 92,
  WindowTooBig = 93,
  AlignmentIsEmpty = 94,
  AlignmentTypeIsUnknown = 95,
  MultipleOutputFormatsSameName = 96,
  MultipleInputs = 97,
  ReferenceNucleotideNotCorresponding = 98,
  OverwrittingSNP = 99,
  MoreDonorsOnLineThanPresented = 100,
  MinQualityLesserThan0 = 101,
  MinQualityNotRecognized = 102,
  MinCoverageLesserThan0 = 103,
  MinCoverageNotRecognized = 104,
  OnlyValidWithVCF = 105,
  TriedRenamingOutputPreventOverride = 106,
  AbsoluteAndRelativeGapThreshold = 107,
  AbsoluteGapThresholdLessThanZero = 108,
  AbsoluteGapThresholdBiggerThanNumberOfSequences = 109,
  AbsoluteGapThresholdNotRecognized = 110,
  MoreThanOneAutomatedMethod = 111,
  ForceSelectAndInArgumentsProvided = 108,
  ComparesetAndInArgumentsProvided = 109,
  __MAXERROR
}
 
enum  WarningCode {
  RemovingOnlyGapsSequence = 1,
  KeepingOnlyGapsSequence = 2,
  SequenceWillBeCut = 3,
  IncludingIndeterminationSymbols = 4,
  LessNucleotidesThanExpected = 5,
  HeaderWillBeCut = 6,
  DonorAlreadyAdded = 7,
  SNPAlreadApplied = 8,
  OverwrittingFile = 9,
  RenamingOutputPreventOverride = 10,
  __MAXWARNING
}
 
enum  InfoCode {
  CuttingSequence = 1,
  WindowSizeCompareset = 2,
  AddingSNP = 3,
  RemovingDuplicateSequences = 4,
  __MAXINFO
}
 

Enumeration Type Documentation

◆ ErrorCode

enum ErrorCode
Enumerator
SomethingWentWrong_reportToDeveloper 
AlignmentNotLoaded 
NoFormatsSpecified 
AlternativeMatrixNotRecognized 
ReferenceFileNotLoaded 
GapThresholdOutOfRange 
GapThresholdNotRecognized 
SimilarityThresholdOutOfRange 
SimilarityThresholdNotRecognized 
ConsistencyThresholdOutOfRange 
ConsistencyThresholdNotRecognized 
ConservationThresholdOutOfRange 
ConservationThresholdNotRecognized 
ResidueOverlapOutOfRange 
ResidueOverlapNotRecognized 
SequencesOverlapOutOfRange 
SequencesOverlapNotRecognized 
MaxIdentityOutOfRange 
MaxIdentityNotRecognized 
ClustersValueOutOfRange 
ClustersValueNotRecognized 
WindowValueOutOfRange 
WindowValueNotRecognized 
SelectSeqsNotRecognized 
SelectColsNotRecognized 
GapWindowValueOutOfRange 
GapWindowValueNotRecognized 
SimilarityWindowValueOutOfRange 
SimilarityWindowValueNotRecognized 
ConsistencyWindowValueOutOfRange 
ConsistencyWindowValueNotRecognized 
BlockSizeOutOfRange 
BlockSizeNotRecognized 
InFileComparisonStatistics 
IncompatibleArguments 
SelectSeqsResAndThresholdIncompatibilities 
SelectSeqsResAndAutomathedMethodsIncompatibilities 
SelectSeqsResAndWindowIncompatibilities 
SelectSeqsResAndOverlapIncompatibilites 
OnlyOneSequencesSelectionMethodAllowed 
CombinationAmongTrimmingMethods 
AutomathicMethodAndBlock 
WindowAndArgumentIncompatibilities 
CombinationAmongThresholdsMethods 
GeneralAndSpecificWindows 
StatisticsArgumentIncompatibilities 
TrimmingMethodNeeded 
ForceFileWithoutCompareDataset 
BacktranslationWithoutMainAlignment 
NotAligned 
MatrixGivenWithNoMethodToUseIt 
SameNameOutput 
SequenceAndResiduesOverlapMutuallyNeeded 
OutFileNeededWhenPrintingStatistics 
AlignmentTypesNotMatching 
BlocksizeTooBig 
ParemeterOnlyOnBacktranslation 
ProteinAlignmentMustBeAligned 
BacktransAlignIsDNA 
ImpossibleToGenerate 
ImpossibleToProcessMatrix 
SelectOnlyAccepts 
MoreClustersThanSequences 
LeftBoundaryBiggerThanRightBoundary 
DifferentNumberOfSequencesInCompareset 
DifferentSeqsNamesInCompareset 
CDScontainsProteinSequences 
SequenceContainsGap 
SequenceNotMultipleOfThree 
SequenceHasStopCodon 
SequenceNotPresentInCDS 
UnknownCharacter 
SequencesNotSameSize 
IncorrectSymbol 
UndefinedSymbol 
ParameterNotFoundOrRepeated 
SimilarityMatrixNotCompatibleWindow 
PossibleMissmatch 
BracketsMissmatchFound 
UnalignedAlignmentToAlignedFormat 
CantOpenFile 
FileIsEmpty 
AlignmentFormatNotRecognized 
OutputFormatNotRecognized 
OnlyOneFormatOnConsoleOutput 
AlignmentNotSaved 
VerboseLevelNotRecognized 
NeedToSpecifyVerboseLevel 
NoReferenceSequenceForContig 
SNPoutOfBounds 
NoInputFile 
ComparesetFailedAlignmentMissing 
GapWindowTooBig 
SimilarityWindowTooBig 
ConsistencyWindowTooBig 
WindowTooBig 
AlignmentIsEmpty 
AlignmentTypeIsUnknown 
MultipleOutputFormatsSameName 
MultipleInputs 
ReferenceNucleotideNotCorresponding 
OverwrittingSNP 
MoreDonorsOnLineThanPresented 
MinQualityLesserThan0 
MinQualityNotRecognized 
MinCoverageLesserThan0 
MinCoverageNotRecognized 
OnlyValidWithVCF 
TriedRenamingOutputPreventOverride 
AbsoluteAndRelativeGapThreshold 
AbsoluteGapThresholdLessThanZero 
AbsoluteGapThresholdBiggerThanNumberOfSequences 
AbsoluteGapThresholdNotRecognized 
MoreThanOneAutomatedMethod 
ForceSelectAndInArgumentsProvided 
ComparesetAndInArgumentsProvided 
__MAXERROR 

Definition at line 56 of file reportsystem.h.

◆ InfoCode

enum InfoCode
Enumerator
CuttingSequence 
WindowSizeCompareset 
AddingSNP 
RemovingDuplicateSequences 
__MAXINFO 

Definition at line 291 of file reportsystem.h.

◆ VerboseLevel

VerboseLevel used to report messages.

Enumerator
INFO 

1 = Info, warning and error messages

WARNING 

2 = Error and warning messages

ERROR 

3 = Only error messages

NONE 

4 = No output messages

Definition at line 44 of file reportsystem.h.

◆ WarningCode

Enumerator
RemovingOnlyGapsSequence 
KeepingOnlyGapsSequence 
SequenceWillBeCut 
IncludingIndeterminationSymbols 
LessNucleotidesThanExpected 
HeaderWillBeCut 
DonorAlreadyAdded 
SNPAlreadApplied 
OverwrittingFile 
RenamingOutputPreventOverride 
__MAXWARNING 

Definition at line 266 of file reportsystem.h.