FastqPuri
trim.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 
29 #ifndef TRIM_H_
30 #define TRIM_H_
31 
32 #include <stdio.h>
33 #include "Lmer.h"
34 #include "fq_read.h"
35 #include "defines.h"
36 #include "tree.h"
37 #include "bloom.h"
38 #include "adapters.h"
39 
40 int trim_adapter(Fq_read *seq, Ad_seq *adap_list);
41 int trim_sequenceN(Fq_read *seq);
42 int trim_sequenceQ(Fq_read *seq);
43 bool is_read_inTree(Tree *tree_ptr, Fq_read *seq);
44 bool is_read_inBloom(Bfilter *tree_ptr, Fq_read *seq, Bfkmer *ptr_Bfkmer);
45 int Qtrim_global(Fq_read *seq, int left, int right, char type);
46 
47 /* static functions
48 * static int no_N(Fq_read *seq);
49 * static int Nfree_Lmer(Fq_read *seq, int minL);
50 * static int Ntrim_ends(Fq_read *seq, int minL);
51 * static int no_lowQ(Fq_read *seq, int minQ);
52 * static int Qtrim_ends(Fq_read *seq, int minQ, int minL);
53 * static int Qtrim_frac(Fq_read *seq, int minQ ,int nlowQ );
54 * static int Qtrim_endsfrac(Fq_read *seq, int minQ, int minL, int nlowQ );
55 */
56 
57 #endif // TRIM_H_
int trim_sequenceQ(Fq_read *seq)
trims sequence based on lowQ base callings
Definition: trim.c:692
sequence manipulation for alignment
bool is_read_inBloom(Bfilter *tree_ptr, Fq_read *seq, Bfkmer *ptr_Bfkmer)
checks if a read is in Bloom filter. It computes the score for the read and returns true if it exceed...
Definition: trim.c:734
functions that implement the bloom filter
stores a fastq entry
Definition: fq_read.h:37
Construction of tree, check paths, write tree, read in tree.
int trim_adapter(Fq_read *seq, Ad_seq *adap_list)
trims sequence based on presence of N nucleotides
Definition: trim.c:628
Manipulation of Lmers and sequences.
Macro definitions.
bool is_read_inTree(Tree *tree_ptr, Fq_read *seq)
check if Lread is contained in tree. It computes the score for the read and its reverse complement; i...
Definition: trim.c:712
Bloom filter structure.
Definition: bloom.h:41
stores an adapter entry
Definition: adapters.h:38
fastq entries manipulations (read/write)
int trim_sequenceN(Fq_read *seq)
trims sequence based on presence of N nucleotides
Definition: trim.c:665
stores a processed kmer (2 bits pro nucleotide)
Definition: bloom.h:57
structure containing a T_ACGT-tree.
Definition: tree.h:60
int Qtrim_global(Fq_read *seq, int left, int right, char type)
trims left from the left and right from the right
Definition: trim.c:353