FastqPuri
|
Construct the quality report variables and update them. More...
#include <stdio.h>
#include <string.h>
#include "stats_info.h"
#include "init_Qreport.h"
#include "str_manip.h"
Functions | |
void | get_tile_lane (char *line1, int *tile, int *lane) |
get tile number from first line in fastq entry. More... | |
static int | belongsto (int k, int *qual_tags, int nQ) |
returns 1 if k is in qual_tags, 0 otherwise. | |
static int | cmpfunc (const void *a, const void *b) |
comparison function for qsort | |
void | init_info (Info *res) |
Initialization of a Info type. More... | |
void | free_info (Info *res) |
frees allocated memory in Info | |
void | read_info (Info *res, char *file) |
Read Info from binary file. | |
void | write_info (Info *res, char *file) |
Write info to binary file. | |
void | print_info (Info *res, char *infofile) |
print Info to a textfile | |
void | get_first_tile (Info *res, Fq_read *seq) |
gets first tile | |
void | update_info (Info *res, Fq_read *seq) |
updates Info with Fq_read | |
int | update_ACGT_counts (uint64_t *ACGT_low, char ACGT) |
update, for current tile, ACGT counts. More... | |
void | update_QPosTile_table (Info *res, Fq_read *seq) |
update QPostile table | |
void | update_ACGT_pos (uint64_t *ACGT_pos, Fq_read *seq) |
update ACGT_pos | |
void | resize_info (Info *res) |
resize Info More... | |
Variables | |
Iparam_Qreport | par_QR |
Construct the quality report variables and update them.
void get_tile_lane | ( | char * | line1, |
int * | tile, | ||
int * | lane | ||
) |
get tile number from first line in fastq entry.
line1 | first line of a fastq entry |
tile | int* where the tile will be stored |
lane | int* where the lane will be stored |
Only Illumina sequence identifiers are allowed. The line is inspected, and the number of ':' is obtained. The function exits with an error if the number of semicolons is different from 4 or 9.
void init_info | ( | Info * | res | ) |
Initialization of a Info type.
It sets: nQ, read_len, ntiles, minQ and the dimensions of the arrays. Initializes the rest of the variables to zero and allocates memory to the arrays initializing them to 0 (calloc).
void resize_info | ( | Info * | res | ) |
resize Info
At the end of the program, resize the structure Info, and adapt it to the actual number of tiles and the actual number of different quality values present.
int update_ACGT_counts | ( | uint64_t * | ACGT_low, |
char | ACGT | ||
) |
update, for current tile, ACGT counts.
Makes update of ACGT counts for the current tile. Can be used with variables: lowQ_ACGT_tile and ACGT_tile
Iparam_Qreport par_QR |
global variable: input parameters for Qreport