⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blast_hits.h

📁 ncbi源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/** Calculate number of identities in an HSP for an out-of-frame alignment. * @param query The query sequence [in] * @param subject The uncompressed subject sequence [in] * @param hsp All information about the HSP [in] * @param program BLAST program (blastx or tblastn) [in] * @param num_ident_ptr Number of identities [out] * @param align_length_ptr The alignment length, including gaps [out] */Int2Blast_HSPGetOOFNumIdentities(Uint1* query, Uint1* subject, BlastHSP* hsp,                              Uint1 program, Int4* num_ident_ptr,                              Int4* align_length_ptr);/********************************************************************************          HSPList API********************************************************************************//** Deallocate memory for an HSP list structure  *  as well as all it's components. * @param hsp_list the BlastHSPList to be freed [in]. */BlastHSPList* Blast_HSPListFree(BlastHSPList* hsp_list);/** Creates HSP list structure with a default size HSP array  * @param hsp_max the maximum number of HSP's that can ever be *    saved at once [in].*/BlastHSPList* Blast_HSPListNew(Int4 hsp_max);/** Saves HSP information into a BlastHSPList structure * @param hsp_list Structure holding all HSPs with full gapped alignment  *        information [in] [out] * @param new_hsp The new HSP to be inserted into the HSPList [in]*/Int2Blast_HSPListSaveHSP(BlastHSPList* hsp_list, BlastHSP* hsp);/** Assign frames in all HSPs in the HSP list. * @param program_number Type of BLAST program [in] * @param hsp_list List of HSPs for one subject sequence [in] [out] * @param is_ooframe Is out-of-frame gapping used? [in]*/void Blast_HSPListSetFrames(Uint1 program_number, BlastHSPList* hsp_list,                  Boolean is_ooframe);/** Calculate the expected values for all HSPs in a hit list, without using  * the sum statistics. In case of multiple queries, the offsets are assumed  * to be already adjusted to individual query coordinates, and the contexts  * are set for each HSP. * @param program The integer BLAST program index [in] * @param query_info Auxiliary query information - needed only for effective *                   search space calculation if it is not provided [in] * @param hsp_list List of HSPs for one subject sequence [in] [out] * @param gapped_calculation Is this for a gapped or ungapped search? [in] * @param sbp Structure containing statistical information [in] */Int2 Blast_HSPListGetEvalues(Uint1 program, BlastQueryInfo* query_info,        BlastHSPList* hsp_list, Boolean gapped_calculation,         BlastScoreBlk* sbp);/** Calculate e-values for a PHI BLAST HSP list. * @param hsp_list HSP list found by PHI BLAST [in] [out] * @param sbp Scoring block with statistical parameters [in] */void Blast_HSPListPHIGetEvalues(BlastHSPList* hsp_list, BlastScoreBlk* sbp);/** Discard the HSPs above the e-value threshold from the HSP list  * @param hsp_list List of HSPs for one subject sequence [in] [out] * @param hit_options Options block containing the e-value cut-off [in]*/Int2 Blast_HSPListReapByEvalue(BlastHSPList* hsp_list,                                BlastHitSavingOptions* hit_options);/** Cleans out the NULLed out HSP's from the HSP array that * is part of the BlastHSPList. * @param hsp_list Contains array of pointers to HSP structures [in] * @return status of function call.*/Int2Blast_HSPListPurgeNullHSPs(BlastHSPList* hsp_list);/** Reevaluate all HSPs in an HSP list, using ambiguity information.  * This is/can only done either for an ungapped search, or if traceback is  * already available. * Subject sequence is uncompressed and saved here. Number of identities is * calculated for each HSP along the way.  * @param hsp_list The list of HSPs for one subject sequence [in] [out] * @param query_blk The query sequence [in] * @param subject_blk The subject sequence [in] [out] * @param hit_options The options related to saving hits [in] * @param query_info Auxiliary query information [in] * @param sbp The statistical information [in] * @param score_params Parameters related to scoring [in] * @param seq_src The BLAST database structure (for retrieving uncompressed *             sequence) [in] */Int2 Blast_HSPListReevaluateWithAmbiguities(BlastHSPList* hsp_list,   BLAST_SequenceBlk* query_blk, BLAST_SequenceBlk* subject_blk,    const BlastHitSavingOptions* hit_options, BlastQueryInfo* query_info,    BlastScoreBlk* sbp, const BlastScoringParameters* score_params,    const BlastSeqSrc* seq_src);/** Append one HSP list to the other. Discard lower scoring HSPs if there is * not enough space to keep all. * @param hsp_list New list of HSPs [in] * @param combined_hsp_list_ptr Pointer to the combined list of HSPs, possibly *                              containing previously saved HSPs [in] [out] * @param hsp_num_max Maximal allowed number of HSPs to save (unlimited if 0) [in] * @return Status: 0 on success, -1 on failure. */ Int2 Blast_HSPListAppend(BlastHSPList* hsp_list,                          BlastHSPList** combined_hsp_list_ptr,                          Int4 hsp_num_max);/** Merge an HSP list from a chunk of the subject sequence into a previously * computed HSP list. * @param hsp_list Contains HSPs from the new chunk [in] * @param combined_hsp_list_ptr Contains HSPs from previous chunks [in] [out] * @param hsp_num_max Maximal allowed number of HSPs to save (unlimited if 0) [in] * @param start Offset where the current subject chunk starts [in] * @param merge_hsps Should the overlapping HSPs be merged into one? [in] * @return 0 if HSP lists have been merged successfully, -1 otherwise. */Int2 Blast_HSPListsMerge(BlastHSPList* hsp_list,                    BlastHSPList** combined_hsp_list_ptr,                    Int4 hsp_num_max, Int4 start, Boolean merge_hsps);/** Adjust subject offsets in an HSP list if only part of the subject sequence * was searched. Used when long subject sequence is split into more manageable * chunks. * @param hsp_list List of HSPs from a chunk of a subject sequence [in] * @param offset Offset where the chunk starts [in] */void Blast_HSPListAdjustOffsets(BlastHSPList* hsp_list, Int4 offset);/********************************************************************************          HitList API.********************************************************************************//** Allocate memory for a hit list of a given size. * @param hitlist_size Size of the hit list (number of HSP lists) [in] */BlastHitList* Blast_HitListNew(Int4 hitlist_size);/** Deallocate memory for the hit list */BlastHitList* Blast_HitListFree(BlastHitList* hitlist);/** Deallocate memory for every HSP list on BlastHitList, *  as well as all their components. * @param hitlist contains the BlastHSPList array to be freed [in/out]. */Int2 Blast_HitListHSPListsFree(BlastHitList* hitlist);/** Insert a new HSP list into the hit list. * Before capacity of the hit list is reached, just add to the end; * After that, store in a heap, to ensure efficient insertion and deletion. * The heap order is reverse, with worst e-value on top, for convenience * of deletion. * @param hit_list Contains all HSP lists saved so far [in] [out] * @param hsp_list A new HSP list to be inserted into the hit list [in]*/Int2 Blast_HitListUpdate(BlastHitList* hit_list, BlastHSPList* hsp_list);/********************************************************************************          HSPResults API.********************************************************************************//** Initialize the results structure. * @param num_queries Number of query sequences to allocate results structure *                    for [in] * @param results_ptr The allocated structure [out] */Int2 Blast_HSPResultsInit(Int4 num_queries, BlastHSPResults** results_ptr);/** Deallocate memory for BLAST results */BlastHSPResults* Blast_HSPResultsFree(BlastHSPResults* results);/** Sort each hit list in the BLAST results by best e-value */Int2 Blast_HSPResultsSortByEvalue(BlastHSPResults* results);/** Blast_HSPResultsSaveHitList *  Save the current hit list to appropriate places in the results structure * @param program The type of BLAST search [in] * @param results The structure holding results for all queries [in] [out] * @param hsp_list The results for the current subject sequence; in case of  *                 multiple queries, offsets are still in the concatenated  *                 sequence coordinates [in] * @param hit_parameters The options/parameters related to saving hits [in] */Int2 Blast_HSPResultsSaveHitList(Uint1 program, BlastHSPResults* results,         BlastHSPList* hsp_list, BlastHitSavingParameters* hit_parameters);/** Convert a prelimiary list of HSPs, that are the result of * an RPS blast search, to a format compatible with the rest * of the blast engine. RPS blast takes a single query and the * concatenation of all DB sequences; the DB sequences are the * query input to the engine, and the single query is treated as * a single subject sequence. This function should be invoked  * after BLAST_SearchEngineCore() but before BLAST_RPSTraceback(). * *   BEFORE THIS CALL      AFTER THIS CALL *  - many HitLists        - one HitList *  - each HitList has     - the HitList has *    one HSPList            many HSPLists *  - each HSPList has     - each HSPList has its *    subject OID zero       own subject OID *  - each HSPList has a   - all HSPlists have *    different context      context zero * * @param init_results The input result list [in] * @param results The modified results (in new format) [out] */void Blast_HSPResultsRPSUpdate(BlastHSPResults *results,                               BlastHSPResults *init_results);#ifdef __cplusplus}#endif#endif /* !__BLAST_HITS__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -