Start scan s features at.

@param seq the seq
@param pos the pos
516213
void startScanSFeaturesAt(List seq, int pos) {	
	sFeatures.clear();
	sFeatureIdx = 0;
	
	Observation obsr = (Observation)seq.get(pos);
	    
	// scan over all context predicates
	for (int i = 0; i < obsr.cps.length; i++) {
	    Element elem = (Element)dict.dict.get(new Integer(obsr.cps[i]));
	    if (elem == null) {
		continue;
	    }
	    
	    if (!(elem.isScanned)) {
		// scan all labels for state feature
		Iterator it = elem.lbCntFidxes.keySet().iterator();
		while (it.hasNext()) {
		    Integer label = (Integer)it.next();
		    CountFeatureIdx cntFidx = (CountFeatureIdx)elem.lbCntFidxes.get(label);

		    if (cntFidx.fidx >= 0) {
			Feature sF = new Feature();
			sF.sFeature1Init(label.intValue(), obsr.cps[i]);
			sF.idx = cntFidx.fidx;
			
			elem.cpFeatures.add(sF);
		    }	    
		}		
		
		elem.isScanned = true;
	    }
	    
	    for (int j = 0; j < elem.cpFeatures.size(); j++) {
		sFeatures.add(elem.cpFeatures.get(j));
	    }
	}		
    }
570326
public boolean matches(String seq) {
        return queue.regionMatches(true, pos, seq, 0, seq.length());
    }
144698
def _peek(self, *types):
        """"""
        tok = self._scanner.token(self._pos, types)
        return tok[2]
572948
private void set(int pos, String s) {
        buffer.delete(pos, buffer.length());
        buffer.insert(pos, s);
    }
45048
def scan_sequence(self, frame, direction):
        
        orf_start = None
        for c, index in self.codons(frame):
            if (c not in self.stop and (c in self.start or not self.start)
                and orf_start is None):
                orf_start = index
            elif c in self.stop and orf_start is not None:
                self._update_longest(orf_start, index + 3, direction, frame)
                orf_start = None

        if orf_start is not None:
            self._update_longest(orf_start, index + 3, direction, frame)
963814
public void select(int pos) {
        if (pos >= 0) {
            try {
                int line = getLineOfOffset(pos);
                Rectangle rect = modelToView(pos);
                if (rect == null) {
                    select(pos, pos);
                } else {
                    try {
                        Rectangle nrect =
                            modelToView(getLineStartOffset(line + 1));
                        if (nrect != null) {
                            rect = nrect;
                        }
                    } catch (Exception exc) {
                    }
                    JViewport vp = (JViewport)getParent();
                    Rectangle viewRect = vp.getViewRect();
                    if (viewRect.y + viewRect.height > rect.y) {
                        // need to scroll up
                        select(pos, pos);
                    } else {
                        // need to scroll down
                        rect.y += (viewRect.height - rect.height)/2;
                        scrollRectToVisible(rect);
                        select(pos, pos);
                    }
                }
            } catch (BadLocationException exc) {
                select(pos, pos);
                //exc.printStackTrace();
            }
        }
    }
1200938
public void tail(int pos) {
		assert !isRecycled() : "Attempt to use recycled bytebuf";
		assert pos >= head && pos <= array.length;
		tail = pos;
	}
322819
protected void processWhiteSpace(int pos, int endPos) {
        if (scannerDebug)
            System.out.println("processWhitespace(" + pos
                               + "," + endPos + ")=|" +
                               new String(reader.getRawCharacters(pos, endPos))
                               + "|");
    }
667731
private void handleSequenceAnnotation(String seqName, String featureName, String value) {
		if (featureName.equals(GS_ACCESSION_NUMBER)) {
			stockholmStructure.addGSAccessionNumber(seqName, value);
		} else if (featureName.equals(GS_DESCRIPTION)) {
			stockholmStructure.addGSDescription(seqName, value);
		} else if (featureName.equals(GS_DATABASE_REFERENCE)) {
			stockholmStructure.addGSdbReference(seqName, value);
		} else if (featureName.equals(GS_ORGANISM_SPECIES)) {
			stockholmStructure.addGSOrganismSpecies(seqName, value);
		} else if (featureName.equals(GS_ORGANISM_CLASSIFICATION)) {
			stockholmStructure.addGSOrganismClassification(seqName, value);
		} else if (featureName.equals(GS_LOOK)) {
			stockholmStructure.addGSLook(seqName, value);
		} else {
			// unknown feature
			logger.warn("Unknown Sequence Feature [{}].\nPlease contact the Biojava team.", featureName);
		}
	}
