File: gustaf.cpp

package info (click to toggle)
seqan2 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 228,748 kB
  • sloc: cpp: 257,602; ansic: 91,967; python: 8,326; sh: 1,056; xml: 570; makefile: 229; awk: 51; javascript: 21
file content (80 lines) | stat: -rw-r--r-- 3,118 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
// ==========================================================================
//                                  Gustaf
// ==========================================================================
// Copyright (c) 2011-2026, Kathrin Trappe, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
//       its contributors may be used to endorse or promote products derived
//       from this software without specific prior written permission.
//
//
// ==========================================================================
// Author: Kathrin Trappe <ktrappe@inf.fu-berlin.de>
// ==========================================================================

#include <seqan/basic.h>
#include <seqan/sequence.h>

#include "../stellar/stellar.h"
#include "msplazer_parse_options.h"
#include "msplazer.h"
#include "msplazer_main.h"

using namespace seqan2;

// Program entry point
int main(int argc, char const ** argv)
{
    double start = sysTime();
    // command line parsing
    ArgumentParser parser("gustaf");

    // Stellar Options
    StellarOptions stellarOptions = StellarOptions();
    // MSplazer Options
    MSplazerOptions msplazerOptions = MSplazerOptions();

    // New Argument Parser
    _setupArgumentParser(parser);
    // _setParser(parser);
    ArgumentParser::ParseResult res = parse(parser, argc, argv);
    if (res != ArgumentParser::PARSE_OK)
        return res == ArgumentParser::PARSE_ERROR;
    if (!_parseOptions(parser, stellarOptions, msplazerOptions))
            return 1;

    _writeFileNames(stellarOptions);
    _writeParams(msplazerOptions);

    // msplazer wrapper function
    msplazer(stellarOptions, msplazerOptions);

    // ///////////////////////////////////////////////////////////////////
    // Fragmentstore

    // Usage via fragmentStore
    /*Stellar can now handle FragmentStore input which is based on an Index using a StringSet based on
      Owner<ConcatDirect<>>. However, StellarMatch positions are wrong when processing multiple reads
      (i.e. after read 1). Maybe bc. of consecutive positions due to the ConcatDirect format?
    */
    /*
       FragmentStore<void> fragments;
       bool success = loadReads(fragments, queryFilename);
       if(!success)
       cout << "Unable to open file from " << queryFilename << endl;
       for(unsigned i = 0; i < length(fragments.readSeqStore); ++i)
       cout << "Read " << i << " : " << fragments.readSeqStore[i] << endl;
       */

    std::cout << "TIME all " << (sysTime() - start) << "s" << std::endl;
    return 0;
}