示例#1
0
    stats_dir = sys.argv[4]

    log.info("I got the input file!")

        
        # ---------------------- Initialize Solver --------------------- #

    greedySolver    = GreedySolver()
    taxonomySolver  = SimpleTaxonomySolver() 
    solver = Solver(determine_host, greedySolver, taxonomySolver)
                        

        # ---------------------- Run Solver --------------------- #
    start_total = time.time()
    
    solver.generateSolutionXML(aln_file, dataset_xml_file, solution_xml_output_file, stats_dir)

    log.info("Successfully initialized solver!")

    end_total = time.time()
    elapsed_time_total = end_total - start_total
    print ("TOTAL - \t\telapsed time: %.2f" % elapsed_time_total)
        
	# fill_containers (aln_file)

        # -------------------- Test stats methods ----------------------- #
'''
    read_container = ReadContainer.Instance()
    cds_aln_container = CdsAlnContainer.Instance()
	
    no_alns = stats.num_reads_with_no_alignments(read_container)
示例#2
0
    dataset_xml_file = sys.argv[2]
    solution_xml_output_file = sys.argv[3]
    stats_dir = sys.argv[4]

    log.info("I got the input file!")

    # ---------------------- Initialize Solver --------------------- #

    greedySolver = GreedySolver()
    taxonomySolver = SimpleTaxonomySolver()
    solver = Solver(determine_host, greedySolver, taxonomySolver)

    # ---------------------- Run Solver --------------------- #
    start_total = time.time()

    solver.generateSolutionXML(aln_file, dataset_xml_file,
                               solution_xml_output_file, stats_dir)

    log.info("Successfully initialized solver!")

    end_total = time.time()
    elapsed_time_total = end_total - start_total
    print("TOTAL - \t\telapsed time: %.2f" % elapsed_time_total)

# fill_containers (aln_file)

# -------------------- Test stats methods ----------------------- #
'''
    read_container = ReadContainer.Instance()
    cds_aln_container = CdsAlnContainer.Instance()
	
    no_alns = stats.num_reads_with_no_alignments(read_container)
        # cdsAlnCont = CdsAlnContainer.Instance()

        # readCont.populate_from_aln_file(aln_file)

        # print "passed container initialization!"
        
        # ---------------------- Initialize Solver --------------------- #

    greedySolver    = GreedySolver()
    taxonomySolver  = SimpleJoinTaxonomySolver() 
    solver = Solver(determine_host, greedySolver, taxonomySolver)
                        

        # ---------------------- Run Solver --------------------- #

    solver.generateSolutionXML(aln_file)

    print "Successfully initialized solver!"
        
	# fill_containers (aln_file)

        # -------------------- Test stats methods ----------------------- #
'''
    read_container = ReadContainer.Instance()
    cds_aln_container = CdsAlnContainer.Instance()
	
    no_alns = stats.num_reads_with_no_alignments(read_container)
    print "Reads with no alignments: %d" % no_alns
    print "Number of reads: %d" % stats.num_reads(read_container)

    print "Number of reads with no aligned cdss: %d" % \
示例#4
0
    read_container = ReadContainer()
    read_container.populate_from_aln_file(read_alignment_file=args.input)
    elapsed_time = timing.end(start)
    log.info("Populate read container - elapsed time: %s", 
             timing.humanize(elapsed_time))    
    
    # Populate record container
    # The record container type can now be determine from the input parameters
    # and injected into the Solver
    start = timing.start()
    record_container = RecordContainer()
    record_container.set_db_access(db_access)
    # Extract all records from database
    record_container.populate(read_container.fetch_all_reads_versions())
    elapsed_time = timing.end(start)
    log.info("Populate record container - elapsed time: %s", 
             timing.humanize(elapsed_time)) 
   
    solver.generateSolutionXML(read_container=read_container,
                               record_container=record_container,
                               dataset_xml_file=args.descr,
                               output_solution_filename=args.output,
                               stats_dir=args.stats_dir,
                               solution_file=args.solution_file)
    
    processing_delta = timing.end(processing_start)
    log.info("Processing done in %s", 
        timing.humanize(processing_delta))
    
    log.info("Finished.")
示例#5
0
    start = timing.start()
    read_container = ReadContainer()
    read_container.populate_from_aln_file(read_alignment_file=args.input)
    elapsed_time = timing.end(start)
    log.info("Populate read container - elapsed time: %s",
             timing.humanize(elapsed_time))

    # Populate record container
    # The record container type can now be determine from the input parameters
    # and injected into the Solver
    start = timing.start()
    record_container = RecordContainer()
    record_container.set_db_access(db_access)
    # Extract all records from database
    record_container.populate(read_container.fetch_all_reads_versions())
    elapsed_time = timing.end(start)
    log.info("Populate record container - elapsed time: %s",
             timing.humanize(elapsed_time))

    solver.generateSolutionXML(read_container=read_container,
                               record_container=record_container,
                               dataset_xml_file=args.descr,
                               output_solution_filename=args.output,
                               stats_dir=args.stats_dir,
                               solution_file=args.solution_file)

    processing_delta = timing.end(processing_start)
    log.info("Processing done in %s", timing.humanize(processing_delta))

    log.info("Finished.")