/* Copyright 2013 University of North Carolina at Chapel Hill.  All rights reserved. */
package abra;

/**
 * Settings for Contig Assembly
 * @author Lisle E. Mose (lmose at unc dot edu)
 */
public class AssemblerSettings {

	private int[] kmerSize;
	private int minEdgeFrequency;
	private int minNodeFrequncy;
	private int minUnalignedNodeFrequency;
	private int minContigLength;
	private int maxPotentialContigs;
	private int minBaseQuality;
	private double minReadCandidateFraction;
	private int maxAverageDepth;
	private int averageDepthCeiling;
	private double minEdgeRatio;
	private int maxNodes;
		
	public int getMaxNodes() {
		return maxNodes;
	}

	public void setMaxNodes(int maxNodes) {
		this.maxNodes = maxNodes;
	}

	public double getMinEdgeRatio() {
		return minEdgeRatio;
	}

	public void setMinEdgeRatio(double minEdgeRatio) {
		this.minEdgeRatio = minEdgeRatio;
	}

	public int getAverageDepthCeiling() {
		return averageDepthCeiling;
	}

	public void setAverageDepthCeiling(int averageDepthCeiling) {
		this.averageDepthCeiling = averageDepthCeiling;
	}

	public int getMaxAverageDepth() {
		return maxAverageDepth;
	}

	public void setMaxAverageDepth(int maxAverageDepth) {
		this.maxAverageDepth = maxAverageDepth;
	}

	public double getMinReadCandidateFraction() {
		return minReadCandidateFraction;
	}

	public void setMinReadCandidateFraction(double minReadCandidateFraction) {
		this.minReadCandidateFraction = minReadCandidateFraction;
	}

	public int getMinBaseQuality() {
		return minBaseQuality;
	}

	public void setMinBaseQuality(int minBaseQuality) {
		this.minBaseQuality = minBaseQuality;
	}

	public int[] getKmerSize() {
		return kmerSize;
	}
	
	public void setKmerSize(int[] kmerSize) {
		this.kmerSize = kmerSize;
	}
	
	public void setMinUnalignedNodeFrequency(int minUnalignedNodeFrequency) {
		this.minUnalignedNodeFrequency = minUnalignedNodeFrequency;
	}
	
	public int getMinUnalignedNodeFrequency() {
		return minUnalignedNodeFrequency;
	}
	
	public int getMinNodeFrequncy() {
		return minNodeFrequncy;
	}
	
	public void setMinNodeFrequncy(int minNodeFrequncy) {
		this.minNodeFrequncy = minNodeFrequncy;
	}
	
	public int getMinContigLength() {
		return minContigLength;
	}
	
	public void setMinContigLength(int minContigLength) {
		this.minContigLength = minContigLength;
	}
	
	public int getMaxPotentialContigs() {
		return maxPotentialContigs;
	}
	
	public void setMaxPotentialContigs(int maxPotentialContigs) {
		this.maxPotentialContigs = maxPotentialContigs;
	}
			
	public String getDescription() {
		StringBuffer str = new StringBuffer();
		
		for (int i=0; i<kmerSize.length; i++) {
			appendSetting(str, "kmer" + i, kmerSize[i]);
		}
		appendSetting(str, "minEdgeFrequency", minEdgeFrequency);
		appendSetting(str, "minNodeFrequncy", minNodeFrequncy);
		appendSetting(str, "minContigLength", minContigLength);
		appendSetting(str, "maxPotentialContigs", maxPotentialContigs);
		appendSetting(str, "minBaseQuality", minBaseQuality);
		appendSetting(str, "minReadCandidateFraction", minReadCandidateFraction);
		appendSetting(str, "maxAverageRegionDepth", maxAverageDepth);
		appendSetting(str, "minEdgeRatio", minEdgeRatio);
		
		return str.toString();
	}
	
	private void appendSetting(StringBuffer str, String setting, int value) {
		str.append(setting);
		str.append(": ");
		str.append(value);
		str.append('\n');
	}
	
	private void appendSetting(StringBuffer str, String setting, double value) {
		str.append(setting);
		str.append(": ");
		str.append(value);
		str.append('\n');
	}
}

@@ -378,42 +378,8 @@
 th;%0A
-%09private int maxPotentialContigs;%0A
 %09pri
@@ -2282,199 +2282,8 @@
 %09%7D%0A%09
-%0A%09public int getMaxPotentialContigs() %7B%0A%09%09return maxPotentialContigs;%0A%09%7D%0A%09%0A%09public void setMaxPotentialContigs(int maxPotentialContigs) %7B%0A%09%09this.maxPotentialContigs = maxPotentialContigs;%0A%09%7D%0A
 %09%09%09%0A
@@ -2634,74 +2634,8 @@
 h);%0A
-%09%09appendSetting(str, %22maxPotentialContigs%22, maxPotentialContigs);%0A
 %09%09ap

Remove maxPotentialContigs