# Module

Multiple versions of various software packages are available on luria.mit.edu Versions are managed using [module](http://modules.sourceforge.net/).

**module commands**

* List available applications on the system:

```
module avail
```

* Load an application so it can be used:

```
module add
```

* Specify version number of an application, e.g.

```
module add tophat/2.0.12
```

We recommend you always module add the version number so that you know which version of the software is used. Otherwise, a running application may generate different results or break when the software is upgraded in the future.

Note: some packages are available only after you load the python (for python packages) or jre (for java packages) modules. For example, compare the output of the following:

```
module avail
```

with

```
module add jre/1.6.0-29
module add python/2.7.2
module avail
```

* R and R packages - Various versions of R are installed on luria. Each one has a collection of associated packages. Execute the following commands taking note of the comment lines:

```
# Load an R version
module add r/2.15.3
# Start R
R
```

* Once inside R, check out the available R packages

```
#List R packages and direct the list into an object called "a"
a<-installed.packages()
#Display the dimensions of the object "a"
dim(a)
#List the parts of object "a" that have package name and package version
a[,c(1,3)]
```

* **NOTE:** Those package version numbers may not be consistent from month to month and can change without warning.
* When working with R, capture your session info with the command below so you can reproduce the environment if needed:

```
sessionInfo()
```

* quit R

```
q(save="yes")
#enter y at prompt
```

* Once back in the shell, view the R data that remains

```
ls -lat | head
cat .Rhistory
```

* List loaded applications:

```
module list
```

* Unload an application:

```
module del
```

* Print module help:

```
module help
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://igb.mit.edu/mini-courses/introduction-to-unix-and-ki-computational-resources/software-installation/module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
