~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to sand/src/compressed_sequence.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (C) 2009- The University of Notre Dame
 
3
This software is distributed under the GNU General Public License.
 
4
See the file COPYING for details.
 
5
*/
 
6
 
 
7
#ifndef COMPRESSED_SEQUENCE_H
 
8
#define COMPRESSED_SEQUENCE_H
 
9
 
 
10
#include <string.h>
 
11
#include <math.h>
 
12
#include <stdio.h>
 
13
 
 
14
#include "sequence.h"
 
15
 
 
16
struct cseq
 
17
{
 
18
        char * name;
 
19
        char * metadata;
 
20
        short * data;
 
21
        int num_bases;
 
22
};
 
23
 
 
24
struct cseq * cseq_create( const char *name, int num_bases, short *data, const char *metadata);
 
25
struct cseq * cseq_copy(struct cseq *s);
 
26
struct cseq * seq_compress( struct seq *s );
 
27
struct seq  * cseq_uncompress( struct cseq * c );
 
28
void          cseq_free( struct cseq * c );
 
29
void          cseq_write( FILE *file, struct cseq *c );
 
30
struct cseq * cseq_read( FILE *file );
 
31
void          cseq_file_reset();
 
32
size_t        cseq_size( struct cseq *c );
 
33
int           cseq_sprint( char *buf, struct cseq *c, const char *extra_data );
 
34
 
 
35
void translate_to_str(int mer, char * str, int length);
 
36
int base_to_num(char base );
 
37
char num_to_base( int num );
 
38
 
 
39
#endif