FastqPuri
Functions | Variables
stats_info.c File Reference

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"
Include dependency graph for stats_info.c:

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
 

Detailed Description

Construct the quality report variables and update them.

Author
Paula Perez paula.nosp@m.pere.nosp@m.zrubi.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om
Date
04.08.2017

Function Documentation

◆ get_tile_lane()

void get_tile_lane ( char *  line1,
int *  tile,
int *  lane 
)

get tile number from first line in fastq entry.

Parameters
line1first line of a fastq entry
tileint* where the tile will be stored
laneint* where the lane will be stored
See also
http://wiki.christophchamp.com/index.php?title=FASTQ_format

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.

◆ init_info()

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).

◆ resize_info()

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.

◆ update_ACGT_counts()

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

Variable Documentation

◆ par_QR

global variable: input parameters for Qreport