NCBI C++ ToolKit
thrdsalu.c
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: thrdsalu.c 32839 2007-03-05 20:41:55Z kazimird $
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 Name: thrdsalu.c
27 *
28 * Author: Stephen Bryant
29 *
30 * Initial Version Creation Date: 08/16/2000
31 *
32 * $Revision: 32839 $
33 *
34 * File Description: threader
35 */
36 
37 
38 
39 /* Update core segment alignment */
40 
43 
44 /*int*/ void salu(Cor_Def* cdf, Qry_Seq* qsq, Cur_Loc* sli, int cs, int al, Cur_Aln* sai) {
45 /*-------------------------------------------------------*/
46 /* cdf: Core segment locations and loop length limits */
47 /* qsq: Sequence to thread with alignment contraints */
48 /* sli: Current locations of core segments in the motif */
49 /* cs: Current segment */
50 /* al: New alignment of current segment */
51 /* sai: Contains segment alignment values to be set */
52 /*-------------------------------------------------------*/
53 
54 int ci; /* Residue index in core motif */
55 int si; /* Residue index in query sequence */
56 int mx,mn; /* Aligment range */
57 
58 
59 sai->al[cs]=al;
60 mn=sai->al[cs]-sli->no[cs];
61 mx=sai->al[cs]+sli->co[cs];
62 ci=cdf->sll.rfpt[cs]-sli->no[cs];
63 for(si=mn; si<=mx; si++) {
64  sai->sq[ci]=qsq->sq[si];
65  ci++; }
66 
67 /* printf("sai->nsc:%d nmt%d\n",sai->nsc,sai->nmt);
68 for(i=0;i<sai->nsc;i++) printf("%d ",sai->al[i]); printf("sai->al\n");
69 for(i=0;i<sai->nmt;i++) printf("%d ",sai->sq[i]); printf("sai->sq\n"); */
70 
71 
72 }
static const char si[8][64]
Definition: des.c:146
struct _Cor_Def::@23 sll
int * rfpt
Definition: thrdatd.h:69
int * sq
Definition: thrdatd.h:192
int * al
Definition: thrdatd.h:190
int * no
Definition: thrdatd.h:179
int * co
Definition: thrdatd.h:180
int * sq
Definition: thrdatd.h:92
void salu(Cor_Def *cdf, Qry_Seq *qsq, Cur_Loc *sli, int cs, int al, Cur_Aln *sai)
Definition: thrdsalu.c:44
Modified on Mon Feb 26 04:01:10 2024 by modify_doxy.py rev. 669887