Commit 47b11f60 authored by Thomas Van Parys's avatar Thomas Van Parys
Browse files

Launcher: use CEDALION_HOME env variable (fixes #58)

parent 219a1045
...@@ -244,15 +244,15 @@ def prompt(species_file): ...@@ -244,15 +244,15 @@ def prompt(species_file):
def editProteome(): def editProteome():
value = input("{} ({})> ".format(SpeciesEntry.contentNames['proteome'], thisEntry.proteome)) value = input("{} ({})> ".format(SpeciesEntry.contentNames['proteome'], thisEntry.proteome))
if value: if value:
thisEntry.proteome = value if value!='-' else '' thisEntry.proteome = value if value != '-' else ''
def editCds(): def editCds():
value = input("{} ({})> ".format(SpeciesEntry.contentNames['cds'], thisEntry.cds)) value = input("{} ({})> ".format(SpeciesEntry.contentNames['cds'], thisEntry.cds))
thisEntry.cds = value if value!='-' else '' thisEntry.cds = value if value != '-' else ''
def editGff3(): def editGff3():
value = input("{} ({})> ".format(SpeciesEntry.contentNames['gff3'], thisEntry.gff3)) value = input("{} ({})> ".format(SpeciesEntry.contentNames['gff3'], thisEntry.gff3))
thisEntry.gff3 = value if value!='-' else '' thisEntry.gff3 = value if value != '-' else ''
editOptions = { editOptions = {
'i': editCedalionId, 'i': editCedalionId,
...@@ -278,11 +278,15 @@ def prompt(species_file): ...@@ -278,11 +278,15 @@ def prompt(species_file):
# Get main Nextflow pipeline script # Get main Nextflow pipeline script
main_nf = 'main.nf' main_nf = 'main.nf'
modpath, modfile = os.path.split(__file__) if 'CEDALION_HOME' in os.environ:
cedpath, mod = os.path.split(modpath) cedalion_home = os.environ['CEDALION_HOME']
mainpath, mod = os.path.split(cedpath) else:
main_nf_path = os.path.join(mainpath, main_nf) homeDirEntered = ''
while not homeDirEntered:
homeDirEntered = input("Cedalion installation folder> ")
cedalion_home = homeDirEntered
main_nf_path = os.path.join(cedalion_home, main_nf)
inputDir = '.' inputDir = '.'
inputDirEntered = input("Data input folder (default: .)> ") inputDirEntered = input("Data input folder (default: .)> ")
if inputDirEntered: if inputDirEntered:
...@@ -293,7 +297,7 @@ def prompt(species_file): ...@@ -293,7 +297,7 @@ def prompt(species_file):
if outputDirEntered: if outputDirEntered:
outputDir = outputDirEntered outputDir = outputDirEntered
workDir = os.path.join(os.getcwd(),'work') workDir = os.path.join(os.getcwd(), 'work')
workDirEntered = input("Working and cache folder (default: ./work)> ") workDirEntered = input("Working and cache folder (default: ./work)> ")
if workDirEntered: if workDirEntered:
workDir = workDirEntered workDir = workDirEntered
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment