You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/orftype.md
+26-7Lines changed: 26 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
+
## The ORFI Type
1
2
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:
3
+
The `ORFI` type in `GeneFinder` is designed to enforce stricter validation, preventing the creation of incompatible instances. This ensures greater stability and consistency when working with open reading frames (ORFs). For example, attempting to create an `ORFI` with invalid parameters will result in an error:
5
4
6
5
```julia
7
6
ORFI{4,NaiveFinder}(1:10, '+', 4) # Or any F <: GeneFinderMethod
@@ -18,13 +17,33 @@ Stacktrace:
18
17
[1] top-level scope
19
18
@ REPL[21]:1
20
19
```
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.
20
+
21
+
### Validation Rules
22
+
23
+
The `ORFI` type enforces the following rules:
24
+
- The strand must be either `+` or `-`. Any other value will trigger an error.
25
+
- Parameters must align with the expected structure of an open reading frame.
26
+
27
+
These safeguards help prevent the creation of invalid ORFs, making the system more robust and easier to extend.
28
+
29
+
### Example Usage
30
+
31
+
Here is an example of creating a valid `ORFI` instance:
This instance can then be used to iterate over a sequence of interest and verify whether the `ORFI` is contained within the sequence.
46
+
28
47
!!! 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.
48
+
While the `ORFI` type ensures stricter validation, it is still possible to create an `ORFI` that does not correspond to an actual open reading frame in the sequence. This limitation will be addressed in future versions of the package. However, the current implementation provides the benefit of retrieving the corresponding subsequence in a convenient 5' to 3' orientation, regardless of the strand.
0 commit comments