File: merTrimResult.H

package info (click to toggle)
canu 1.7.1+dfsg-1~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 7,680 kB
  • sloc: cpp: 66,708; perl: 13,682; ansic: 4,020; makefile: 627; sh: 472; python: 39
file content (93 lines) | stat: -rw-r--r-- 2,463 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

/******************************************************************************
 *
 *  This file is part of canu, a software program that assembles whole-genome
 *  sequencing reads into contigs.
 *
 *  This software is based on:
 *    'Celera Assembler' (http://wgs-assembler.sourceforge.net)
 *    the 'kmer package' (http://kmer.sourceforge.net)
 *  both originally distributed by Applera Corporation under the GNU General
 *  Public License, version 2.
 *
 *  Canu branched from Celera Assembler at its revision 4587.
 *  Canu branched from the kmer project at its revision 1994.
 *
 *  This file is derived from:
 *
 *    src/AS_MER/merTrimResult.H
 *
 *  Modifications by:
 *
 *    Brian P. Walenz from 2011-AUG-22 to 2013-AUG-01
 *      are Copyright 2011,2013 J. Craig Venter Institute, and
 *      are subject to the GNU General Public License version 2
 *
 *    Brian P. Walenz on 2014-DEC-05
 *      are Copyright 2014 Battelle National Biodefense Institute, and
 *      are subject to the BSD 3-Clause License
 *
 *    Brian P. Walenz beginning on 2016-JAN-11
 *      are a 'United States Government Work', and
 *      are released in the public domain
 *
 *  File 'README.licenses' in the root directory of this distribution contains
 *  full conditions and disclaimers for each license.
 */

#include "AS_global.H"

#ifndef MERTRIMRESULT_H
#define MERTRIMRESULT_H


class mertrimResult {
public:
  mertrimResult() {
    readIID = 0;
    deleted = 0;
    clrBgn  = 0;
    clrEnd  = 0;
    chimer  = 0;
    chmBgn  = 0;
    chmEnd  = 0;
  };

  void   print(FILE *F) {
    if (F == NULL)
      return;
    if (chimer)
      fprintf(F, F_U32"\t" F_U32 "\t" F_U32 "\tchimer\t" F_U32 "\t" F_U32 "%s\n",
              readIID, clrBgn, clrEnd, chmBgn, chmEnd,
              (deleted) ? "\tdeleted" : "");
    else
      fprintf(F, F_U32"\t" F_U32 "\t" F_U32 "%s\n",
              readIID, clrBgn, clrEnd,
              (deleted) ? "\tdeleted" : "");
  };

  void   writeResult(FILE *W) {
    if (W == NULL)
      return;
    AS_UTL_safeWrite(W, this, "merTrimResult", sizeof(mertrimResult), 1);
  };

  bool   readResult(FILE *R) {
    if (R == NULL)
      return(false);
    if (!feof(R))
      AS_UTL_safeRead(R, this, "merTrimResult", sizeof(mertrimResult), 1);
    return(feof(R) == false);
  };

  uint32 readIID;
  uint32 deleted;
  uint32 clrBgn;
  uint32 clrEnd;
  uint32 chimer;
  uint32 chmBgn;
  uint32 chmEnd;
};


#endif  //  MERTRIMRESULT_H