Example #1
0
    meme_d = {'meme_args':opts.meme_args,
              'meme_log':meme_log,
              'fg_fn':fg_fn,
              #'bg_fn':bg_fn,
              #'bg_markov':meme_bg_markov,
              'meme_oc':meme_oc
              }
    calls = ["meme-chip -oc %(meme_oc)s %(meme_args)s %(fg_fn)s 2>&1 | tee %(meme_log)s"%meme_d]
    steps.append(PPS("Run MEME-ChIP",calls,env=os.environ))
    
    #############################################################################
    # build infosite
    #############################################################################
    calls = ['build_chipseq_infosite.py %s'%opts.infosite_args]
    steps.append(PPS('Build infosite',calls,env=os.environ))

    # cleanup
    rm_str = "rm -f %(d)s/*.out %(d)s/*.err %(d)s/*.script %(d)s/*.stats %(d)s/*.bed"
    calls = [rm_str%{'d':exp_wrk_dir}]

    if control_fn :
         calls.append(rm_str%{'d':cnt_wrk_dir})
    #steps.append(PPS('Clean up',calls,env=os.environ))

    pipeline.add_steps(steps)
    if opts.auto and opts.steplist is not None :
        steplist = parse_steplist(opts.steplist,pipeline)
    else :
        steplist = None
    pipeline.run(interactive=not opts.auto,steplist=steplist)
Example #2
0
            args.reads1_files, args.reads2_files, args.output_shortname, args.symlink_dir, args.fetcher_dir
        ):
            annoj_d = {
                "aligner": aligner,
                "dbhost": args.aj_dbhost,
                "dbname": args.aj_dbname,
                "dbuser": args.aj_dbuser,
                "dbpass": args.aj_dbpass,
                "dbtable": outf_short.replace("-", "").replace("(", "$").replace(")", "$"),
                "bamfile": os.path.join(symlink_d, outf_short + ".sorted.bam"),
                "fetcher": os.path.join(fetcher_d, outf_short + ".php"),
                "title": args.aj_title,
                "info": args.aj_info,
            }
            if reads2f == "":
                annoj_d["pe"] = "--pe"
            else:
                annoj_d["pe"] = ""
            calls.append(
                'integrate_bam_annoj.py %(aligner) %(pe)s --dbhost=%(dbhost)s --dbname=%(dbname)s --dbuser=%(dbuser)s --dbpass=%(dbpass)s --dbtable=%(dbtable)s --bamfile=%(bamfile)s --fetcher=%(fetcher)s --title="%(title)s --info="%(info)s"'
                % (annoj_d)
            )
    steps.append(PPS("Integrate with AnnoJ browser", calls, env=os.environ))

    pipeline.add_steps(steps)
    if args.auto and args.steplist is not None:
        steplist = parse_steplist(args.steplist, pipeline)
    else:
        steplist = None
    pipeline.run(interactive=not args.auto, steplist=steplist)