From 5ca0a4d817f750684f07d32c12f1bf3cc9dd364b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilo=20Garc=C3=ADa?= Date: Tue, 30 Jul 2024 09:35:00 -0500 Subject: [PATCH] Housekeep and clean files --- src/types.jl | 45 +++++++++++++++++++++------------------------ src/utils.jl | 6 +++--- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/types.jl b/src/types.jl index 5518f36..a535cad 100644 --- a/src/types.jl +++ b/src/types.jl @@ -1,27 +1,9 @@ import GenomicFeatures: first, last, length, strand, groupname, metadata -export RBS, ORF +export ORF export features, sequence, source export groupname, finder, frame, score, strand, STRAND_BOTH, STRAND_NEG, STRAND_POS, STRAND_NA -# #### Ribosome Binding Site (RBS) struct #### - -struct RBS - motif::BioRegex{DNA} - offset::UnitRange{Int64} # offset - score::Float64 - - function RBS(motif::BioRegex{DNA}, offset::UnitRange{Int64}, score::Float64) - return new(motif, offset, score) - end - # rbsinst = RBS(biore"RRR"dna, 3:4, 1.0) -end - -# seq[orf.first-bin01.offset.start:orf.first-1] - -# motifs = [dna"GGA", dna"GAG", dna"AGG"] - -####### End of RBS struct ####### """ struct ORF{N,F} <: GenomicFeatures.AbstractGenomicInterval{F} @@ -183,10 +165,6 @@ function frame(i::ORF{N,F}) where {N,F} return i.frame end -function score(i::ORF{N,F}) where {N,F} - return i.features[:score] -end - function strand(i::ORF{N,F}) where {N,F} return i.strand end @@ -211,4 +189,23 @@ end # orf::ORF # coding::Bool # join::Bool -# end \ No newline at end of file +# end + +# #### Ribosome Binding Site (RBS) struct #### + +# struct RBS +# motif::BioRegex{DNA} +# offset::UnitRange{Int64} # offset +# score::Float64 + +# function RBS(motif::BioRegex{DNA}, offset::UnitRange{Int64}, score::Float64) +# return new(motif, offset, score) +# end +# # rbsinst = RBS(biore"RRR"dna, 3:4, 1.0) +# end + +# seq[orf.first-bin01.offset.start:orf.first-1] + +# motifs = [dna"GGA", dna"GAG", dna"AGG"] + +####### End of RBS struct ####### \ No newline at end of file diff --git a/src/utils.jl b/src/utils.jl index d46cfed..5aab583 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,6 +1,6 @@ -export hasprematurestop, _varname, _varsymbol, _orfseq #fasta2bioseq +export _hasprematurestop, _varname, _varsymbol, _orfseq #fasta2bioseq -# General purposes methods supporting main functions +# General purposes private methods supporting main functions """ hasprematurestop(seq::LongNucOrView{4})::Bool @@ -9,7 +9,7 @@ Determine whether the `sequence` of type `LongSequence{DNAAlphabet{4}}` contains Returns a boolean indicating whether the `sequence` has more than one stop codon. """ -function hasprematurestop(seq::NucleicSeqOrView{DNAAlphabet{N}})::Bool where {N} +function _hasprematurestop(seq::NucleicSeqOrView{DNAAlphabet{N}})::Bool where {N} stopcodons = [LongDNA{4}("TAA"), LongDNA{4}("TAG"), LongDNA{4}("TGA")] # Create a set of stop codons length(seq) % 3 == 0 || error("The sequence is not divisible by 3")