restructure file exporter
[jalview.git] / src / jalview / datamodel / HiddenMarkovModel.java
index b863264..cd6490e 100644 (file)
@@ -18,552 +18,603 @@ public class HiddenMarkovModel
   // only string value - use the getter methods. For example, to find the length
   // of theHMM, use getModelLength()to return an int value
   Map<String, String> fileProperties = new HashMap<>();
+  
+  //contains all of the symbols used in this model. The index of each symbol represents its lookup value 
+  List<Character> symbols = new ArrayList<>();
 
-  // contains the average emission probabilities for each symbol
-  List<Double> averageMatchStateEmissionProbabilities = new ArrayList<>();
+  // contains information for each node in the model. The begin node is at index
+  // 0. Node 0 contains average emission probabilities for each symbol
+  List<HMMNode> nodes = new ArrayList<>();
 
-  // contains the probabilities of insert 0 emissions for each symbol
-  List<Double> insertZeroEmissions = new ArrayList<>();
+  final String YES = "yes";
 
-  // contains the probabilities of transitions from the begin state and insert
-  // state 0. These are bm, bi, bd, im, ii, dm and dd in order (0th position in
-  // the array indicates the probability of a bm transition)
+  final String NO = "no";
 
-  List<Double> beginStateTransitions = new ArrayList<>();
+  int numberOfSymbols;
+  
+  //keys for file properties hashmap
+  private final String NAME = "NAME";
 
-  // contains the alignment column index for each node
-  List<Integer> alignmentColumnIndexes = new ArrayList<>();
+  private final String ACCESSION_NUMBER = "ACC";
 
-  // contains all other annotations for each node. These can be the
-  // consensus(CONS), reference annotation(RF), mask value(MM) or consensus
-  // structure(CS)
-  List<HashMap<String, Character>> annotations = new ArrayList<>();
+  private final String DESCRIPTION = "DESC";
 
-  // contains the match emission for each symbol at each node
-  List<List<Double>> matchEmissions = new ArrayList<>();
+  private final String LENGTH = "LENG";
 
-  // contains the insert emission for each symbol at each node
-  List<List<Double>> insertEmissions = new ArrayList<>();
+  private final String MAX_LENGTH = "MAXL";
 
-  // contains the state transition for each state transition. See
-  // beginStateTransitions field for transition possibilities.
-  List<List<Double>> stateTransitions = new ArrayList<>();
+  private final String ALPHABET = "ALPH";
 
-  // contains cutoffs and thresholds from PFAM
-  Map<String, Double[]> pfamData = new HashMap<>();
+  private final String DATE = "DATE";
 
-  // contains e-value statistic objects which contain the alignment mode
-  // configuration, and the slope and location of each distribution
-  Map<String, EValueStatistic> eValueStatistics = new HashMap<>();
+  private final String COMMAND_LOG = "COM";
 
-  final String yes = "yes";
+  private final String NUMBER_OF_SEQUENCES = "NSEQ";
 
-  final String no = "no";
+  private final String EFF_NUMBER_OF_SEQUENCES = "EFFN";
 
-  List<Character> symbols = new ArrayList<>();
+  private final String CHECK_SUM = "CKSUM";
 
-  public List<Double> getBeginStateTransitions()
-  {
-    return beginStateTransitions;
-  }
+  private final String GATHERING_THRESHOLDS = "GA";
 
-  public void setBeginStateTransitions(List<Double> beginStateTransitionsL)
-  {
-    this.beginStateTransitions = beginStateTransitionsL;
-  }
+  private final String TRUSTED_CUTOFFS = "TC";
 
-  public List<List<Double>> getStateTransitions()
-  {
-    return stateTransitions;
-  }
+  private final String NOISE_CUTOFFS = "NC";
 
-  public void setStateTransitions(List<List<Double>> stateTransitionsL)
-  {
-    this.stateTransitions = stateTransitionsL;
-  }
+  private final String STATISTICS = "STATS";
 
-  public List<Character> getSymbols()
-  {
-    return symbols;
-  }
+  private final String COMPO = "COMPO";
+  
+  private final String GATHERING_THRESHOLD = "GA";
 
-  public void setSymbols(List<Character> symbolsL)
-  {
-    this.symbols = symbolsL;
-  }
+  private final String TRUSTED_CUTOFF = "TC";
 
