示例#1
0
def gen_outdir(options):
    if options.outdir:
        d = options.outdir
        mkdir(d)
    else:
        d = os.path.dirname(options.input_csv)
    return d
示例#2
0
def gen_outdir(options):
    if options.outdir:
        d = options.outdir
        mkdir(d)
    else:
        d = os.path.dirname(options.input_csv)
    return d
示例#3
0
This script parse soft files, download sra, convert sra to fastq and run rsem
on them, either on local system or on remote cluster.
"""

import os
import re
import logging.config

import urlparse

import ruffus as R

from jinja2 import Environment, FileSystemLoader

from rsempipeline.utils import misc
misc.mkdir('log')
from rsempipeline.utils import pre_pipeline_run as PPR
from rsempipeline.utils.download import gen_orig_params
from rsempipeline.utils.rsem import gen_fastq_gz_input
from rsempipeline.parsers.args_parser import parse_args_for_rp_run
from rsempipeline.conf.settings import (RP_RUN_LOGGING_CONFIG, TEMPLATES_DIR,
                                        QSUB_SUBMIT_SCRIPT_BASENAME)
# as PATH_RE for backward compatibility
from rsempipeline.conf.settings import RSEM_OUTPUT_DIR_RE as PATH_RE

# logger is used as a global variable by convention
logging.config.fileConfig(RP_RUN_LOGGING_CONFIG)
logger, logger_mutex = R.proxy_logger.make_shared_logger_and_proxy(
    R.proxy_logger.setup_std_shared_logger, "rp_run",
    {"config_file": os.path.join(RP_RUN_LOGGING_CONFIG)})
示例#4
0
This script parse soft files, download sra, convert sra to fastq and run rsem
on them, either on local system or on remote cluster.
"""

import os
import re
import logging.config

import urlparse

import ruffus as R

from jinja2 import Environment, FileSystemLoader

from rsempipeline.utils import misc
misc.mkdir('log')
from rsempipeline.utils import pre_pipeline_run as PPR
from rsempipeline.utils.download import gen_orig_params
from rsempipeline.utils.rsem import gen_fastq_gz_input
from rsempipeline.parsers.args_parser import parse_args_for_rp_run
from rsempipeline.conf.settings import (
    RP_RUN_LOGGING_CONFIG, TEMPLATES_DIR, QSUB_SUBMIT_SCRIPT_BASENAME)
# as PATH_RE for backward compatibility
from rsempipeline.conf.settings import RSEM_OUTPUT_DIR_RE as PATH_RE


# logger is used as a global variable by convention
logging.config.fileConfig(RP_RUN_LOGGING_CONFIG)
logger, logger_mutex = R.proxy_logger.make_shared_logger_and_proxy(
    R.proxy_logger.setup_std_shared_logger,
    "rp_run",
示例#5
0
def gen_soft_outdir(outdir):
    d = os.path.join(outdir, SOFT_OUTDIR_BASENAME)
    mkdir(d)
    return d
示例#6
0
def gen_gse_dir(outdir, gse):
    html_dir = gen_html_outdir(outdir)
    gse_dir = os.path.join(html_dir, gse)
    mkdir(gse_dir)
    return gse_dir
示例#7
0
def gen_html_outdir(outdir):
    d = os.path.join(outdir, HTML_OUTDIR_BASENAME)
    mkdir(d)
    return d
示例#8
0
 def test_mkdir_with_OSError(self, mock_os):
     mock_os.mkdir.side_effect = OSError()
     misc.mkdir('temp_dir')
     mock_os.mkdir.assert_called_once_with('temp_dir')
示例#9
0
 def test_mkdir(self, mock_os):
     misc.mkdir('temp_dir')
     mock_os.mkdir.assert_called_once_with('temp_dir')
示例#10
0
 def test_mkdir_with_OSError(self, mock_os):
     mock_os.mkdir.side_effect = OSError()
     misc.mkdir('temp_dir')
     mock_os.mkdir.assert_called_once_with('temp_dir')
示例#11
0
 def test_mkdir(self, mock_os):
     misc.mkdir('temp_dir')
     mock_os.mkdir.assert_called_once_with('temp_dir')
示例#12
0
def gen_gse_dir(outdir, gse):
    html_dir = gen_html_outdir(outdir)
    gse_dir = os.path.join(html_dir, gse)
    mkdir(gse_dir)
    return gse_dir
示例#13
0
def gen_html_outdir(outdir):
    d = os.path.join(outdir, HTML_OUTDIR_BASENAME)
    mkdir(d)
    return d