private boolean[] getMutated(Set<String> genes) {
    boolean[] b = new boolean[portalAcc.getAlterations(genes.iterator().next()).getSize()];

    for (String gene : genes) {
      AlterationPack alts = portalAcc.getAlterations(gene);
      Change[] ch = alts.get(Alteration.MUTATION);
      for (int i = 0; i < ch.length; i++) {
        if (ch[i].isAltered()) b[i] = true;
      }
    }
    return b;
  }
  /**
   * Gets the samples that the gene is either mutated or intact. In both cases it is expressed, and
   * not copy number lost.
   */
  private boolean[] selectSubset(String symbol, boolean mutated) {
    AlterationPack alts = portalAcc.getAlterations(symbol);

    Change[] muts = alts.get(Alteration.MUTATION);
    Change[] cncs = alts.get(Alteration.COPY_NUMBER);
    Change[] expz = alts.get(Alteration.EXPRESSION);

    boolean[] x = new boolean[alts.getSize()];

    for (int i = 0; i < x.length; i++) {
      if (ADD_CN_TO_MUT) {
        x[i] =
            (mutated ? muts[i].isAltered() || cncs[i].isAltered() : muts[i] == Change.NO_CHANGE)
                && cncs[i] == Change.NO_CHANGE
                && expz[i] != Change.INHIBITING
                && !expz[i].isAbsent();
      } else {
        x[i] =
            (mutated ? muts[i].isAltered() : muts[i] == Change.NO_CHANGE)
                && cncs[i] != Change.INHIBITING
                && expz[i] != Change.INHIBITING
                && !cncs[i].isAbsent()
                && !expz[i].isAbsent();
      }
    }

    return x;
  }
  private boolean[] getCopyNumberUnchanged(String symbol) {
    AlterationPack alts = portalAcc.getAlterations(symbol);

    if (alts == null) return null;

    Change[] cnc = alts.get(Alteration.COPY_NUMBER);

    if (cnc == null) return null;

    boolean[] b = new boolean[cnc.length];
    for (int i = 0; i < b.length; i++) {
      b[i] = !USE_COPY_NUMBER_UNCHANGED || !cnc[i].isAltered() && !cnc[i].isAbsent();
    }
    return b;
  }