Ejemplo n.º 1
0
def main():
    options = mainUsage()
    
    script = options.run
    checkDoRun(script)

    try:
        # Read organism common name and related fasta sequence file
        list_file = options.list
        util.checkFile(list_file)
        for line in open(list_file, "r"):
            if line[0] == '!':
                continue
            if line.count('||') < 1:
                continue
            # ! common_name||sequence_file
            common_name, input_file = util.splitLine(line)
            util.checkFile(input_file)
            # Run command
            cmd = 'python -c "from genepy.annotators.%s import doRun; doRun()" -o %s -i %s' % (script, common_name, input_file)
            if util.isLsf():
                job_name = "%s.%s" % (common_name, ANNOTATOR_EXTENSION[script])
                util.submitJob(job_name, cmd, ANNOTATOR_QUEUE[script])
            else:
                util.runProcess(cmd)
    except Exception, e:
        log.error(e)
Ejemplo n.º 2
0
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord 
from Bio.Alphabet import IUPAC
# ropy import
import ropy
# genepy import
import util
from setup import connectionFactory, logger
            

### ---------------------------------------------------------------------------
### GENEPY constants
### ---------------------------------------------------------------------------
# platform
IS_LSF = util.isLsf()
bsub_dir = "bsub"
# software
soft_lists = ['fasta35', 'pfscan']
# data
mygenome_dir = "mygenome" 
mygenome_fastafile_allcds = "mygenome_allcds.faa"
refgenomes_dir = "refgenomes"
# results
fasta_dir = "results_fasta"
reciprocalfasta_dir = "results_reciprocalfasta"
refgenomes_extractedseq_dir = "refgenomes_extractedseq"
hamap_dir = "results_hamap"


### ---------------------------------------------------------------------------