1 /* $Id: matrix_frequency_data.h,v 1.5 2006/04/03 17:43:51 gertz Exp $ 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government have not placed any restriction on its use or reproduction. 13 * 14 * Although all reasonable efforts have been taken to ensure the accuracy 15 * and reliability of the software and data, the NLM and the U.S. 16 * Government do not and cannot warrant the performance or results that 17 * may be obtained by using this software or data. The NLM and the U.S. 18 * Government disclaim all warranties, express or implied, including 19 * warranties of performance, merchantability or fitness for any particular 20 * purpose. 21 * 22 * Please cite the author in any work or product based on this material. 23 * 24 * ===========================================================================*/ 25 /** 26 * @file matrix_frequency_data.h 27 * Definitions used to get joint probabilities for a scoring matrix 28 * 29 * @author Alejandro Schaffer, E. Michael Gertz 30 */ 31 #ifndef __MATRIX_FREQUENCY_DATA__ 32 #define __MATRIX_FREQUENCY_DATA__ 33 34 #include <algo/blast/core/blast_export.h> 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 39 40 /** 41 * Get joint probabilities for the named matrix. 42 * 43 * @param probs the joint probabilities [out] 44 * @param row_sums sum of the values in each row of probs [out] 45 * @param col_sums sum of the values in each column of probs [out] 46 * @param matrixName the name of the matrix sought [in] 47 * @returns 0 if successful; -1 if the named matrix is not known. 48 */ 49 NCBI_XBLAST_EXPORT 50 int Blast_GetJointProbsForMatrix(double ** probs, double row_sums[], 51 double col_sums[], const char *matrixName); 52 53 54 /** Return true if frequency data is available for the given matrix name. */ 55 NCBI_XBLAST_EXPORT 56 const double * Blast_GetMatrixBackgroundFreq(const char *matrix_name); 57 58 59 /** Retrieve the background letter probabilities implicitly used in 60 * constructing the score matrix matrix_name. */ 61 NCBI_XBLAST_EXPORT 62 int Blast_FrequencyDataIsAvailable(const char *matrix_name); 63 64 #ifdef __cplusplus 65 } 66 #endif 67 68 #endif 69