-  public List<Double> getAverageMatchStateEmissionProbabilities()
-  {
-    return averageMatchStateEmissionProbabilities;
-  }
+  private final String NOISE_CUTOFF = "NC";
 
-  public void setAverageMatchStateEmissionProbabilities(
-          List<Double> averageMatchStateEmissionProbabilitiesL)
-  {
-    this.averageMatchStateEmissionProbabilities = averageMatchStateEmissionProbabilitiesL;
-  }
+  private final String VITERBI = "VITERBI";
 
+  private final String MSV = "MSV";
 
-  public List<Double> getInsertZeroEmissions()
-  {
-    return insertZeroEmissions;
-  }
+  private final String FORWARD = "FORWARD";
+
+  private final String MAP = "MAP";
+
+  private final String REFERENCE_ANNOTATION = "RF";
+
+  private final String CONSENSUS_RESIDUE = "CONS";
+
+  private final String CONSENSUS_STRUCTURE = "CS";
+
+  private final String MASKED_VALUE = "MM";
+  
+  final static String[] TRANSITION_TYPES = new String[] { "m->m", "m->i",
+      "m->d", "i->m", "i->i", "d->m", "d->d" };
 
-  public void setInsertZeroEmissions(List<Double> insertZeroEmissionsL)
+  public String getTransitionType(int index)
   {
-    this.insertZeroEmissions = insertZeroEmissionsL;
+    return TRANSITION_TYPES[index];
   }
 
-  public List<List<Double>> getMatchEmissions()
+  public String[] getTransitionTypes()
   {
-    return matchEmissions;
+    return TRANSITION_TYPES;
   }
-
-  public void setMatchEmissions(List<List<Double>> matchEmissionsL)
+  public char getSymbol(int index)
   {
-    this.matchEmissions = matchEmissionsL;
+    return getSymbols().get(index);
   }
-
-  public List<List<Double>> getInsertEmissions()
+  public Map<String, String> getFileProperties()
   {
-    return insertEmissions;
+    return fileProperties;
   }
 
-  public void setInsertEmissions(List<List<Double>> insertEmissionsL)
+  public HMMNode getNode(int nodeIndex)
   {
-    this.insertEmissions = insertEmissionsL;
+    return getNodes().get(nodeIndex);
   }
-  public void fillSymbols(String line)
+
+  public void setSymbols(List<Character> symbolsL)
   {
-    Scanner scanner = new Scanner(line);
-    scanner.next();
-    while (scanner.hasNext())
-    {
-      symbols.add(scanner.next().charAt(0));
-    }
-    scanner.close();
+    this.symbols = symbolsL;
   }
 
   public String getName()
   {
-    return fileProperties.get("NAME");
+    return fileProperties.get(NAME);
   }
   public String getAccessionNumber()
   {
-    return fileProperties.get("ACC");
+    return fileProperties.get(ACCESSION_NUMBER);
   }
 
   public void setAccessionNumber(String value)
   {
-    fileProperties.put("ACC", value);
+    fileProperties.put(ACCESSION_NUMBER, value);
   }
 
   public String getDescription()
   {
-    return fileProperties.get("DESC");
+    return fileProperties.get(DESCRIPTION);
   }
 
   public void setDescription(String value)
   {
-    fileProperties.put("DESC", value);
+    fileProperties.put(DESCRIPTION, value);
   }
 
   public Integer getLength()
   {
-    if (fileProperties.get("LENG") == null)
+    if (fileProperties.get(LENGTH) == null)
     {
       return null;
     }
-    return Integer.parseInt(fileProperties.get("LENG"));
+    return Integer.parseInt(fileProperties.get(LENGTH));
   }
 
   public void setLength(int value)
   {
-    fileProperties.put("LENG", String.valueOf(value));
+    fileProperties.put(LENGTH, String.valueOf(value));
   }
 
   public Integer getMaxInstanceLength()
   {
-    if (fileProperties.get("MAXL") == null)
+    if (fileProperties.get(MAX_LENGTH) == null)
     {
       return null;
     }
-    return Integer.parseInt(fileProperties.get("MAXL"));
+    return Integer.parseInt(fileProperties.get(MAX_LENGTH));
   }
 
   public void setMaxInstanceLength(int value)
   {
-    fileProperties.put("MAXL", String.valueOf(value));
+    fileProperties.put(MAX_LENGTH, String.valueOf(value));
   }
 
   // gets type of symbol alphabet - "amino", "DNA", "RNA"
   public String getAlphabetType()
   {
-    return fileProperties.get("ALPH");
+    return fileProperties.get(ALPHABET);
   }
 
   public void setAlphabetType(String value)
   {
-    fileProperties.put("ALPH", value);
+    fileProperties.put(ALPHABET, value);
   }
 
