FastqPuri
Functions
fq_read.c File Reference

fastq entries manipulations (read/write) More...

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "fq_read.h"
#include "str_manip.h"
Include dependency graph for fq_read.c:

Functions

int get_fqread (Fq_read *seq, char *buffer, int pos1, int pos2, int nline, int read_len, int filter)
 reads fastq line from a buffer More...
 
int string_seq (Fq_read *seq, char *char_seq)
 writes the fq entry in a string More...
 

Detailed Description

fastq entries manipulations (read/write)

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

Function Documentation

◆ get_fqread()

int get_fqread ( Fq_read seq,
char *  buffer,
int  pos1,
int  pos2,
int  nline,
int  read_len,
int  filter 
)

reads fastq line from a buffer

a fastq line is read from a buffer and the relevant information is stored in a structure Fq_read. Depending on the value of filter, information about whether the read was trimmed is stored.

Parameters
seqpointer to Fq_read, where the info will be stored.
buffervariable where the file being read is stored.
pos1buffer start position of the line.
pos2buffer end position of the line.
nlinefile line number being read.
read_lenpredefined read length
filter0 original file, 1 file filtered with filter_trim, 2 file filtered with another tool

◆ string_seq()

int string_seq ( Fq_read seq,
char *  char_seq 
)

writes the fq entry in a string

Parameters
seqpointer to Fq_read, where the info will be stored.
char_seqpointer to buffer, where the sequence will be stored
Warning
change the call to sprintf to snprintf