예제 #1
0
if (args.covar_number is not None) and (args.covar is None):
    raise ValueError('Covariate number specified without a covariate file')

if (args.keep is not None) and (args.remove is not None):
    raise ValueError(
        'Specifying both \'--keep\' and \'--remove\' is redundant. Please verify.'
    )

if (args.extract is not None) and (args.exclude is not None):
    raise ValueError(
        'Specifying both \'--extract\' and \'--exclude\' is redundant. Please verify.'
    )

# get R if not provided
if args.r_ex == None or args.r_ex == "None":
    args.r_ex = find_from_path('R', 'R')

### print settings in use
print 'Basic Settings:'
print '--bfile ' + str(args.bfile)
print '--out ' + str(args.out)
print '--addout ' + str(args.addout)
if args.no_cleanup:
    print '--no-cleanup ' + str(args.no_cleanup)

print '\nCovariates:'
print '--covar ' + str(args.covar)
if args.covar is not None:
    print ' '.join(cov_num_txt)
if args.pheno is not None and str(args.pheno) != "None":
    print '--pheno ' + str(args.pheno)
예제 #2
0
conf_file = os.environ['HOME'] + "/ricopili.conf"
configs = read_conf(conf_file)

plinkx = configs['p2loc'] + "plink"

#############
print '\n...Checking dependencies...'
# check exists, executable
#############

# get variables from path as needed
# - Rscript (if unspecified)
# - IBD plotting script
# - PCA plotting script (optional)
if args.rscript_ex == None or args.rscript_ex == "None":
    args.rscript_ex = find_from_path('Rscript', 'Rscript')

Rplotibdx = find_from_path('plot_reap_ibd.Rscript', 'IBD plotting script')

if plot_pca:
    Rplotpcax = find_from_path('plot_pca.Rscript', 'PCA plotting script')

# verify executables
test_exec(plinkx, 'Plink')
test_exec(args.rscript_ex, 'Rscript')
test_exec(args.admixture_ex, 'ADMIXTURE')
test_exec(args.reap_ex, 'REAP')

# pca file
if plot_pca:
    assert os.path.isfile(
예제 #3
0
    rport = int(args.port)


# sanity check covariate specification, keep/exclude and extract/exclude
if (args.covar_number is not None) and (args.covar is None):
    raise ValueError('Covariate number specified without a covariate file')

if (args.keep is not None) and (args.remove is not None):
    raise ValueError('Specifying both \'--keep\' and \'--remove\' is redundant. Please verify.')

if (args.extract is not None) and (args.exclude is not None):
    raise ValueError('Specifying both \'--extract\' and \'--exclude\' is redundant. Please verify.')

# get R if not provided
if args.r_ex == None or args.r_ex == "None":
    args.r_ex = find_from_path('R', 'R')

### print settings in use
print 'Basic Settings:'
print '--bfile '+str(args.bfile)
print '--out '+str(args.out)
print '--addout '+str(args.addout)
if args.no_cleanup:
    print '--no-cleanup '+str(args.no_cleanup)

print '\nCovariates:'
print '--covar '+str(args.covar)
if args.covar is not None:
    print ' '.join(cov_num_txt)
if args.pheno is not None and str(args.pheno) != "None":
    print '--pheno '+str(args.pheno)
예제 #4
0
# not getting R here since ricopili.conf currently relies on platform info
conf_file = os.environ['HOME']+"/ricopili.conf"
configs = read_conf(conf_file)

plinkx = configs['p2loc']+"plink"
smartpcax = configs['eloc']+"/smartpca"


#############
print '\n...Checking dependencies...'
# check exists, executable
#############

# find required files
if args.rscript_ex == None or args.rscript_ex == "None":
    args.rscript_ex = find_from_path("Rscript", 'Rscript')

Rplotpcax = find_from_path("plot_pca.Rscript", 'PCA plotting script')


# test executables
test_exec(args.primus_ex, 'PRIMUS')
test_exec(plinkx, 'Plink')
test_exec(smartpcax, 'Eigensoft smartpca')
test_exec(args.rscript_ex, 'Rscript')



print '\n'
print '############'
print 'Begin!'
예제 #5
0
### read plink loc from config
# not getting R here since ricopili.conf currently relies on platform info
conf_file = os.environ['HOME'] + "/ricopili.conf"
configs = read_conf(conf_file)

plinkx = configs['p2loc'] + "plink"
smartpcax = configs['eloc'] + "/smartpca"

#############
print '\n...Checking dependencies...'
# check exists, executable
#############

# find required files
if args.rscript_ex == None or args.rscript_ex == "None":
    args.rscript_ex = find_from_path("Rscript", 'Rscript')

Rplotpcax = find_from_path("plot_pca.Rscript", 'PCA plotting script')

# test executables
test_exec(args.primus_ex, 'PRIMUS')
test_exec(plinkx, 'Plink')
test_exec(smartpcax, 'Eigensoft smartpca')
test_exec(args.rscript_ex, 'Rscript')

print '\n'
print '############'
print 'Begin!'
print '############'

####################################
예제 #6
0
    warn("Setting --snp-chunk to a multiple of 100 is NOT recommended currently, due to potential plink --R errors.")


#############
print '\n...Reading ricopili config file...'
#############

### read plink loc from config
conf_file = os.environ['HOME']+"/ricopili.conf"
configs = read_conf(conf_file)

plinkx = configs['p2loc']+"plink"

if args.model == 'gmmat' or args.model == 'gmmat-fam':
    if args.rscript_ex == None or args.rscript_ex == "None":
        args.rscript_ex = find_from_path('Rscript', 'Rscript')


#############
print '\n...Checking dependencies...'
#############



# TODO: here





print '\n'
예제 #7
0
configs = read_conf(conf_file)

plinkx = configs['p2loc']+"plink"


#############
print '\n...Checking dependencies...'
# check exists, executable
#############

# get variables from path as needed
# - Rscript (if unspecified)
# - IBD plotting script
# - PCA plotting script (optional)
if args.rscript_ex == None or args.rscript_ex == "None":
    args.rscript_ex = find_from_path('Rscript', 'Rscript')

Rplotibdx = find_from_path('plot_reap_ibd.Rscript', 'IBD plotting script')

if plot_pca:
    Rplotpcax = find_from_path('plot_pca.Rscript', 'PCA plotting script')

# verify executables
test_exec(plinkx, 'Plink')
test_exec(args.rscript_ex, 'Rscript')
test_exec(args.admixture_ex, 'ADMIXTURE')
test_exec(args.reap_ex, 'REAP')

# pca file
if plot_pca:
    assert os.path.isfile(args.plot_admix_pca), "PCA file does not exist (%r)" % args.plot_admix_pca