-  // returns boolean indicating whether the reference annotation character field
-  // for each match state is valid or ignored
-  public boolean getReferenceAnnotationFlag()
+  // not sure whether to implement this with Date object
+  public String getDate()
   {
-    if (fileProperties.get("RF") != null)
-    {
-      if (fileProperties.get("RF").equals(yes))
-      {
-        return true;
-      }
-    }
-    return false;
+    return fileProperties.get(DATE);
   }
 
-  public void setReferenceAnnotationFlag(boolean value)
+  public void setDate(String value)
   {
-    if (value)
-    {
-      fileProperties.put("RF", yes);
-    }
-    else
-    {
-      fileProperties.put("RF", no);
-    }
-
+    fileProperties.put(DATE, value);
   }
 
-  // returns boolean indicating whether the model mask annotation character
-  // field
-  // for each match state is valid or ignored
-  public boolean getModelMaskedFlag()
+  // not sure whether to implement this
+  public String getCommandLineLog()
   {
-    if (fileProperties.get("MM") != null)
-    {
-      if (fileProperties.get("MM").equals(yes))
-      {
-        return true;
-      }
-    }
-    return false;
+    return fileProperties.get(COMMAND_LOG);
   }
 
-  public void setModelMaskedFlag(boolean value)
+  public void setCommandLineLog(String value)
   {
-    if (value)
-    {
-      fileProperties.put("MM", yes);
-    }
-    else
-    {
-      fileProperties.put("MM", no);
-    }
+    fileProperties.put(COMMAND_LOG, value);
   }
 
-  // returns boolean indicating whether the consensus residue field
-  // for each match state is valid or ignored
-  public boolean getConsensusResidueAnnotationFlag()
+  // gets the number of sequences that the HMM was trained on
+  public Integer getNumberOfSequences()
   {
-    if (fileProperties.get("CONS") != null)
+    if (fileProperties.get(NUMBER_OF_SEQUENCES) == null)
     {
-      if (fileProperties.get("CONS").equals(yes))
-      {
-        return true;
-      }
+      return null;
     }
-    return false;
+    return Integer.parseInt(fileProperties.get(NUMBER_OF_SEQUENCES));
   }
 
-  public void setConsensusResidueeAnnotationFlag(boolean value)
+  public void setNumberOfSequences(int value)
   {
-    if (value)
-    {
-      fileProperties.put("CONS", yes);
-    }
-    else
-    {
-      fileProperties.put("CONS", no);
-    }
+    fileProperties.put(NUMBER_OF_SEQUENCES, String.valueOf(value));
   }
 
-  // returns boolean indicating whether the consensus structure character field
-  // for each match state is valid or ignored
-  public boolean getConsensusStructureAnnotationFlag()
+  // gets the effective number determined during sequence weighting
+  public Double getEffectiveNumberOfSequences()
   {
-    if (fileProperties.get("CS") != null)
+    if (fileProperties.get(LENGTH) == null)
     {
-      if (fileProperties.get("CS").equals(yes))
-      {
-        return true;
-      }
+      return null;
     }
-    return false;
+    return Double.parseDouble(fileProperties.get(EFF_NUMBER_OF_SEQUENCES));
   }
 
-  public void setConsensusStructureAnnotationFlag(boolean value)
+  public void setEffectiveNumberOfSequences(double value)
   {
-    if (value)
-    {
-      fileProperties.put("CS", yes);
-    }
-    else
-    {
-      fileProperties.put("CS", no);
-    }
+    fileProperties.put(EFF_NUMBER_OF_SEQUENCES, String.valueOf(value));
   }
 
-  // returns boolean indicating whether the model mask annotation character
-  // field
-  // for each match state is valid or ignored
-  public boolean getMapAnnotationFlag()
+  public Long getCheckSum()
   {
-    if (fileProperties.get("MAP") != null)
+    if (fileProperties.get(LENGTH) == null)
     {
-      if (fileProperties.get("MAP").equals(yes))
-      {
-        return true;
-      }
+      return null;
     }
-    return false;
+    return Long.parseLong(fileProperties.get(CHECK_SUM));
   }
 
