예제 #1
0
def replicate_fasta():

    if not paths.exists(scr_fasta):
        utilities.debug("Replicating fasta file")
        utilities.copy(fasta_file, scr_fasta)

    paths.existsOrFail(scr_fasta)
예제 #2
0
def replicate_fasta():
    
    if not paths.exists(scr_fasta):
        utilities.debug("Replicating fasta file")
        utilities.copy(fasta_file, scr_fasta)
        
    paths.existsOrFail(scr_fasta)
예제 #3
0
파일: frag_array.py 프로젝트: bsmithers/hpf
def replicate_fasta():
    global scr_fasta
    
    file = paths.getFile(fasta_file)
    scr_fasta = paths.join(scr_job, file)
    if not paths.exists(scr_fasta):
        util.debug("Replicating fasta file")
        util.copy(fasta_file, scr_fasta)
        
    paths.existsOrFail(scr_fasta)
예제 #4
0
def replicate_fasta():
    global scr_fasta

    file = paths.getFile(fasta_file)
    scr_fasta = paths.join(scr_job, file)
    if not paths.exists(scr_fasta):
        util.debug("Replicating fasta file")
        util.copy(fasta_file, scr_fasta)

    paths.existsOrFail(scr_fasta)
예제 #5
0
파일: fragmentor.py 프로젝트: bsmithers/hpf
 def _set_env(self):
     # Put local variables rep'ing tools and DBs into the environment (via os.environ).
     env = {
             'BLAST_DIR': self.blast,
             'NNMAKE_SHORT_DIR': self.nnmake_short,
             'PSIPRED_DIR': self.psipred,
             'JUFO_DIR': self.jufo,
             'SAM_DIR': self.sam,
             'SAM_2ND_DIR': self.sam_2nd,
             'NR_DIR': self.nr,
             'NNMAKEDB_DIR': self.nnmakedb,
           }
     for key in env:
         # If paths exist, put in Environment (otherwise, fail).
         paths.existsOrFail(env[key])
         os.environ[key] = env[key]
예제 #6
0
def runScript(no_homs=False):
    # Script requires the following environment variables
    # BLAST_DIR
    # NR_DIR
    # NNMAKE_DIR - the BLOSUM score matrices
    # PSIPRED_DIR
    # NNMAKE_DIR
    # JUFO_DIR
    # SAM_DIR
    # SAM_2ND_DIR - SAM Secondary Structure Prediction
    utilities.debug("Running fragmentation script")
    
    env = {
           'BLAST_DIR':'%s/blast' % tools_dir,
           'NR_DIR':'%s/db/nr' % scr_dir,
           'NNMAKEDB_DIR':'%s/db/nnmake_database' % scr_dir,
           'NNMAKE_SHORT_DIR':'%s/nnmake' % tools_dir,
           'PSIPRED_DIR':'%s/psipred' % tools_dir,
           'JUFO_DIR':'%s/jufo' % tools_dir,
           'SAM_DIR':'%s/sam' % tools_dir,
           'SAM_2ND_DIR':'%s/sam.predict-2nd' % tools_dir
           }
    
    for key in env :
        # Check if all paths given in env exist.
        paths.existsOrFail(env[key])
        
        # os.environ is the system environment. New env. vars. can be set by adding to it.
        os.environ[key] = env[key] 
    
    script = paths.join(home, "scripts", frag_script)
    
    if no_homs:
        script = "%s -nohoms" % script
    fasta = paths.getFile(fasta_file)
    cmd = "cd %s && %s -verbose -nosam %s" % (scr_job_dir, script, fasta)
    #cmd = "cd %s && %s -verbose %s" % (scr_job_dir, script, fasta)
    utilities.system(cmd)
