示例#1
0
文件: apres.py 项目: vhsvhs/SeqTools
        exit(0)
    
"""If the user didn't give a configpath, then we at
least need a dbpath (to load a prior database)."""
dbpath = ap.getOptionalArg("--dbpath")

if configpath == False:
    print "\n. Error, you need to specify a configuration path, using --configpath"
    exit()

"""Regardless of which options are being executed, the DB gets
built, or rebuilt, depending on its status."""
con = build_db(dbpath=dbpath)

"""--make_testdb is a dev-only option"""
if True == ap.getOptionalToggle("--make_testdb"):
    reduce_db_for_test(con)
    exit()

"""--reset_files is a dev-only option"""
if True == ap.getOptionalToggle("--reset_files"):
    reset_files(con)
    exit()

# 
# IMPORT
#
pillarspath = ap.getArg("--pillarspath")
if False == ap.getOptionalToggle("--skip_pillars_import") and False == ap.getOptionalToggle("--skip_import"):
    con = import_pillars(pillarspath, con)
else:
示例#2
0
    print "\t. Sorts all reads and creates BAM files (samtools)"
    print "\t. Finds peaks (macs2)"
    print "\t. Calculates fold-enrichment (macs2)"
    print "\t. Compares peaks and fold-enrichments across "
    print "\t\treplicates conditions, and species."
    print ""
    print "======================================================================"


splash()
"""read_cli reads the command-line, the annotation file, and creates a SQLite3 database."""
con = read_cli(ap)
print_settings(con)
validate_configuration_import(con)

if ap.getOptionalToggle("--load_db_only"):
    "\n. Ending"
    exit()
"""Jump allows for some steps to be skipped."""
jump = ap.getOptionalArg("--jump")
stop = ap.getOptionalArg("--stop")

if jump == False:
    jump = 0
else:
    jump = float(jump)

if stop == False:
    stop = 10000000
else:
    stop = float(stop)
示例#3
0
    if False == validate_config(ap.params):
        print "\n. Error: something is wrong with your configuration file."
        print ". Look at previous errors for more detail."
        exit(0)
"""If the user didn't give a configpath, then we at
least need a dbpath (to load a prior database)."""
dbpath = ap.getOptionalArg("--dbpath")

if configpath == False:
    print "\n. Error, you need to specify a configuration path, using --configpath"
    exit()
"""Regardless of which options are being executed, the DB gets
built, or rebuilt, depending on its status."""
con = build_db(dbpath=dbpath)
"""--make_testdb is a dev-only option"""
if True == ap.getOptionalToggle("--make_testdb"):
    reduce_db_for_test(con)
    exit()
"""--reset_files is a dev-only option"""
if True == ap.getOptionalToggle("--reset_files"):
    reset_files(con)
    exit()

#
# IMPORT
#
pillarspath = ap.getArg("--pillarspath")
if False == ap.getOptionalToggle(
        "--skip_pillars_import") and False == ap.getOptionalToggle(
            "--skip_import"):
    con = import_pillars(pillarspath, con)
示例#4
0
    print "\t. Sorts all reads and creates BAM files (samtools)"
    print "\t. Finds peaks (macs2)"
    print "\t. Calculates fold-enrichment (macs2)"
    print "\t. Compares peaks and fold-enrichments across "
    print "\t\treplicates conditions, and species."
    print ""
    print "======================================================================" 

splash()

"""read_cli reads the command-line, the annotation file, and creates a SQLite3 database."""
con = read_cli(ap)
print_settings(con)
validate_configuration_import(con)

if ap.getOptionalToggle("--load_db_only"):
    "\n. Ending"
    exit()

"""Jump allows for some steps to be skipped."""
jump = ap.getOptionalArg("--jump")
stop = ap.getOptionalArg("--stop")

if jump == False:
    jump = 0
else:
    jump = float(jump)
    
if stop == False:
    stop = 10000000
else: