Skip to content

Commit

Permalink
Added iscomplete()
Browse files Browse the repository at this point in the history
  • Loading branch information
kdyrhage committed Dec 10, 2019
1 parent d70ea7f commit 38153a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/GenomicAnnotations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using BioSequences
using GZip

export Chromosome, Gene, AbstractGene, GeneDataView, Locus
export readgbk, sequence, iscomplement, addgene!, pushproperty!, printgbk
export readgbk, sequence, iscomplement, iscomplete, addgene!, pushproperty!, printgbk
export feature, index, locus
export @genes

Expand Down
8 changes: 8 additions & 0 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ Return `true` if `locus(gene).compliment == '-'`, otherwise return `false`.
iscomplement(gene::AbstractGene) = locus(gene).strand == '-'


"""
iscomplete(gene)
Return `true` if `gene` is a complete gene, i.e. not a pseudo gene or partial.
"""
iscomplete(gene::AbstractGene) = !any(get(gene, :pseudo, false)) && !any(get(gene, :ribosomal_slippage, false)) && locus(gene).complete_right && locus(gene).complete_left


function appendstring(field, v)
s = ""
if v isa Bool
Expand Down

0 comments on commit 38153a4

Please sign in to comment.