opopfile.close() print ( "total sim file entries: " + str( i_entrycount ) ) print ( "correct indiv-gen associations: " + str( countindivcorrect ) ) print ( "wrong indiv-gen associations: " + str( countindivwrong ) ) #end compare_genepop_file if __name__=="__main__": lsargs=[ "sim file", "genepop file" ] s_usage=pgut.do_usage_check ( sys.argv, lsargs ) if s_usage: print( s_usage ) sys.exit() #end if usage s_simfile=sys.argv[1] s_popfile=sys.argv[2] compare_genepop_file( s_simfile, s_popfile ) #end if name is "main"
print ( "total loci per gen entry: " + str( i_gen_loci_count ) ) print ( "total loci count in pop header: " + str( i_pop_loci_count ) ) #end compare_genepop_file if __name__=="__main__": myloc=__file__ print( myloc ) numargs="3" lsargs=[ "gen file", "genepop file" ] s_usage=pgut.do_usage_check ( sys.argv, lsargs ) if s_usage: print( s_usage ) sys.exit() #end if usage s_genfile=sys.argv[1] s_popfile=sys.argv[2] compare_genepop_file( s_genfile, s_popfile ) #end if name is "main"
''' b_exec_found=did_find_ne_estimator_executable() if not did_find_ne_estimator_executable(): raise Exception( "in pgdriveneestimator.py, def mymain(), did not find NeEstimator executable." ) #end if can't find executable drive_estimator( *( q_args ) ) return #end mymain if __name__ == "__main__": s_usage = pgut.do_usage_check( sys.argv, LS_ARGS, ls_optional_arg_descriptions=LS_OPTIONAL_ARGS, b_multi_line_msg=True ) if s_usage: print( s_usage ) sys.exit() #end if usage #add the hidden file object args, #that are explicitely passed by #users who import this module and call mymain() ls_args_passed=sys.argv[ 1: ] i_total_args_passed=len( ls_args_passed ) i_total_nonopt=len( LS_ARGS )
def cleanup_gui( o_host ): o_host.cleanupAllTabs() #end if yes return #end cleanup_gui if __name__ == "__main__": WINDOW_MARGIN=0.20 CONTAINER_PADDING=10 ls_optional_args=[ "number of processes to use for replicate simulations" ] s_usage=pgut.do_usage_check( sys.argv, [], ls_optional_arg_descriptions=ls_optional_args ) if s_usage: print( s_usage ) sys.exit() #end if usage s_my_mod_path=os.path.abspath( __file__ ) s_my_mod_dir=os.path.dirname( s_my_mod_path ) if len( sys.argv ) == 2: i_total_simultaneous_processes=int( sys.argv[1] ) else: i_total_simultaneous_processes=1 #end if sys args exits