Skip to content

Commit

Permalink
nicer formatting for mafft functions in documentary
Browse files Browse the repository at this point in the history
  • Loading branch information
hng committed Mar 31, 2015
1 parent e90f895 commit 02d89fb
Showing 1 changed file with 39 additions and 21 deletions.
60 changes: 39 additions & 21 deletions docs/mafft.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,13 @@ Tested with MAFFT v7.215 (2014/12/17)
## Dependencies

* MAFFT has to be installed
* FastaIO

## Usage

```julia
mafft("examples/fasta/il4.fasta")
```

Runs mafft with the provided fasta file and returns the alignment in FastaIO dataformat. By default mafft is called with the `--auto` option.


```julia
mafft("examples/fasta/il4.fasta", ["--localpair", "--maxiterate", "1000"])
```

Calling mafft with custom arguments. Arguments have to be a array of strings. This call is also equivalent to calling:

```julia
mafft("examples/fasta/il4.fasta", :linsi)
```
* Julia Packages
* FastaIO

## Exported functions

### mafft

```julia
mafft(fasta_in::String, preconfiguration=:default)
```
Expand All @@ -42,6 +26,8 @@ Runs mafft with the provided fasta file and returns the alignment in FastaIO dat

*preconfiguration*: optional commandline arguments for MAFFT (array of strings)

### mafft_from_string

```julia
mafft_from_string(fasta_in::String, preconfiguration=:default)
```
Expand All @@ -52,6 +38,8 @@ Calls MAFFT with the given FASTA string as input and returns aligned FASTA in th

**preconfiguration**: optional commandline arguments for MAFFT (array of strings)

### mafft_from_fasta

```julia
mafft_from_fasta(fasta_in, preconfiguration=:default)
```
Expand All @@ -62,20 +50,26 @@ Calls MAFFT with the given FASTA in FastaIO format

*preconfiguration*: optional commandline arguments for MAFFT (array of strings)

### mafft_profile

```julia
mafft_profile(group1::String, group2::String)
```
Group-to-group alignments

**group1** and **group2** have to be files with alignments. Returns aligned FASTA in the FastaIO dataformat.

### mafft_profile_from_string

```julia
mafft_profile_from_string(group1::String, group2::String)
```
Group-to-group alignments with input strings in FASTA format.

**group1** and **group2** have to be strings with alignments in FASTA format.

### mafft_profile_from_fasta

```julia
mafft_profile_from_fasta(group1, group2)
```
Expand All @@ -87,28 +81,33 @@ Group-to-group alignments with input in FastaIO format
### Helper functions for aligned FASTA
This module also includes a few helper functions for the FastaIO dataformat (which is returned by the mafft functions of this module).

#### alignment_length

```julia
alignment_length(fasta)
```
Returns the length of the alignment.

**fasta**: A FastaIO dataformat object

#### to_aminoacids

```julia
to_aminoacids(fasta)
```
Converts a FastaIO-formatted array into an array of BioSeq AminoAcid.

**fasta**: A FastaIO dataformat object

#### print_fasta

```julia
print_fasta(fasta)
```
Prints a FastaIO object in a nicely formatted way to the screen.

**fasta**: A FastaIO dataformat object


## Supported pre-configurations (strategies)

The following mafft strategies are supported by built-in preconfigurations which can be used by supplying the function calls with the corresponding symbol (in the parentheses).
Expand All @@ -121,6 +120,25 @@ The following mafft strategies are supported by built-in preconfigurations which
* NW-NS-i (``:nwnsi``)
* NW-NS-2 (``:nwns``)

## Usage

```julia
mafft("examples/fasta/il4.fasta")
```

Runs mafft with the provided fasta file and returns the alignment in FastaIO dataformat. By default mafft is called with the `--auto` option.


```julia
mafft("examples/fasta/il4.fasta", ["--localpair", "--maxiterate", "1000"])
```

Calling mafft with custom arguments. Arguments have to be a array of strings. This call is also equivalent to calling:

```julia
mafft("examples/fasta/il4.fasta", :linsi)
```

## References
<ul>
<li>
Expand Down

0 comments on commit 02d89fb

Please sign in to comment.