Skip to content

Commit

Permalink
Add absolute path for the environments
Browse files Browse the repository at this point in the history
  • Loading branch information
sposadac committed Apr 6, 2020
1 parent 8783c72 commit 2ef84bc
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions vpipe.snake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ LOGGER = logging.getLogger('snakemake.logging')
VPIPE_DEBUG = True if os.environ.get('VPIPE_DEBUG') is not None else False
VPIPE_BENCH = True if os.environ.get('VPIPE_BENCH') is not None else False

vpipe_basedir = workflow.basedir

class VpipeConfig(object):
'Class used to encapsulate the configuration properties used by V-pipe'
Expand Down Expand Up @@ -99,7 +100,7 @@ class VpipeConfig(object):
'conda': __RECORD__(value='', type=str),
}),
('create_vicuna_initial', {
'conda': __RECORD__(value='envs/smallgenomeutilities.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/smallgenomeutilities.yaml', type=str),
}),
('hmm_align', {
'mem': __RECORD__(value=1250, type=int),
Expand All @@ -123,7 +124,7 @@ class VpipeConfig(object):
('coverage_QA', {
'mem': __RECORD__(value=1250, type=int),
'time': __RECORD__(value=235, type=int),
'conda': __RECORD__(value='envs/smallgenomeutilities.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/smallgenomeutilities.yaml', type=str),
}),
('msa', {
'mem': __RECORD__(value=10000, type=int),
Expand All @@ -134,12 +135,12 @@ class VpipeConfig(object):
('convert_to_ref', {
'mem': __RECORD__(value=8000, type=int),
'time': __RECORD__(value=235, type=int),
'conda': __RECORD__(value='envs/smallgenomeutilities.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/smallgenomeutilities.yaml', type=str),
}),
('ref_bwa_index', {
'mem': __RECORD__(value=2000, type=int),
'time': __RECORD__(value=235, type=int),
'conda': __RECORD__(value='envs/bwa_align.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/bwa_align.yaml', type=str),
}),
('bwa_align', {
'mem': __RECORD__(value=1250, type=int),
Expand All @@ -150,7 +151,7 @@ class VpipeConfig(object):
('ref_bowtie_index', {
'mem': __RECORD__(value=2000, type=int),
'time': __RECORD__(value=235, type=int),
'conda': __RECORD__(value='envs/bowtie_align.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/bowtie_align.yaml', type=str),
}),
('bowtie_align', {
'mem': __RECORD__(value=1250, type=int),
Expand All @@ -165,7 +166,7 @@ class VpipeConfig(object):
('consensus_sequences', {
'mem': __RECORD__(value=1250, type=int),
'time': __RECORD__(value=235, type=int),
'conda': __RECORD__(value='envs/smallgenomeutilities.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/smallgenomeutilities.yaml', type=str),

'min_coverage': __RECORD__(value=50, type=int),
'qual_thrd': __RECORD__(value=15, type=int),
Expand All @@ -175,13 +176,13 @@ class VpipeConfig(object):
'mem': __RECORD__(value=1000, type=int),
'time': __RECORD__(value=235, type=int),
'threads': __RECORD__(value=0, type=int),
'conda': __RECORD__(value='envs/smallgenomeutilities.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/smallgenomeutilities.yaml', type=str),
}),
('coverage_intervals', {
'mem': __RECORD__(value=1000, type=int),
'time': __RECORD__(value=60, type=int),
'threads': __RECORD__(value=0, type=int),
'conda': __RECORD__(value='envs/smallgenomeutilities.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/smallgenomeutilities.yaml', type=str),

'overlap': __RECORD__(value=False, type=bool),
'coverage': __RECORD__(value=50, type=int),
Expand Down Expand Up @@ -219,7 +220,7 @@ class VpipeConfig(object):
('haploclique_visualization', {
'mem': __RECORD__(value=2000, type=int),
'time': __RECORD__(value=235, type=int),
'conda': __RECORD__(value='envs/smallgenomeutilities.yaml', type=str),
'conda': __RECORD__(value=f'{vpipe_basedir}/envs/smallgenomeutilities.yaml', type=str),

'region_start': __RECORD__(value=0, type=int),
'region_end': __RECORD__(value=9719, type=int),
Expand Down Expand Up @@ -261,7 +262,7 @@ class VpipeConfig(object):
cur_value = defaults.value if defaults.value else self.__members[
'general']['threads']
elif value == 'conda':
cur_value = "envs/{}.yaml".format(section) if len(
cur_value = f'{vpipe_basedir}/envs/{section}.yaml' if len(
defaults.value) == 0 else defaults.value
else:
cur_value = defaults.value
Expand Down

0 comments on commit 2ef84bc

Please sign in to comment.