예제 #7
0
def runScript(no_homs=False):
    # Script requires the following environment variables
    # BLAST_DIR
    # NR_DIR
    # NNMAKE_DIR - the BLOSUM score matrices
    # PSIPRED_DIR
    # NNMAKE_DIR
    # JUFO_DIR
    # SAM_DIR
    # SAM_2ND_DIR - SAM Secondary Structure Prediction
    utilities.debug("Running fragmentation script")

    env = {
        'BLAST_DIR': '%s/blast' % tools_dir,
        'NR_DIR': '%s/db/nr' % scr_dir,
        'NNMAKEDB_DIR': '%s/db/nnmake_database' % scr_dir,
        'NNMAKE_SHORT_DIR': '%s/nnmake' % tools_dir,
        'PSIPRED_DIR': '%s/psipred' % tools_dir,
        'JUFO_DIR': '%s/jufo' % tools_dir,
        'SAM_DIR': '%s/sam' % tools_dir,
        'SAM_2ND_DIR': '%s/sam.predict-2nd' % tools_dir
    }

    for key in env:
        # Check if all paths given in env exist.
        paths.existsOrFail(env[key])

        # os.environ is the system environment. New env. vars. can be set by adding to it.
        os.environ[key] = env[key]

    script = paths.join(home, "scripts", frag_script)

    if no_homs:
        script = "%s -nohoms" % script
    fasta = paths.getFile(fasta_file)
    cmd = "cd %s && %s -verbose -nosam %s" % (scr_job_dir, script, fasta)
    #cmd = "cd %s && %s -verbose %s" % (scr_job_dir, script, fasta)
    utilities.system(cmd)
예제 #8
0
파일: frag_array.py 프로젝트: bsmithers/hpf
def runScript():
    # Script requires the following environment variables
    # BLAST_DIR
    # NR_DIR
    # NNMAKE_DIR - the BLOSUM score matrices
    # PSIPRED_DIR
    # NNMAKE_DIR
    # JUFO_DIR
    # SAM_DIR
    # SAM_2ND_DIR - SAM Secondary Structure Prediction
    util.debug("Running fragmentation script")
    
    env = {
           'BLAST_DIR':'%s/blast' % shareware,
           'NR_DIR':'%s/db/nr' % scr,
           'NNMAKEDB_DIR':'%s/db/nnmake_database' % scr,
           'NNMAKE_SHORT_DIR':'%s/nnmake' % shareware,
           'PSIPRED_DIR':'%s/psipred' % shareware,
           'JUFO_DIR':'%s/jufo' % shareware,
           'SAM_DIR':'%s/sam' % shareware,
           'SAM_2ND_DIR':'%s/sam.predict-2nd' % shareware
           }
    
    for key in env :
        # Make sure all paths in 'env' exist in the system.
        paths.existsOrFail(env[key])
        # Put 'env' values into the system environment.
        os.environ[key] = env[key] 
    
    script = paths.join(home, "scripts", pl_script)
    if no_homs:
        script = "%s -nohoms" % script
    fasta = paths.getFile(scr_fasta)
    cmd = "cd %s && %s -verbose -nosam %s" % (scr_job, script, fasta)
    #cmd = "cd %s && %s -verbose %s" % (scr_job, script, fasta)
    util.system(cmd)
예제 #9
0
def runScript():
    # Script requires the following environment variables
    # BLAST_DIR
    # NR_DIR
    # NNMAKE_DIR - the BLOSUM score matrices
    # PSIPRED_DIR
    # NNMAKE_DIR
    # JUFO_DIR
    # SAM_DIR
    # SAM_2ND_DIR - SAM Secondary Structure Prediction
    util.debug("Running fragmentation script")

    env = {
        'BLAST_DIR': '%s/blast' % shareware,
        'NR_DIR': '%s/db/nr' % scr,
        'NNMAKEDB_DIR': '%s/db/nnmake_database' % scr,
        'NNMAKE_SHORT_DIR': '%s/nnmake' % shareware,
        'PSIPRED_DIR': '%s/psipred' % shareware,
        'JUFO_DIR': '%s/jufo' % shareware,
        'SAM_DIR': '%s/sam' % shareware,
        'SAM_2ND_DIR': '%s/sam.predict-2nd' % shareware
    }

    for key in env:
        # Make sure all paths in 'env' exist in the system.
        paths.existsOrFail(env[key])
        # Put 'env' values into the system environment.
        os.environ[key] = env[key]

    script = paths.join(home, "scripts", pl_script)
    if no_homs:
        script = "%s -nohoms" % script
    fasta = paths.getFile(scr_fasta)
    cmd = "cd %s && %s -verbose -nosam %s" % (scr_job, script, fasta)
    #cmd = "cd %s && %s -verbose %s" % (scr_job, script, fasta)
    util.system(cmd)