260153
private void addSequence(String sequenceName, HighLowSequence seq)
    {
        // lookup the sequence map for calling DB
        String jcdAlias = getBrokerForClass()
                .serviceConnectionManager().getConnectionDescriptor().getJcdAlias();
        Map mapForDB = (Map) sequencesDBMap.get(jcdAlias);
        if(mapForDB == null)
        {
            mapForDB = new HashMap();
        }
        mapForDB.put(sequenceName, seq);
        sequencesDBMap.put(jcdAlias, mapForDB);
    }
676283
public void putString(int pos, CharSequence s) {
		for (int i = 0; i < s.length(); ++i) {
			char c = s.charAt(i);
			byte b0 = (byte)c;
			byte b1 = (byte)(c >> 8);
			if (_order == ByteOrder.BIG_ENDIAN) {
				putBytes(pos, b1, b0);
			} else {
				putBytes(pos, b0, b1);
			}
			pos += 2;
		}
	}
1315300
private void setNextSamplePosition(long position)
    {
        tryAgain: while (true)
        {
            position += minIndexInterval;
            long test = indexIntervalMatches++;
            for (int start : startPoints)
                if ((test - start) % BASE_SAMPLING_LEVEL == 0)
                    continue tryAgain;

            nextSamplePosition = position;
            return;
        }
    }
140479
public void addAlignedSequence(S sequence){
		if(length == null){
			length = sequence.getLength();
		}
		if(sequence.getLength() != length){
			throw new IllegalArgumentException(sequence.getAccession() + " length = " + sequence.getLength() +
					" not equal to MSA length = " + length);
		}
		sequences.add(sequence);
	}
410484
private void handleResidueAnnotation(String seqName, String featureName, String value) {

		if (featureName.equals(GR_SURFACE_ACCESSIBILITY)) {
			stockholmStructure.addSurfaceAccessibility(seqName, value);
		} else if (featureName.equals(GR_TRANS_MEMBRANE)) {
			stockholmStructure.addTransMembrane(seqName, value);
		} else if (featureName.equals(GR_POSTERIOR_PROBABILITY)) {
			stockholmStructure.addPosteriorProbability(seqName, value);
		} else if (featureName.equals(GR_LIGAND_BINDING)) {
			stockholmStructure.addLigandBinding(seqName, value);
		} else if (featureName.equals(GR_ACTIVE_SITE)) {
			stockholmStructure.addActiveSite(seqName, value);
		} else if (featureName.equals(GR_AS_PFAM_PREDICTED)) {
			stockholmStructure.addASPFamPredicted(seqName, value);
		} else if (featureName.equals(GR_AS_SWISSPROT)) {
			stockholmStructure.addASSwissProt(seqName, value);
		} else if (featureName.equals(GR_INTRON)) {
			stockholmStructure.addIntron(seqName, value);
		} else if (featureName.equals(GR_SECONDARY_STRUCTURE)) {
			stockholmStructure.addSecondaryStructure(seqName, value);
		} else {
			// unknown feature
			logger.warn("Unknown Residue Feature [{}].\nPlease contact the Biojava team.", featureName);
		}
	}
1077426
int nextIndexOf(CharSequence seq) {
        bufferUp();
        // doesn't handle scanning for surrogates
        char startChar = seq.charAt(0);
        for (int offset = bufPos; offset < bufLength; offset++) {
            // scan to first instance of startchar:
            if (startChar != charBuf[offset])
                while(++offset < bufLength && startChar != charBuf[offset]) { /* empty */ }
            int i = offset + 1;
            int last = i + seq.length()-1;
            if (offset < bufLength && last <= bufLength) {
                for (int j = 1; i < last && seq.charAt(j) == charBuf[i]; i++, j++) { /* empty */ }
                if (i == last) // found full sequence
                    return offset - bufPos;
            }
        }
        return -1;
    }
108879
function(pos){
		var pos0 = this.cursor.getaddr();
		this.cursor.setaddr(pos);
		pos0.draw();
		pos.draw();
	}
691820
public void sequence(FA seq) {
        int idx;
        int relocation;

        relocation = append(seq);

        if (seq.start != -1) {
            for (idx = ends.first(); idx != -1; idx = ends.next(idx)) {
                states[idx].add(relocation + seq.start, null);
            }
        }

        ends.clear();
        for (idx = seq.ends.first(); idx != -1; idx = seq.ends.next(idx)) {
            ends.add(idx + relocation);
        }
    }