File: read.h

package info (click to toggle)
flash 1.2.11-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 932 kB
  • sloc: ansic: 3,549; sh: 36; makefile: 13
file content (53 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download
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
#ifndef _FLASH_READ_H_
#define _FLASH_READ_H_

#include <stddef.h>

/* In-memory representation of a DNA sequence read.  */
struct read {
	/* The "tag" that identifies the read.  */
	char *tag;

	/* The sequence of the read in ASCII characters (A, C, G, T, N).  */
	char *seq;

	/* The quality scores of the read, scaled to start at 0.  */
	char *qual;

	/* Length of the tag string.  */
	int tag_len;

	/* Length of the sequence string (number of bases in the read).  */
	int seq_len;

	/* Length of the quality string (will be equal to seq_len).  */
	int qual_len;

	/* Allocated sizes of the seq, tag, and qual buffers, respectively.  */
	size_t seq_bufsz;
	size_t tag_bufsz;
	size_t qual_bufsz;
};

struct input_stream;
#include <inttypes.h>

extern void
reverse_complement(struct read *r);

extern void
clean_read(struct read *r, int phred_offset, struct input_stream *in,
	   uint64_t line_no);

extern void
clean_read_for_write(struct read *r, int phred_offset);

extern void
copy_tag(struct read *to, const struct read *from);

extern void
get_combined_tag(const struct read *read_1,
		 const struct read *read_2,
		 struct read *combined_read);

#endif /* _FLASH_READ_H_ */