timkahlke / BASTA

Basic Sequence Taxonomy Annotator
GNU General Public License v3.0
38 stars 13 forks source link

Installation in conda #9

Closed thierryjanssens closed 6 years ago

thierryjanssens commented 6 years ago

Hi,

upon an attempt to install basta in conda I go the following error. The yaml file seems to be badly interpreted. $ wget https://github.com/timkahlke/BASTA/blob/master/environment_linux.yml $ conda env create -f environment_linux.yml

...

$ /data/anaconda3/bin/conda-env create -f ./environment_linux.yml

Traceback (most recent call last):
  File "/data/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 640, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "/data/anaconda3/lib/python3.6/site-packages/conda_env/cli/main_create.py", line 78, in execute
    directory=os.getcwd())
  File "/data/anaconda3/lib/python3.6/site-packages/conda_env/specs/__init__.py", line 20, in detect
    if spec.can_handle():
  File "/data/anaconda3/lib/python3.6/site-packages/conda_env/specs/yaml_file.py", line 14, in can_handle
    self._environment = env.from_file(self.filename)
  File "/data/anaconda3/lib/python3.6/site-packages/conda_env/env.py", line 80, in from_file
    return from_yaml(yamlstr, filename=filename)
  File "/data/anaconda3/lib/python3.6/site-packages/conda_env/env.py", line 68, in from_yaml
    data = yaml.load(yamlstr)
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/main.py", line 75, in load
    return loader.get_single_data()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/constructor.py", line 60, in get_single_data
    node = self.get_single_node()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/composer.py", line 53, in get_single_node
    document = self.compose_document()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/composer.py", line 76, in compose_document
    self.get_event()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/parser.py", line 136, in get_event
    self.current_event = self.state()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/parser.py", line 215, in parse_document_end
    token = self.peek_token()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/scanner.py", line 144, in peek_token
    self.fetch_more_tokens()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/scanner.py", line 239, in fetch_more_tokens
    return self.fetch_value()
  File "/data/anaconda3/lib/python3.6/site-packages/ruamel_yaml/scanner.py", line 598, in fetch_value
    self.get_mark())
ruamel_yaml.scanner.ScannerError: mapping values are not allowed here
  in "<unicode string>", line 323, column 24:
      <!-- blob contrib key: blob_contributors:v21:0b8a2db9 ...

Regards,

Thierry

thierryjanssens commented 6 years ago

Has been solved, since the problem was identified.
wget downloaded the html page instead of the yaml.

timkahlke commented 6 years ago

Hi Thierry, Was just looking into it but good that you solved it. Hope the rest works. Cheers, Tim

thierryjanssens commented 6 years ago

Hi Tim,

after having executed

$conda env create -f environment_linux.yml -n basta

all the dependencies from the yaml were installed the environment, but no basta executable was found in the environments bin folder. Maybe I have overlooked something?

Cheers,

Thierry

maxibor commented 6 years ago

Hi Thierry, The conda environment is just for the dependancies, you still need to git clone and cd to the Basta bin directory. AFAIK, Basta is not (yet) distributed as a package

nick-youngblut commented 6 years ago

Sorry to hit up an old issue, but will there be a pypi and/or conda release of of BASTA any time soon? My research lab tries to only use software that can be installed and maintained with a package manager (preferably conda). This helps increase bioinformatics analysis reproducibility, which is sadly still often lacking for many studies.

timkahlke commented 6 years ago

Fair enough. I will try to free up some time in the next weeks and look into it.

timkahlke commented 6 years ago

Hi all, Just in case it's still of interest: I re-wrote some functions and also build a conda repo. BASTA plus dependencies can now be installed completely using conda:

conda -c bioconda -c bnoon -c timkahlke basta

Hope it works

nick-youngblut commented 6 years ago

That's great! Thanks for creating it!