FastqPuri
adapters.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (C) 2017 by Paula Perez Rubio *
3  * *
4  * This file is part of FastqPuri. *
5  * *
6  * FastqPuri is free software: you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation, either version 3 of the *
9  * License, or (at your option) any later version. *
10  * *
11  * FastqPuri is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with FastqPuri. *
18  * If not, see <http://www.gnu.org/licenses/>. *
19  ****************************************************************************/
20 
28 #ifndef ADAPTERS_H_
29 #define ADAPTERS_H_
30 
31 #include "fq_read.h"
32 #include "fa_read.h"
33 #include "defines.h"
34 
38 typedef struct _ad_seq {
39  int L;
40  char seq[READ_MAXLEN];
41  int Lpack;
42  int Lpack_sh;
43  unsigned char pack[(READ_MAXLEN+1)/2];
44  unsigned char pack_sh[(READ_MAXLEN+1)/2];
45 } Ad_seq;
46 
47 void init_alLUTs();
48 
49 int process_seq(unsigned char *packed, unsigned char *read, int L, bool shift,
50  bool isreverse);
51 
52 Ad_seq *pack_adapter(Fa_data *ptr_fa);
53 
54 double obtain_score(Fq_read *seq, int pos_seq, Ad_seq *ptr_adap, int pos_ad);
55 
56 #endif // endif INIT_ALIGNER_H_
int L
Definition: adapters.h:39
unsigned char pack_sh[(READ_MAXLEN+1)/2]
Definition: adapters.h:44
stores a fastq entry
Definition: fq_read.h:37
stores sequences of a fasta file
Definition: fa_read.h:46
struct _ad_seq Ad_seq
stores an adapter entry
Ad_seq * pack_adapter(Fa_data *ptr_fa)
reads a Fa_data with adapters and stores them in an array of Ad_seq structs.
Definition: adapters.c:129
reads in and stores fasta files
int Lpack
Definition: adapters.h:41
Macro definitions.
int Lpack_sh
Definition: adapters.h:42
stores an adapter entry
Definition: adapters.h:38
int process_seq(unsigned char *packed, unsigned char *read, int L, bool shift, bool isreverse)
Packs a sequence using alfw0, alfw1, albw0, albw1.
Definition: adapters.c:92
fastq entries manipulations (read/write)
double obtain_score(Fq_read *seq, int pos_seq, Ad_seq *ptr_adap, int pos_ad)
computes score of a possible alignment, after having found a seed.
Definition: adapters.c:155
unsigned char pack[(READ_MAXLEN+1)/2]
Definition: adapters.h:43
char seq[READ_MAXLEN]
Definition: adapters.h:40
void init_alLUTs()
look up table initialization for alignment (used for adapters)
Definition: adapters.c:59