Conda Create Exercise


15 Minutes


We’ve covered the basics of Conda, including how to create environments, as well as activate and deactivate them. We’ll use those same ideas in this exercise to create a conda environment with all of the software that we’ve used so far.


In this exercise, we’ll use a special tool that enhances Conda, called Mamba. It is used for environment creation, so you will use it in place of conda create in this exercise.


Instructions:


  • Work independently in the main room, posting any questions that arise to slack.
  • Recommendations for writing your own code:
    • Read function documentation
    • Test out ideas - it’s okay to make mistakes and generate errors
    • Use a search engine to look up errors or recommended solutions using keywords
  • We’ll review possible solutions after time is up as a group.


  • When a solution is found DO NOT have all users create the environment. Instead, choose only a subset of interested learners to complete this exercise. We do not want to overwhelm the AWS instance.


  • Use mamba to create an environment with all of the software that we used today:
    • cutadapt
    • fastqc
    • multiqc
    • star
    • rsem
  • Use two channels when building the environment:
    • conda-forge
    • bioconda


Hint: The tool mamba is a drop-in replacement for conda create and similar commands. It is powerful and fast, which allows us to easily replicate our whole environment from today. conda create can be very slow or uncooperative when creating environments with certain software combinations, and mamba helps us get around that in this case. The command is exactly the same as a conda create command, e.g.:

mamba create -n <env-name> -c <channel> <package1> ...


LS0tCnRpdGxlOiAiRXhlcmNpc2UgMDQiCmF1dGhvcjogIlVNIEJpb2luZm9ybWF0aWNzIENvcmUiCm91dHB1dDoKICAgICAgICBodG1sX2RvY3VtZW50OgogICAgICAgICAgICBpbmNsdWRlczoKICAgICAgICAgICAgICAgIGluX2hlYWRlcjogaGVhZGVyLmh0bWwKICAgICAgICAgICAgdGhlbWU6IHBhcGVyCiAgICAgICAgICAgIGZpZ19jYXB0aW9uOiB0cnVlCiAgICAgICAgICAgIG1hcmtkb3duOiBHRk0KICAgICAgICAgICAgY29kZV9kb3dubG9hZDogdHJ1ZQotLS0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KYm9keXsgLyogTm9ybWFsICAqLwogICAgICBmb250LXNpemU6IDE0cHQ7CiAgfQpwcmUgewogIGZvbnQtc2l6ZTogMTJwdAp9Cjwvc3R5bGU+Cgo8YnI+CgojIyBDb25kYS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