All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sequence.Sequence Maven / Gradle / Ivy

Go to download

nthash-java searches for k-mer substring in a really long DNA sequence using multi-threading and Rabin-Karp algorithm.

The newest version!
package sequence;

import java.util.List;

public interface Sequence {
	/**
	 * Builds the index based on the length of the k-mer.
	 * @param k length of the k-mer
	 * @throws Exception throws exception when errors occur on database end
	 */
	public void buildIndex(long k) throws Exception;
	
	/**
	 * Gets positions of the sequence that matches with k-mer. If an index has been built, then this method
	 * tries to use that index to perform faster look-up.
	 * @param kmer sub-sequence to search for
	 * @return list of matching starting positions in this sequence
	 * @throws Exception throws exception 
	 */
	public List getMatchingPositions(Sequence kmer) throws Exception;
	
	/**
	 * @return size of the sequence
	 */
	public long getSize();
	
	/**
	 * @param position the position of the sequence
	 * @return the base at the position provided
	 */
	public Base getBase(long position);
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy