Skip to content

Commit

Permalink
Merge pull request #359 from CGATOxford/AC-conda_env_pe
Browse files Browse the repository at this point in the history
Ac conda env pe
  • Loading branch information
sebastian-luna-valero authored Oct 23, 2017
2 parents f756af3 + 7aca537 commit 09667b6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 4 additions & 2 deletions CGATPipelines/PipelinePeakcalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,8 @@ def callPeaks(self, infile, outfile, controlfile=None, conda_env=None):
'bamToBed -i %(controlfile)s \
> %(workdir)s/control.bed' % locals())
statement.append("cd %(workdir)s" % locals())
statement.append('''SICER.sh . foreground.bed control.bed \
statement.append('''%(conda_env)s &&
SICER.sh . foreground.bed control.bed \
. %(genome)s
%(redundancy_threshold)s
%(window_size)s
Expand All @@ -1810,7 +1811,8 @@ def callPeaks(self, infile, outfile, controlfile=None, conda_env=None):

else:
statement.append('cd%(workdir)s')
statement.append('''SICER-rb.sh .foreground.bed . %(genome)s
statement.append('''%(conda_env)s &&
SICER-rb.sh .foreground.bed . %(genome)s
%(redundancy_threshold)s
%(window_size)s
%(fragment_size)s
Expand Down
10 changes: 6 additions & 4 deletions CGATPipelines/pipeline_peakcalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ def estimateInsertSize(infile, outfile):
PARAMS['paired_end'],
PARAMS['insert_alignments'],
PARAMS['insert_macs2opts'],
PARAMS['python2_sourcecommand'])
PARAMS['python2_macs2'])


@merge(estimateInsertSize, "insert_sizes.tsv")
Expand Down Expand Up @@ -973,7 +973,7 @@ def callMacs2peaks(infiles, outfile):
PARAMS['macs2_idrsuffix'],
PARAMS['macs2_idrcol'],
PARAMS['macs2_broad_peak'],
PARAMS['python2_sourcecommand'])
PARAMS['python2_macs2'])
P.run()
peakcaller.summarise(outfile)

Expand Down Expand Up @@ -1044,7 +1044,8 @@ def callNarrowerPeaksWithSicer(infiles, outfile):
idr=PARAMS['IDR_run'],
idrc=PARAMS['sicer_idrkeeppeaks'],
idrcol=PARAMS['sicer_idrcol'],
broad_peak=0)
broad_peak=0,
conda_env=PARAMS['python2_sicer'])

P.run()
peakcaller.summarise(outfile, mode="narrow")
Expand Down Expand Up @@ -1116,7 +1117,8 @@ def callBroaderPeaksWithSicer(infiles, outfile):
idr=PARAMS['IDR_run'],
idrc=PARAMS['sicer_idrkeeppeaks'],
idrcol=PARAMS['sicer_idrcol'],
broad_peak=1)
broad_peak=1,
conda_env=PARAMS['python2_sicer'])

P.run()
peakcaller.summarise(outfile, mode="broad")
Expand Down
3 changes: 2 additions & 1 deletion CGATPipelines/pipeline_peakcalling/pipeline.ini
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ strip=1
# this sources the python2 conda environment - this is required to run the
# macs2 software
# outside of CGAT a different command would be needed!
sourcecommand=PATH=/ifs/apps/conda-envs/envs/macs2/bin;CONDA_PREFIX=/ifs/apps/conda-envs/envs/macs2
macs2=PATH=/ifs/apps/conda-envs/envs/macs2/bin;CONDA_PREFIX=/ifs/apps/conda-envs/envs/macs2
sicer=export PATH=/usr/local/bin:/usr/bin:/bin:/ifs/apps/conda-envs/envs/sicer/bin:/ifs/apps/bio/sicer-1.1:/ifs/apps/bio/sicer-1.1/utility && export CONDA_PREFIX=/ifs/apps/conda-envs/envs/sicer && export PYTHONPATH=/ifs/apps/bio/sicer-1.1/lib:/ifs/apps/conda-envs/envs/sicer/lib/python2.6/site-packages:/ifs/apps/conda-envs/envs/sicer/lib/python2.6
unsourcecommand=

[insert]
Expand Down

0 comments on commit 09667b6

Please sign in to comment.