~ubuntu-branches/debian/jessie/arb/jessie

« back to all changes in this revision

Viewing changes to PROBE_SET/ps_merge_my_dbs.cxx

  • Committer: Package Import Robot
  • Author(s): Elmar Pruesse, Andreas Tille, Elmar Pruesse
  • Date: 2014-09-02 15:15:06 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140902151506-jihq58b3iz342wif
Tags: 6.0.2-1
[ Andreas Tille ]
* New upstream version
  Closes: #741890
* debian/upstream -> debian/upstream/metadata
* debian/control:
   - Build-Depends: added libglib2.0-dev
   - Depends: added mafft, mrbayes
* debian/rules
   - Add explicite --remove-section=.comment option to manual strip call
* cme fix dpkg-control
* arb-common.dirs: Do not create unneeded lintian dir
* Add turkish debconf translation (thanks for the patch to Mert Dirik
  <mertdirik@gmail.com>)
  Closes: #757497

[ Elmar Pruesse ]
* patches removed:
   - 10_config.makefiles.patch,
     80_no_GL.patch
       removed in favor of creating file from config.makefile.template via 
       sed in debian/control
   - 20_Makefile_main.patch
       merged upstream
   - 21_Makefiles.patch
       no longer needed
   - 30_tmpfile_CVE-2008-5378.patch: 
       merged upstream
   - 50_fix_gcc-4.8.patch:
       merged upstream
   - 40_add_libGLU.patch:
       libGLU not needed for arb_ntree)
   - 60_use_debian_packaged_raxml.patch:
       merged upstream
   - 70_hardening.patch
       merged upstream
   - 72_add_math_lib_to_linker.patch
       does not appear to be needed
* patches added:
   - 10_upstream_r12793__show_db_load_progress:
       backported patch showing progress while ARB is loading a database
       (needed as indicator/splash screen while ARB is launching)
   - 20_upstream_r12794__socket_permissions:
       backported security fix
   - 30_upstream_r12814__desktop_keywords:
       backported add keywords to desktop (fixes lintian warning)
   - 40_upstream_r12815__lintian_spelling:
       backported fix for lintian reported spelling errors
   - 50_private_nameservers
       change configuration to put nameservers into users home dirs
       (avoids need for shared writeable directory)
   - 60_use_debian_phyml
       use phyml from debian package for both interfaces in ARB
* debian/rules:
   - create config.makefile from override_dh_configure target
   - use "make tarfile" in override_dh_install
   - remove extra cleaning not needed for ARB 6
   - use "dh_install --list-missing" to avoid missing files
   - added override_dh_fixperms target
* debian/control:
   - added libarb-dev package
   - Depends: added phyml, xdg-utils
   - Suggests: removed phyml
   - fix lintian duplicate-short-description (new descriptions)
* debian/*.install:
   - "unrolled" confusing globbing to select files
   - pick files from debian/tmp
   - moved all config files to /etc/arb
* debian/arb-common.templates: updated
* scripts:
   - removed arb-add-pt-server
   - launch-wrapper: 
     - only add demo.arb to newly created $ARBUSERDATA
     - pass commandline arguments through bin/arb wrapper
   - preinst: removing old PT server index files on upgrade from 5.5*
   - postinst: set setgid on shared PT dir
* rewrote arb.1 manfile
* added file icon for ARB databases
* using upstream arb_tcp.dat

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <cstdio>
2
 
#include <cstdlib>
3
 
#include <cstring>
4
 
#include <sys/times.h>
 
1
// =============================================================== //
 
2
//                                                                 //
 
3
//   File      : ps_merge_my_dbs.cxx                               //
 
4
//   Purpose   :                                                   //
 
5
//                                                                 //
 
6
//   Coded by Wolfram Foerster in October 2002                     //
 
7
//   Institute of Microbiology (Technical University Munich)       //
 
8
//   http://www.arb-home.de/                                       //
 
9
//                                                                 //
 
10
// =============================================================== //
5
11
 
6
12
#include "ps_tools.hxx"
7
13
#include "ps_database.hxx"
8
14
 
 
15
#include <sys/times.h>
 
16
 
9
17
//  ====================================================
10
18
 
11
 
int main( int argc,  char *argv[] ) {
 
19
int main(int argc,   char *argv[]) {
12
20
 
13
21
    if (argc < 3) {
14
 
        printf( "Missing arguments\n Usage %s <output database name> <input database name> <input database name2> [[input3]...]\n", argv[0] );
15
 
        exit( 1 );
 
22
        printf("Missing arguments\n Usage %s <output database name> <input database name> <input database name2> [[input3]...]\n", argv[0]);
 
23
        exit(1);
16
24
    }
17
25
 
18
26
    //
20
28
    //
21
29
    const char *input_DB_name = argv[2];
22
30
    struct tms before;
23
 
    times( &before );
24
 
    printf( "Opening 1st input-probe-set-database '%s'..\n", input_DB_name );
25
 
    PS_Database *db = new PS_Database( input_DB_name, PS_Database::READONLY );
 
31
    times(&before);
 
32
    printf("Opening 1st input-probe-set-database '%s'..\n", input_DB_name);
 
33
    PS_Database *db = new PS_Database(input_DB_name, PS_Database::READONLY);
26
34
    db->load();
27
 
    PS_print_time_diff( &before, "(enter to continue)  " );
28
 
//    getchar();
 
35
    PS_print_time_diff(&before, "(enter to continue)  ");
29
36
 
30
37
    //
31
38
    // merge in other databasefiles
32
39
    //
33
40
    for (int i = 3; i < argc; ++i) {
34
41
        input_DB_name = argv[i];
35
 
        printf( "Appending input-probe-set-database '%s'..\n", input_DB_name );
36
 
        times( &before );
37
 
        db->merge( input_DB_name );
38
 
        PS_print_time_diff( &before );
 
42
        printf("Appending input-probe-set-database '%s'..\n", input_DB_name);
 
43
        times(&before);
 
44
        db->merge(input_DB_name);
 
45
        PS_print_time_diff(&before);
39
46
    }
40
 
    printf( "Merged databases (enter to continue)\n" );
41
 
//    getchar();
 
47
    printf("Merged databases (enter to continue)\n");
42
48
 
43
49
    //
44
50
    // write one big whole tree to file
45
51
    //
46
52
    const char *output_DB_name = argv[1];
47
 
    times( &before );
48
 
    printf( "Writing output-probe-set-database '%s'..\n",output_DB_name );
49
 
    db->saveTo( output_DB_name );
50
 
    PS_print_time_diff( &before, "(enter to continue)  " );
51
 
//    getchar();
 
53
    times(&before);
 
54
    printf("Writing output-probe-set-database '%s'..\n", output_DB_name);
 
55
    db->saveTo(output_DB_name);
 
56
    PS_print_time_diff(&before, "(enter to continue)  ");
52
57
 
53
 
    printf( "cleaning up...\n" );
 
58
    printf("cleaning up...\n");
54
59
    if (db) delete db;
55
 
//     printf( "root should be destroyed now\n" );
56
 
//     printf( "(enter to continue)\n" );
57
 
//     getchar();
58
60
 
59
61
    return 0;
60
62
}