-  public void setMapAnnotationFlag(boolean value)
+  public void setCheckSum(long value)
   {
-    if (value)
-    {
-      fileProperties.put("MAP", yes);
-    }
-    else
-    {
-      fileProperties.put("MAP", no);
-    }
+    fileProperties.put(CHECK_SUM, String.valueOf(value));
   }
 
-  // not sure whether to implement this with Date object
-  public String getDate()
+  public List<HMMNode> getNodes()
   {
-    return fileProperties.get("DATE");
+    return nodes;
   }
 
-  public void setDate(String value)
+  public void setNodes(List<HMMNode> nodes)
   {
-    fileProperties.put("DATE", value);
+    this.nodes = nodes;
   }
-
-  // not sure whether to implement this
-  public String getCommandLineLog()
+  
+  /**
+   * gets the match emission at a node for a symbol
+   * @param nodeIndex
+   * position of node in model
+   * @param symbolIndex
+   * index of symbol being searched
+   * @return
+   * negative log probability of a match emission of the given symbol
+   */
+  public double getMatchEmission(int nodeIndex, int symbolIndex)
+  {
+    double value = nodes.get(nodeIndex).getMatchEmissions().get(symbolIndex);
+    return value;
+  }
+  
+  /**
+   * gets the insert emission at a node for a symbol
+   * @param nodeIndex
+   * position of node in model
+   * @param symbolIndex
+   * index of symbol being searched
+   * @return
+   * negative log probability of an insert emission of the given symbol
+   */
+  public double getInsertEmission(int nodeIndex, int symbolIndex)
+  {
+    double value = nodes.get(nodeIndex).getInsertEmissions().get(symbolIndex);
+    return value;
+  }
+  
+  /**
+   * gets the state transition at a node for a specific transition
+   * @param nodeIndex
+   * position of node in model
+   * @param transitionIndex
+   * index of stransition being searched
+   * @return
+   * negative log probability of a state transition of the given type
+   */
+  public double getStateTransition(int nodeIndex, int transitionIndex)
   {
-    return fileProperties.get("COM");
+    double value = nodes.get(nodeIndex).getStateTransitions()
+            .get(transitionIndex);
+    return value;
   }
-
-  public void setCommandLineLog(String value)
+  
+  public Integer getNodeAlignmentColumn(int nodeIndex)
   {
-    fileProperties.put("COM", value);
+    Integer value = nodes.get(nodeIndex).getAlignmentColumn();
+   return value;
   }
-
-  // gets the number of sequences that the HMM was trained on
-  public Integer getSequenceNumber()
+  
+  public char getConsensusResidue(int nodeIndex)
   {
-    if (fileProperties.get("NSEQ") == null)
-    {
-      return null;
-    }
-    return Integer.parseInt(fileProperties.get("NSEQ"));
+   char value = nodes.get(nodeIndex).getConsensusResidue();
+   return value;
   }
-
-  public void setSequenceNumber(int value)
+  
+  public char getReferenceAnnotation(int nodeIndex)
   {
-    fileProperties.put("NSEQ", String.valueOf(value));
+   char value = nodes.get(nodeIndex).getReferenceAnnotation();
+   return value;
   }
-
-  // gets the effective number determined during sequence weighting
-  public Double getEffectiveSequenceNumber()
+  
+  public char getMaskedValue(int nodeIndex)
   {
-    if (fileProperties.get("LENG") == null)
-    {
-      return null;
-    }
-    return Double.parseDouble(fileProperties.get("EFFN"));
+   char value = nodes.get(nodeIndex).getMaskValue();
+   return value;
   }
-
-  public void setEffectiveSequenceNumber(double value)
+  
+  public char getConsensusStructure(int nodeIndex)
   {
-    fileProperties.put("EFFN", String.valueOf(value));
+   char value = nodes.get(nodeIndex).getConsensusStructure();
+   return value;
+  }
+  
+  /**
+   * returns the average match emission for a given symbol
+   * @param symbolIndex
+   * index of symbol
+   * @return
+   * average negative log propbability of a match emission of the given symbol
+   */
+  public double getAverageMatchEmission(int symbolIndex)
+  {
+    double value = nodes.get(0).getMatchEmissions().get(symbolIndex);
+    return value;
   }
 
