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

org.biojava.nbio.ws.alignment.RemotePairwiseAlignmentService Maven / Gradle / Ivy

Go to download

This module deals with bioinformatics web services that could be used to process Biojava objects in a useful manner.

There is a newer version: 7.1.3
Show newest version
/*
 *                    BioJava development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the individual
 * authors.  These should be listed in @author doc comments.
 *
 * For more information on the BioJava project and its aims,
 * or to join the biojava-l mailing list, visit the home page
 * at:
 *
 *      http://www.biojava.org/
 *
 */
package org.biojava.nbio.ws.alignment;

import org.biojava.nbio.core.sequence.template.Compound;
import org.biojava.nbio.core.sequence.template.Sequence;

import java.io.InputStream;
/**
 * This interface specifies minimal information needed to execute a pairwise alignment on a remote service.
 *
 * Example of service: QBlast service at NCBI
 *                     Web Service at EBI
 *
 * @author Sylvain Foisy
 * @since Biojava 3
 *
 */
public interface RemotePairwiseAlignmentService {

	/**
	 * Doing the actual analysis on the instantiated service using specified parameters and the RichSequence object
	 *
	 * @throws Exception
	 */
	public String sendAlignmentRequest(Sequence seq, RemotePairwiseAlignmentProperties rpa) throws Exception;

	/**
	 * Doing the actual analysis on the instantiated service using specified parameters on the string representation
	 * of the Sequence object
	 *
	 * @throws Exception
	 */
	public String sendAlignmentRequest(String str, RemotePairwiseAlignmentProperties rpa) throws Exception;

	/**
	 * Simple method to check if the specified request has been completed by the service used.
	 *
	 * @param id :an ID for an alignment request
	 * @param present :a long integer value representing the actual time
	 * @return a boolean value telling if this requestID has been completed or not.
	 * @throws Exception if the ID does not exist.
	 */
	public boolean isReady(String id,long present) throws Exception;

	/**
	 * Getting the actual alignment results from this instantiated service for a given ID with specific
	 * formatting parameters held in a RemotePairwiseAlignmentOutputProperties-implemented object.
	 *
	 * @param rid :a String with the request ID for this single alignment run
	 * @param out :a RemotePairwiseAlignmentOutputProperties with the specific output instructions.
	 * @return : an InputStream with the actual alignment results
	 * @throws Exception
	 */
	public InputStream getAlignmentResults(String rid,RemotePairwiseAlignmentOutputProperties out) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy