-
Notifications
You must be signed in to change notification settings - Fork 6
/
processfq.h
59 lines (50 loc) · 1.78 KB
/
processfq.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef __PROCESSFQ
#define __PROCESSFQ
/* htslib headers */
#include <htslib/sam.h>
#include <htslib/hts.h>
#include <zlib.h>
#include <stdbool.h>
#include "common.h"
#include "vh/vh_divethandler.h"
#define MEMUSE 2047483648
#define MEMSCALE 1.5
/* Maximum sequence/quality length */
#define MAX_SEQ 1000
typedef struct read
{
char* qname;
char* seq;
char* qual;
char empty;
} _read;
typedef struct library_properties
{
char* libname; /* id/name of the library */
float frag_avg; /* average fragment size */
float frag_std; /* fragment size standard deviation */
int frag_med; /* median of the fragment sizes */
int conc_min; /* min cutoff for concordants */
int conc_max; /* max cutoff for concordants */
char* fastq1; /* file name for the FASTQ file of the /1 reads */
char* fastq2; /* file name for the FASTQ file of the /2 reads */
char *divet; /* file name for the DIVET file post mrfast mapping */
int read_length; /* length of reads for this library */
int num_sequences; /* number of paired-end sequences for this library */
bool is_valid; /* Checks if the library is valid, i.e., mean, conc_min, conc_max, etc. */
struct softClip *listSoftClip;
struct discordantMapping **mappings_discordant;
struct alternativeMapping **mappings_alternative;
struct discordantMappingMEI *listMEI_Mapping;
struct discordantMappingNUMT *listNUMT_Mapping;
} library_properties;
/* Function Prototypes */
void fastq_match( char*, char*, int, int);
int load_reads( gzFile, struct read**, int);
//static
int fastq_qname_comp( const void*, const void*);
void alloc_reads( struct read***, int);
void realloc_reads( struct read***, int, int);
void free_reads( struct read***, int);
void create_fastq_library( struct library_properties* in_lib, char* sample_name, char* bam_path, parameters* params);
#endif