Skip to content

Commit cfda522

Browse files
Rename 'Finding ORFs' section to 'The ORF type' and move related content from naivefinder.md to orftype.md for improved documentation clarity.
1 parent 47bcc0e commit cfda522

File tree

4 files changed

+38
-109
lines changed

4 files changed

+38
-109
lines changed

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pgs = [
1515
"Home" => "index.md",
1616
"Get Started" => "getstarted.md",
1717
"Usage" => [
18-
"Finding ORFs" => "naivefinder.md",
18+
"The ORF type" => "orftype.md",
1919
"Scoring ORFs" => "features.md",
2020
"A Simple Coding Rule" => "simplecodingrule.md",
2121
"Writing ORFs In Files" => "iodocs.md",

docs/src/naivefinder.md

Lines changed: 0 additions & 99 deletions
This file was deleted.

docs/src/orftype.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
## The ORFI type
3+
4+
For convenience, the `ORFI` type is more stringent in preventing the creation of incompatible instances. As a result, attempting to create an instance with incompatible parameters will result in an error. For instance, the following code snippet will trigger an error:
5+
6+
```julia
7+
ORFI{4,NaiveFinder}(1:10, '+', 4) # Or any F <: GeneFinderMethod
8+
9+
ERROR: MethodError: no method matching OpenReadingFrameInterval{4, NaiveFinder}(::UnitRange{Int64}, ::Char, ::Int64)
10+
11+
Closest candidates are:
12+
(::Type{OpenReadingFrameInterval{N, F}} where {N, F})(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)
13+
@ GeneFinder ~/.julia/dev/GeneFinder/src/types.jl:49
14+
OpenReadingFrameInterval{N, F}(::Type{F}, ::String, ::Int64, ::Int64, ::Strand, ::Int8, ::LongSubSeq{DNAAlphabet{N}}, ::NamedTuple) where {N, F<:GeneFinder.GeneFinderMethod}
15+
@ GeneFinder ~/.julia/dev/GeneFinder/src/types.jl:58
16+
17+
Stacktrace:
18+
[1] top-level scope
19+
@ REPL[21]:1
20+
```
21+
22+
Similar behavior will be encountered when the strand is neither `+` nor `-`. This precautionary measure helps prevent the creation of invalid ORFs, ensuring greater stability and enabling the extension of its interface. For example, after creating a specific `ORFI`, users can seamlessly iterate over a sequence of interest and verify whether the ORFI is contained within the sequence.
23+
24+
```julia
25+
ORFI{4,NaiveFinder}("seq", 1, 33, STRAND_POS, 1, convert(LongSubSeq, dna"ATGATGCATGCATGCATGCTAGTAACTAGCTAG"), NamedTuple())
26+
```
27+
28+
!!! warning
29+
It is still possible to create an `ORFI` and pass it to a sequence that does not necessarily contain an actual open reading frame. This will be addressed in future versions of the package. But the benefit of having it is that it will retrieve the corresponding subsequence of the sequence in a convinient way (5' to 3') regardless of the strand.
30+

0 commit comments

Comments
 (0)