-  public Long getCheckSum()
+  public int getNumberOfSymbols()
   {
-    if (fileProperties.get("LENG") == null)
-    {
-      return null;
-    }
-    return Long.parseLong(fileProperties.get("CKSUM"));
+    return numberOfSymbols;
   }
 
-  public void setCheckSum(long value)
+  public void setNumberOfSymbols(int numberOfSymbols)
   {
-    fileProperties.put("CKSUM", String.valueOf(value));
+    this.numberOfSymbols = numberOfSymbols;
   }
 
-  public Double getGatheringThreshold1()
+  public List<Character> getSymbols()
   {
-    try
-    {
-    return pfamData.get("GA")[0];
-    } catch (NullPointerException e)
-    {
-      return null;
+    return symbols;
+  }
+
+
+  /**
+   * fills symbol array and also finds numberOfSymbols
+   * 
+   * @param parser
+   *          scanner scanning symbol line in file
+   */
+  public void fillSymbols(Scanner parser)
+  {
+    while (parser.hasNext())
+    {
+      String strSymbol = parser.next();
+      char[] symbol = strSymbol.toCharArray();
+      symbols.add(symbol[0]);
     }
+    numberOfSymbols = symbols.size();
   }
 
-  public void setPFAMData(String key, Double[] data)
+  /**
+   * adds file property
+   * 
+   * @param key
+   * @param value
+   */
+  public void addFileProperty(String key, String value)
   {
-    pfamData.put(key, data);
+    fileProperties.put(key, value);
   }
 
-  public Double getGatheringThreshold2()
+  public boolean referenceAnnotationIsActive()
   {
-    try
-    {
-      return pfamData.get("GA")[1];
-    } catch (NullPointerException e)
+    String status;
+    status = fileProperties.get(REFERENCE_ANNOTATION);
+    if (status == null)
     {
-      return null;
+      return false;
+    }
+    switch (status)
+    {
+    case YES:
+      return true;
+    case NO:
+      return false;
+    default:
+      return false;
     }
 
   }
 
-  public Double getTrustedCutoff1()
+  public boolean maskValueIsActive()
   {
-    try
-    {
-      return pfamData.get("TC")[0];
-    } catch (NullPointerException e)
+    String status;
+    status = fileProperties.get(MASKED_VALUE);
+    if (status == null)
     {
-      return null;
+      return false;
+    }
+    switch (status)
+    {
+    case YES:
+      return true;
+    case NO:
+      return false;
+    default:
+      return false;
     }
 
   }
 
-  public Double getTrustedCutoff2()
+  public boolean consensusResidueIsActive()
   {
-    try
-    {
-      return pfamData.get("TC")[1];
-    } catch (NullPointerException e)
+    String status;
+    status = fileProperties.get(CONSENSUS_RESIDUE);
+    if (status == null)
     {
-      return null;
+      return false;
+    }
+    switch (status)
+    {
+    case YES:
+      return true;
+    case NO:
+      return false;
+    default:
+      return false;
     }
 
   }
 
-  public Double getNoiseCutoff1()
+  public boolean consensusStructureIsActive()
   {
-    try
-    {
-      return pfamData.get("NC")[0];
-    } catch (NullPointerException e)
+    String status;
+    status = fileProperties.get(CONSENSUS_STRUCTURE);
+    if (status == null)
     {
-      return null;
+      return false;
+    }
+    switch (status)
+    {
+    case YES:
+      return true;
+    case NO:
+      return false;
+    default:
+      return false;
     }
 
   }
 
-  public Double getNoiseCutoff2()
+  public boolean mapIsActive()
   {
-    try
-    {
-      return pfamData.get("NC")[1];
-    } catch (NullPointerException e)
+    String status;
+    status = fileProperties.get(MAP);
+    if (status == null)
     {
-      return null;
+      return false;
+    }
+    switch (status)
+    {
+    case YES:
+      return true;
+    case NO:
+      return false;
+    default:
+      return false;
     }
 
   }
 
-  public String getAlignmentModeConfiguration(String key)
+  public void setAlignmentColumn(int nodeIndex, int column)
   {
-    return eValueStatistics.get(key).alignmentModeConfiguration;
+    nodes.get(nodeIndex).setAlignmentColumn(column);
   }
 
-  public Double getSlopeOfDistribution(String scoreDistribution)
+  public void setReferenceAnnotation(int nodeIndex, char value)
   {
-    try
-    {
-    return eValueStatistics.get(scoreDistribution).slopeOfDistribution;
-    } catch (NullPointerException e)
-    {
-      return null;
-    }
+    nodes.get(nodeIndex).setReferenceAnnotation(value);
   }
 
-  public Double getLocationOfDistribution(String scoreDistribution)
+  public void setConsensusResidue(int nodeIndex, char value)
   {
-    try
-    {
-      return eValueStatistics.get(scoreDistribution).locationOfDistribution;
-    } catch (NullPointerException e)
-    {
-      return null;
-    }
+    nodes.get(nodeIndex).setConsensusResidue(value);
   }
 
-  public void addStatistic(String name, EValueStatistic stats)
+  public void setConsensusStructure(int nodeIndex, char value)
   {
-    eValueStatistics.put(name, stats);
+    nodes.get(nodeIndex).setConsensusStructure(value);
   }
 
-  /**
-   * public double getBeginStateTransitions(Character symbol) { return
-   * beginStateTransitions.get(symbol); }
-   **/
+  public void setMaskValue(int nodeIndex, char value)
+  {
+    nodes.get(nodeIndex).setMaskValue(value);
+  }
 
-  public void put(String key, String value)
+  public String getGatheringThreshold()
   {
-    fileProperties.put(key, value);
+    String value;
+    value = fileProperties.get("GA");
+    return value;
   }
 
-  public Map<String, EValueStatistic> getEValueStatistics()
+  public String getNoiseCutoff()
   {
-    return eValueStatistics;
+    String value;
+    value = fileProperties.get("NC");
+    return value;
   }
 
-  public void setEValueStatistics(
-          Map<String, EValueStatistic> eValueStatisticsM)
+  public String getTrustedCutoff()
   {
-    this.eValueStatistics = eValueStatisticsM;
+    String value;
+    value = fileProperties.get("TC");
+    return value;
   }
 
-  public List<Integer> getAlignmentColumnIndexes()
+  public String getViterbi()
   {
-    return alignmentColumnIndexes;
+    String value;
+    value = fileProperties.get(VITERBI);
+    return value;
   }
 
-  public void setAlignmentColumnIndexes(
-          List<Integer> alignmentColumnIndexesL)
+  public String getMSV()
   {
-    this.alignmentColumnIndexes = alignmentColumnIndexesL;
+    String value;
+    value = fileProperties.get(MSV);
+    return value;
   }
 
-  public List<HashMap<String, Character>> getAnnotations()
+  public String getForward()
   {
-    return annotations;
+    String value;
+    value = fileProperties.get(FORWARD);
+    return value;
   }
 
-  public void setAnnotations(List<HashMap<String, Character>> annotationsL)
+  public void setMAPStatus(boolean status)
   {
-    this.annotations = annotationsL;
+    if (status == true)
+    {
+      fileProperties.put(MAP, YES);
+    }
+    else
+    {
+      fileProperties.put(MAP, NO);
+    }
   }
 
-  public Map<String, String> getFileProperties()
+  public void setReferenceAnnotationStatus(boolean status)
   {
-    return fileProperties;
+    if (status == true)
+    {
+      fileProperties.put(REFERENCE_ANNOTATION, YES);
+    }
+    else
+    {
+      fileProperties.put(REFERENCE_ANNOTATION, NO);
+    }
+  }
+
+  public void setMaskedValueStatus(boolean status)
+  {
+    if (status == true)
+    {
+      fileProperties.put(MASKED_VALUE, YES);
+    }
+    else
+    {
+      fileProperties.put(MASKED_VALUE, NO);
+    }
+  }
+
+  public void setConsensusResidueStatus(boolean status)
+  {
+    if (status == true)
+    {
+      fileProperties.put(CONSENSUS_RESIDUE, YES);
+    }
+    else
+    {
+      fileProperties.put(CONSENSUS_RESIDUE, NO);
+    }
   }
 
-  public void setFileProperties(Map<String, String> fileProperties)
+  public void setConsensusStructureStatus(boolean status)
   {
-    this.fileProperties = fileProperties;
+    if (status == true)
+    {
+      fileProperties.put(CONSENSUS_STRUCTURE, YES);
+    }
+    else
+    {
+      fileProperties.put(CONSENSUS_STRUCTURE, NO);
+    }
   }
 }