package org.opencb.biodata.tools.alignment;

/**
 * Created by pfurio on 26/10/16.
 */
public class AlignmentOptions {

    private boolean contained;
    private boolean binQualities;
    private boolean calculateMD;
    private int limit;

    public static final int DEFAULT_LIMIT = 50000;

    public AlignmentOptions() {
        this(false, false, false, DEFAULT_LIMIT);
    }

    public AlignmentOptions(boolean contained, boolean binQualities, boolean calculateMD, int limit) {
        this.contained = contained;
        this.binQualities = binQualities;
        this.calculateMD = calculateMD;
        this.limit = limit;
    }


    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("AlignmentOptions{");
        sb.append("contained=").append(contained);
        sb.append(", binQualities=").append(binQualities);
        sb.append(", calculateMD=").append(calculateMD);
        sb.append(", limit=").append(limit);
        sb.append('}');
        return sb.toString();
    }

    public AlignmentOptions setContained(boolean contained) {
        this.contained = contained;
        return this;
    }

    public AlignmentOptions setBinQualities(boolean binQualities) {
        this.binQualities = binQualities;
        return this;
    }

    public AlignmentOptions setCalculateMD(boolean calculateMD) {
        this.calculateMD = calculateMD;
        return this;
    }

    public AlignmentOptions setLimit(int limit) {
        this.limit = limit;
        return this;
    }

    public boolean isContained() {
        return contained;
    }

    public boolean isBinQualities() {
        return binQualities;
    }

    public boolean isCalculateMD() {
        return calculateMD;
    }

    public int getLimit() {
        return limit;
    }
}

@@ -207,24 +207,56 @@
 alculateMD;%0A
+    private int minBaseQuality;%0A
     private 
@@ -384,16 +384,19 @@
 , false,
+ 0,
  DEFAULT
@@ -500,16 +500,64 @@
 ulateMD,
+%0A                            int minBaseQuality,
  int lim
@@ -672,32 +672,78 @@
  = calculateMD;%0A
+        this.minBaseQuality = minBaseQuality;%0A
         this.lim
@@ -1047,16 +1047,79 @@
 ateMD);%0A
+        sb.append(%22, minBaseQuality=%22).append(minBaseQuality);%0A
         
@@ -1606,32 +1606,174 @@
 rn this;%0A    %7D%0A%0A
+    public AlignmentOptions setMinBaseQuality(int minBaseQuality) %7B%0A        this.minBaseQuality = minBaseQuality;%0A        return this;%0A    %7D%0A%0A
     public Align
@@ -2068,32 +2068,107 @@
 ulateMD;%0A    %7D%0A%0A
+    public int getMinBaseQuality() %7B%0A        return minBaseQuality;%0A    %7D%0A%0A
     public int g

add minBaseQuality to AlignmentOptions, it will be used to compute coverage