-
Notifications
You must be signed in to change notification settings - Fork 67
/
FASTA.h
58 lines (39 loc) · 1 KB
/
FASTA.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
/*++
Module Name:
FASTA.h
Abstract:
FASTA reader
Authors:
Bill Bolosky, August, 2011
Environment:
User mode service.
Revision History:
Adapted from Matei Zaharia's Scala implementation.
--*/
#pragma once
#include "Genome.h"
const Genome *
ReadFASTAGenome(const char *fileName);
//
// The FASTA appending functions return whether the write was successful.
//
// WARNING: They write very long lines.
// According to Wikipedia, a FASTA file's line limit should be 120, or better, 79.
// Unix workaround if the piece names aren't too long: 'fold -w 79'.
//
bool
AppendFASTAGenome(const Genome *, FILE *fasta);
//
// This is arbitrary; is there some existing convention?
//
inline const char *diploidFASTASexPrefix(bool male)
{
return male ? "PATERNAL|" : "MATERNAL|";
}
//
// Append a diploid genome to a single FASTA file.
//
bool
AppendFASTADiploidGenome(const DiploidGenome *, FILE *fasta);
bool
WriteFASTADiploidGenome(const DiploidGenome *, const char *fileName);