Exemplo n.º 1
0
        except KeyError:
            print(
                "Error: Augustus is not properly configured. Please review installation instructions"
            )
            sys.exit(1)
        #get the possible species from augustus
        augustus_list = []
        for i in os.listdir(os.path.join(AUGUSTUS, 'species')):
            if not i.startswith('.'):
                augustus_list.append(i)
        augustus_list = set(augustus_list)
        d = flatten(natsorted(augustus_list))
        print '--------------------------'
        print 'AUGUSTUS species options:'
        print '--------------------------'
        print lib.list_columns(d, cols=3)
        sys.exit(1)

    elif sys.argv[1] == 'check':
        arguments = sys.argv[2:]
        cmd = os.path.join(script_path, 'util', 'check_modules.py')
        arguments.insert(0, cmd)
        exe = sys.executable
        arguments.insert(0, exe)
        subprocess.call(arguments)
        sys.exit(1)

    elif sys.argv[1] == 'setup':
        help = """
Usage:       funannotate %s <arguments>
version:     %s
Exemplo n.º 2
0
lib.SystemInfo()

#get version of funannotate
version = lib.get_version()
lib.log.info("Running %s" % version)

if args.outgroup:
    if not os.path.isdir(os.path.join(parentdir, 'DB', 'outgroups')):
        lib.log.error("Outgroup folder is not properly configured")
        os._exit(1)
    files = [f for f in os.listdir(os.path.join(parentdir, 'DB', 'outgroups'))]
    files = [ x.replace('_buscos.fa', '') for x in files ]
    files = [ x for x in files if not x.startswith('.') ]
    if not args.outgroup in files:
        lib.log.error("%s is not found in outgroups" % args.outgroup)
        print lib.list_columns(natsorted(files), cols=3)
    else:
        outgroup = True
        outgroup_species = os.path.join(parentdir, 'DB', 'outgroups', args.outgroup+'_buscos.fa')
        outgroup_name = args.outgroup
else:
    outgroup = False
    outgroup_species = ''
    outgroup_name = ''


#check dependencies and set path to proteinortho
if args.run_dnds:
    programs = ['find_enrichment.py', 'mafft', 'raxmlHPC-PTHREADS', 'trimal', 'proteinortho5.pl', 'ete3', 'phyml']
else:
    programs = ['find_enrichment.py', 'mafft', 'raxmlHPC-PTHREADS', 'trimal', 'proteinortho5.pl']