Skip to content

Commit

Permalink
Update user manual (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben J. Ward authored Jun 20, 2021
1 parent 9d40795 commit 87f806c
Show file tree
Hide file tree
Showing 18 changed files with 267 additions and 320 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Latest Release](https://img.shields.io/github/release/BioJulia/BioSequences.jl.svg)](https:/BioJulia/BioSequences.jl/releases/latest)
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https:/BioJulia/BioSequences.jl/blob/master/LICENSE)
[![Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://biojulia.github.io/BioSequences.jl/stable)
[![Pkg Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Pkg Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Chat](https://img.shields.io/gitter/room/BioJulia/BioSequences.svg)](https://gitter.im/BioJulia/BioSequences.jl)


Expand Down
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ makedocs(
"Pattern matching and searching" => "sequence_search.md",
"Iteration" => "iteration.md",
"Counting" => "counting.md",
"I/O" => "io.md"
"I/O" => "io.md",
"Interfaces" => "interfaces.md"
],
authors = "Ben J. Ward, D.C.Jones, Kenta Sato, The BioJulia Organisation and other contributors."
)
Expand Down
49 changes: 2 additions & 47 deletions docs/src/construction.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,33 +67,12 @@ julia> LongSequence{DNAAlphabet{2}}([DNA_T, DNA_T, DNA_A, DNA_G, DNA_C])
5nt DNA Sequence:
TTAGC
julia> DNAMer{5}([DNA_T, DNA_T, DNA_A, DNA_G, DNA_C])
DNA 5-mer:
TTAGC
julia> RNAMer{5}([RNA_U, RNA_U, RNA_A, RNA_G, RNA_C])
RNA 5-mer:
UUAGC
julia> # Works, but is not type-stable
julia> DNAMer([DNA_T, DNA_T, DNA_A, DNA_G, DNA_C])
DNA 5-mer:
TTAGC
julia> RNAMer([RNA_U, RNA_U, RNA_A, RNA_G, RNA_C])
RNA 5-mer:
UUAGC
```

### Constructing sequences from other sequences

You can create sequences, by concatenating other sequences together:
```jldoctest
julia> LongDNASeq(LongDNASeq("ACGT"), LongDNASeq("NNNN"), LongDNASeq("TGCA"))
12nt DNA Sequence:
ACGTNNNNTGCA
julia> LongDNASeq("ACGT") * LongDNASeq("TGCA")
8nt DNA Sequence:
ACGTTGCA
Expand All @@ -108,24 +87,6 @@ TATATATATATATATATATA
```

You can also construct long sequences from kmer sequences, and vice versa:

```jldoctest
julia> m = DNAMer{5}([DNA_T, DNA_T, DNA_A, DNA_G, DNA_C])
DNA 5-mer:
TTAGC
julia> LongSequence(m)
5nt DNA Sequence:
TTAGC
julia> # round trip from mer to long sequence back to mer.
julia> DNAMer(LongSequence(m))
DNA 5-mer:
TTAGC
```

Sequence views (`LongSubSeq`s) are special, in that they do not own their own data,
and must be constructed from a `LongSequence` or another `LongSubSeq`:

Expand All @@ -150,10 +111,7 @@ true

## Conversion of sequence types

Sometimes you can convert between sequence types without construction / having
to copy data. for example, despite being separate types, `LongDNASeq` and
`LongRNASeq` can freely be converted between efficiently, without copying the
underlying data:
You can convert between sequence types.
```jldoctest
julia> dna = dna"TTANGTAGACCG"
12nt DNA Sequence:
Expand All @@ -163,9 +121,6 @@ julia> rna = convert(LongRNASeq, dna)
12nt RNA Sequence:
UUANGUAGACCG
julia> dna.data === rna.data # underlying data are same
true
```

Sequences can be converted explicitly and implicitly, into arrays and strings:
Expand All @@ -181,7 +136,7 @@ julia> dnastr = convert(String, dna)
julia> # Implicit conversion to string - putting dna sequence in String vector
julia> arr = String[dna]
1-element Array{String,1}:
1-element Vector{String}:
"TTANGTAGACCG"
```
Expand Down
35 changes: 0 additions & 35 deletions docs/src/dev_docs/bitindex.md

This file was deleted.

53 changes: 0 additions & 53 deletions docs/src/dev_docs/sequences/biosequence.md

This file was deleted.

53 changes: 0 additions & 53 deletions docs/src/dev_docs/symbols.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Latest Release](https://img.shields.io/github/release/BioJulia/BioSequences.jl.svg)](https:/BioJulia/BioSequences.jl/releases/latest)
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https:/BioJulia/BioSequences.jl/blob/master/LICENSE)
[![Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://biojulia.github.io/BioSequences.jl/stable)
[![Pkg Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Pkg Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Chat](https://img.shields.io/gitter/room/BioJulia/BioSequences.svg)](https://gitter.im/BioJulia/BioSequences.jl)


Expand Down
Loading

0 comments on commit 87f806c

Please sign in to comment.