FastqPuri
stats_info.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 STATS_INFO_H_
30 #define STATS_INFO_H_
31 
32 #include <stdint.h>
33 #include <stdlib.h>
34 #include "fq_read.h"
35 #include "defines.h"
36 
37 
41 typedef struct statsinfo {
42  int read_len;
43  int ntiles;
44  int nQ;
45  int minQ;
46  int tile_pos;
47  int nreads;
48  int reads_wN;
54  int *tile_tags;
55  int *lane_tags;
56  int *qual_tags;
57  uint64_t* lowQ_ACGT_tile;
58  uint64_t* ACGT_tile;
61  uint64_t* reads_MlowQ;
63  uint64_t* QPosTile_table;
64  uint64_t* ACGT_pos;
65 } Info;
66 
67 void init_info(Info* res);
68 void free_info(Info* res);
69 void read_info(Info* res, char* file);
70 void write_info(Info* res, char* file);
71 void print_info(Info* res, char *infofile);
72 
73 void get_first_tile(Info* res, Fq_read* seq);
74 void update_info(Info* res, Fq_read* seq);
75 int update_ACGT_counts(uint64_t* ACGT_low, char ACGT);
76 void update_QPosTile_table(Info *res, Fq_read *seq);
77 void update_ACGT_pos(uint64_t* ACGT_pos, Fq_read *seq);
78 void resize_info(Info* res);
79 
80 #endif // endif STATS_INFO_H_
uint64_t * ACGT_tile
Definition: stats_info.h:58
int minQ
Definition: stats_info.h:45
int sz_ACGT_tile
Definition: stats_info.h:50
void init_info(Info *res)
Initialization of a Info type.
Definition: stats_info.c:103
void get_first_tile(Info *res, Fq_read *seq)
gets first tile
Definition: stats_info.c:312
int ntiles
Definition: stats_info.h:43
int sz_QPosTile_table
Definition: stats_info.h:52
void update_info(Info *res, Fq_read *seq)
updates Info with Fq_read
Definition: stats_info.c:319
int reads_wN
Definition: stats_info.h:48
stores a fastq entry
Definition: fq_read.h:37
int sz_lowQ_ACGT_tile
Definition: stats_info.h:49
int * lane_tags
Definition: stats_info.h:55
int tile_pos
Definition: stats_info.h:46
struct statsinfo Info
stores info needed to create the summary graphs
int update_ACGT_counts(uint64_t *ACGT_low, char ACGT)
update, for current tile, ACGT counts.
Definition: stats_info.c:363
void update_QPosTile_table(Info *res, Fq_read *seq)
update QPostile table
Definition: stats_info.c:389
uint64_t * ACGT_pos
Definition: stats_info.h:64
uint64_t * QPosTile_table
Definition: stats_info.h:63
stores info needed to create the summary graphs
Definition: stats_info.h:41
int read_len
Definition: stats_info.h:42
void read_info(Info *res, char *file)
Read Info from binary file.
Definition: stats_info.c:157
Macro definitions.
void free_info(Info *res)
frees allocated memory in Info
Definition: stats_info.c:142
void write_info(Info *res, char *file)
Write info to binary file.
Definition: stats_info.c:202
void update_ACGT_pos(uint64_t *ACGT_pos, Fq_read *seq)
update ACGT_pos
Definition: stats_info.c:413
int * tile_tags
Definition: stats_info.h:54
int nQ
Definition: stats_info.h:44
fastq entries manipulations (read/write)
int nreads
Definition: stats_info.h:47
uint64_t * reads_MlowQ
Definition: stats_info.h:61
int sz_reads_MlowQ
Definition: stats_info.h:51
int sz_ACGT_pos
Definition: stats_info.h:53
uint64_t * lowQ_ACGT_tile
Definition: stats_info.h:57
void resize_info(Info *res)
resize Info
Definition: stats_info.c:430
int * qual_tags
Definition: stats_info.h:56
void print_info(Info *res, char *infofile)
print Info to a textfile
Definition: stats_info.c:234