File: Fragment.h

package info (click to toggle)
mapsembler2 2.2.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,208 kB
  • sloc: cpp: 51,300; ansic: 13,434; sh: 483; makefile: 394; asm: 271; python: 28
file content (75 lines) | stat: -rw-r--r-- 1,982 bytes parent folder | download | duplicates (4)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
//#include "read_coherence_mapsembler/couple.h"
#include "commons.h"
#include "../minia/Bank.h"
#include "../minia/Kmer.h"
#include "../minia/Hash16.h"
#include "../minia/Set.h"
#include "../minia/Pool.h"
#include "../minia/Bloom.h"
#include "../minia/Debloom.h"
#include "../minia/Utils.h"
#include "../minia/SortingCount.h"
#include "../minia/Terminator.h"
#include "GraphOutput.h"
#include "IterativeExtensions.h"

#ifndef _FRAGMENT_H
#define _FRAGMENT_H

/**
 * A fragment designes a sequence together with its comment and some coverage information.
 * A fragment stores reads mapped on itself
 **/
class Fragment{
 public: 
  
  /**
   * the initial sequence
   */
  string fragment_sequence; // the fragment to be kmer-coherency-tested
  /**
   * the eventual comment of the fragment (from fasta or fastq file)
   */
  string fragment_comment; // the comment of the fragment to be kmer-coherency-tested
    
    /**
     * vector of left extrem kmers kmers
     */
    vector<string> left_extrem_kmers;
    
    /**
     * vector of right extrem kmers kmers
     */
    vector<string> right_extrem_kmers;
    
  /**
   * Stores the initial sequence
   */
  Fragment(string fragment_sequence);
    bool isPalindromic();
    
    void set_comment(string fragment_comment);
    
    void add_left_extreme_kmer (string left_extrem_kmer);
    
    void add_right_extreme_kmer (string right_extrem_kmer);
    
    void perform_extension(const string prefix, int max_graph_depth, const char extension_type, int max_nodes, parcours_t search_mode);
    
    void fragment_output_graph(GraphOutput graph);
    void fragment_output_sequence(int index, string output_res, bool erase);
    bool is_left_kmer (const int left_extrem_kmer_id);
    bool is_right_kmer (const int right_extrem_kmer_id);
  /**
   * delete the hash table and free the fragment sequence
   */
  ~Fragment(); 

};

#endif //_FRAGMENT_H