- String newName = SeqsetUtils.unique_name(seqs.size() + 1);
- if (seqNames != null)
- seqNames.put(newName, sq);
- Sequence seq;
- if (submitGaps)
- {
- seq = new Sequence(newName, sq.getSequenceAsString());
- gapMapSize = Math.max(gapMapSize, seq.getLength());
- for (int pos : sq.gapMap())
- {
- char sqchr = sq.getCharAt(pos);
- boolean include = !filterNonStandardResidues;
- include |= sq.isProtein() ? ResidueProperties.aaIndex[sqchr] < 20
- : ResidueProperties.nucleotideIndex[sqchr] < 5;
- if (include)
- gapMap.set(pos);
- }
- }
- else
- {
- // TODO: add ability to exclude hidden regions
- seq = new Sequence(newName, AlignSeq.extractGaps(Comparison.GapChars,
- sq.getSequenceAsString(start, end + 1)));
- // for annotation need to also record map to sequence start/end
- // position in range
- // then transfer back to original sequence on return.
- }
- seqs.add(seq);
- ln = Math.max(ln, seq.getLength());
+ // TODO: add ability to exclude hidden regions
+ seq = new Sequence(newName,
+ AlignSeq.extractGaps(Comparison.GapChars, new String(seqChars)));
+ // for annotation need to also record map to sequence start/end
+ // position in range
+ // then transfer back to original sequence on return.