Class: BioInterchange::FALDO
- Inherits:
-
Object
- Object
- BioInterchange::FALDO
- Defined in:
- lib/biointerchange/faldo.rb
Class Method Summary collapse
-
.after ⇒ Object
This predicate is used when you want to describe a non-inclusive range.
-
.BagOfRegions ⇒ Object
Used to describe a location that consists out of a number of Regions but where the order is not known.
-
.before ⇒ Object
This used to indicate that the feature is found before the exact position.
-
.begin ⇒ Object
The inclusive begin position of a position.
-
.Both_strands ⇒ Object
The ‘both strands position’ means that the region spans both strands instead of one.
-
.CollectionOfRegions ⇒ Object
Sometimes a location of a feature is defined by a collection of regions e.g.
-
.end ⇒ Object
The inclusive end of the position.
-
.Exact_position ⇒ Object
Use when you exactly know the position.
-
.Fuzzy_position ⇒ Object
Use this class to indicate that you lack exact position data.
-
.has_parent?(uri, parent) ⇒ Boolean
Recursively tries to determine the parent for a given URI.
-
.In_between_positions ⇒ Object
This denotes that a feature is in between two other positions that are both known exactly and next to each other.
-
.Indeterminate_position_within_a_range ⇒ Object
Use when you have an idea of the range in which you can find the position, but you cannot be sure about the exact position.
-
.is_class?(uri) ⇒ Boolean
Determines whether the given URI is a class.
-
.is_datatype_property?(uri) ⇒ Boolean
Determines whether the given URI is a datatype property.
-
.is_named_individual?(uri) ⇒ Boolean
Determines whether the given URI is a named individual.
-
.is_object_property?(uri) ⇒ Boolean
Determines whether the given URI is an object property.
-
.ListOfRegions ⇒ Object
As an ordered list of regions (but the list might not be complete) (biohackathon.org/resource/faldo#ListOfRegions).
-
.location ⇒ Object
This is the link between the concept whose location you are annotating the and its range or position.
-
.Negative_strand ⇒ Object
The position is on the reverse (complement, 3’ to 5’) strand of the sequence.
-
.One_of_positions ⇒ Object
The position must be one of the more detailed positions listed by the location predicate.
-
.Position ⇒ Object
Superclass to group the general concept of a position on a sequence.
-
.position ⇒ Object
A position on the first amino acid or nucleotide of a sequence has the value 1, i.e.
-
.Positive_strand ⇒ Object
The position is on the forward (positive, 5’ to 3’) strand.
-
.reference ⇒ Object
The reference is the resource that determines where the position value offsets into.
-
.Region ⇒ Object
A region describes a length of sequence – with a start position and end position – that represents a feature on a Sequence.
-
.Stranded_position ⇒ Object
Part of the coordinate system denoting on which strand the feature can be found.
-
.with_parent(uris, parent) ⇒ Object
Returns only those URIs that fall under a designated parent URI.
Class Method Details
.after ⇒ Object
This predicate is used when you want to describe a non-inclusive range. Only used in the in between position to say it is after a nucleotide, but before the next one. (biohackathon.org/resource/faldo#after)
68 69 70 |
# File 'lib/biointerchange/faldo.rb', line 68 def self.after return RDF::URI.new('http://biohackathon.org/resource/faldo#after') end |
.BagOfRegions ⇒ Object
Used to describe a location that consists out of a number of Regions but where the order is not known. e.g. the odly named order keyword in a INSDC fle. (biohackathon.org/resource/faldo#BagOfRegions)
8 9 10 |
# File 'lib/biointerchange/faldo.rb', line 8 def self.BagOfRegions return RDF::URI.new('http://biohackathon.org/resource/faldo#BagOfRegions') end |
.before ⇒ Object
This used to indicate that the feature is found before the exact position. Use to indicate, for example, a cleavage site. The cleavage happens between two amino acids before one and after the other. (biohackathon.org/resource/faldo#before)
62 63 64 |
# File 'lib/biointerchange/faldo.rb', line 62 def self.before return RDF::URI.new('http://biohackathon.org/resource/faldo#before') end |
.begin ⇒ Object
The inclusive begin position of a position. Also known as start. (biohackathon.org/resource/faldo#begin)
92 93 94 |
# File 'lib/biointerchange/faldo.rb', line 92 def self.begin return RDF::URI.new('http://biohackathon.org/resource/faldo#begin') end |
.Both_strands ⇒ Object
The ‘both strands position’ means that the region spans both strands instead of one. In GFF3 displayed as 0. This does not mean that the position is one or the other strand, but that is best described as being on both. (biohackathon.org/resource/faldo#BothStrandsPosition)
32 33 34 |
# File 'lib/biointerchange/faldo.rb', line 32 def self.Both_strands return RDF::URI.new('http://biohackathon.org/resource/faldo#BothStrandsPosition') end |
.CollectionOfRegions ⇒ Object
Sometimes a location of a feature is defined by a collection of regions e.g. INSDC join and order. One should always try to model the semantics more accuratly these are fallback options to encode legacy data. (biohackathon.org/resource/faldo#CollectionOfRegions)
14 15 16 |
# File 'lib/biointerchange/faldo.rb', line 14 def self.CollectionOfRegions return RDF::URI.new('http://biohackathon.org/resource/faldo#CollectionOfRegions') end |
.end ⇒ Object
The inclusive end of the position. (biohackathon.org/resource/faldo#end)
98 99 100 |
# File 'lib/biointerchange/faldo.rb', line 98 def self.end return RDF::URI.new('http://biohackathon.org/resource/faldo#end') end |
.Exact_position ⇒ Object
Use when you exactly know the position. (biohackathon.org/resource/faldo#ExactPosition)
56 57 58 |
# File 'lib/biointerchange/faldo.rb', line 56 def self.Exact_position return RDF::URI.new('http://biohackathon.org/resource/faldo#ExactPosition') end |
.Fuzzy_position ⇒ Object
Use this class to indicate that you lack exact position data. (biohackathon.org/resource/faldo#FuzzyPosition)
86 87 88 |
# File 'lib/biointerchange/faldo.rb', line 86 def self.Fuzzy_position return RDF::URI.new('http://biohackathon.org/resource/faldo#FuzzyPosition') end |
.has_parent?(uri, parent) ⇒ Boolean
Recursively tries to determine the parent for a given URI.
uri
-
URI that is tested for whether it has the given parent URI.
parent
-
Parent URI.
235 236 237 238 239 240 241 242 243 |
# File 'lib/biointerchange/faldo.rb', line 235 def self.has_parent?(uri, parent) if @@parent_properties.has_key?(uri) then if @@parent_properties[uri] == parent then return true end return has_parent?(@@parent_properties[uri], parent) end return false end |
.In_between_positions ⇒ Object
This denotes that a feature is in between two other positions that are both known exactly and next to each other. An example is a restriction enzyme cutting site. The cut is after one nucleotide position and before another nucleotide position (hence, in between). (biohackathon.org/resource/faldo#InBetweenPosition)
44 45 46 |
# File 'lib/biointerchange/faldo.rb', line 44 def self.In_between_positions return RDF::URI.new('http://biohackathon.org/resource/faldo#InBetweenPosition') end |
.Indeterminate_position_within_a_range ⇒ Object
Use when you have an idea of the range in which you can find the position, but you cannot be sure about the exact position. (biohackathon.org/resource/faldo#InRangePosition)
80 81 82 |
# File 'lib/biointerchange/faldo.rb', line 80 def self.Indeterminate_position_within_a_range return RDF::URI.new('http://biohackathon.org/resource/faldo#InRangePosition') end |
.is_class?(uri) ⇒ Boolean
Determines whether the given URI is a class.
uri
-
URI that is tested for being a class
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/biointerchange/faldo.rb', line 170 def self.is_class?(uri) if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#BagOfRegions') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#CollectionOfRegions') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#ForwardStrandPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#StrandedPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#BothStrandsPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#ReverseStrandPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#InBetweenPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#Position') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#ExactPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#OneOfPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#InRangePosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#FuzzyPosition') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#Region') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#ListOfRegions') then return true end return false end |
.is_datatype_property?(uri) ⇒ Boolean
Determines whether the given URI is a datatype property.
uri
-
URI that is tested for being a datatype property
160 161 162 163 164 165 |
# File 'lib/biointerchange/faldo.rb', line 160 def self.is_datatype_property?(uri) if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#position') then return true end return false end |
.is_named_individual?(uri) ⇒ Boolean
Determines whether the given URI is a named individual.
uri
-
URI that is tested for being a named individual
219 220 221 |
# File 'lib/biointerchange/faldo.rb', line 219 def self.is_named_individual?(uri) return false end |
.is_object_property?(uri) ⇒ Boolean
Determines whether the given URI is an object property.
uri
-
URI that is tested for being an object property
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/biointerchange/faldo.rb', line 135 def self.is_object_property?(uri) if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#before') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#after') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#begin') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#end') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#reference') then return true end if uri == RDF::URI.new('http://biohackathon.org/resource/faldo#location') then return true end return false end |
.ListOfRegions ⇒ Object
As an ordered list of regions (but the list might not be complete) (biohackathon.org/resource/faldo#ListOfRegions)
122 123 124 |
# File 'lib/biointerchange/faldo.rb', line 122 def self.ListOfRegions return RDF::URI.new('http://biohackathon.org/resource/faldo#ListOfRegions') end |
.location ⇒ Object
This is the link between the concept whose location you are annotating the and its range or position. For example, when annotating the region that describes an exon, the exon would be the subject and the region would be the object of the triple or: ‘active site’ ‘location’ [is] ‘position 3’. (biohackathon.org/resource/faldo#location)
128 129 130 |
# File 'lib/biointerchange/faldo.rb', line 128 def self.location return RDF::URI.new('http://biohackathon.org/resource/faldo#location') end |
.Negative_strand ⇒ Object
The position is on the reverse (complement, 3’ to 5’) strand of the sequence. Shown as ‘-’ in GTF and GFF3. (biohackathon.org/resource/faldo#ReverseStrandPosition)
38 39 40 |
# File 'lib/biointerchange/faldo.rb', line 38 def self.Negative_strand return RDF::URI.new('http://biohackathon.org/resource/faldo#ReverseStrandPosition') end |
.One_of_positions ⇒ Object
The position must be one of the more detailed positions listed by the location predicate. (biohackathon.org/resource/faldo#OneOfPosition)
74 75 76 |
# File 'lib/biointerchange/faldo.rb', line 74 def self.One_of_positions return RDF::URI.new('http://biohackathon.org/resource/faldo#OneOfPosition') end |
.Position ⇒ Object
Superclass to group the general concept of a position on a sequence. The sequence is designated via the reference predicate. (biohackathon.org/resource/faldo#Position)
50 51 52 |
# File 'lib/biointerchange/faldo.rb', line 50 def self.Position return RDF::URI.new('http://biohackathon.org/resource/faldo#Position') end |
.position ⇒ Object
A position on the first amino acid or nucleotide of a sequence has the value 1, i.e. Python style array indexing as opposed to Java/C indexes. (biohackathon.org/resource/faldo#position)
110 111 112 |
# File 'lib/biointerchange/faldo.rb', line 110 def self.position return RDF::URI.new('http://biohackathon.org/resource/faldo#position') end |
.Positive_strand ⇒ Object
The position is on the forward (positive, 5’ to 3’) strand. Shown as a ‘+’ in GFF3 and GTF. (biohackathon.org/resource/faldo#ForwardStrandPosition)
20 21 22 |
# File 'lib/biointerchange/faldo.rb', line 20 def self.Positive_strand return RDF::URI.new('http://biohackathon.org/resource/faldo#ForwardStrandPosition') end |
.reference ⇒ Object
The reference is the resource that determines where the position value offsets into. For example, it points to a contig or a genome assembly. (biohackathon.org/resource/faldo#reference)
116 117 118 |
# File 'lib/biointerchange/faldo.rb', line 116 def self.reference return RDF::URI.new('http://biohackathon.org/resource/faldo#reference') end |
.Region ⇒ Object
A region describes a length of sequence – with a start position and end position – that represents a feature on a Sequence. i.e. a gene (biohackathon.org/resource/faldo#Region)
104 105 106 |
# File 'lib/biointerchange/faldo.rb', line 104 def self.Region return RDF::URI.new('http://biohackathon.org/resource/faldo#Region') end |
.Stranded_position ⇒ Object
Part of the coordinate system denoting on which strand the feature can be found. If you do not yet know which stand the feature is on, you should tag the position with just this class. If you know more you should use one of the subclasses. This means a region descibred with a ‘.’ in GFF3. A GFF3 unstranded position does not have this type in FALDO – those are just a ‘position’. (biohackathon.org/resource/faldo#StrandedPosition)
26 27 28 |
# File 'lib/biointerchange/faldo.rb', line 26 def self.Stranded_position return RDF::URI.new('http://biohackathon.org/resource/faldo#StrandedPosition') end |
.with_parent(uris, parent) ⇒ Object
Returns only those URIs that fall under a designated parent URI.
uris
-
Set of URIs that are tested whether they have the given parent URI.
parent
-
Parent URI.
227 228 229 |
# File 'lib/biointerchange/faldo.rb', line 227 def self.with_parent(uris, parent) return uris.select { |uri| has_parent?(uri, parent) } end |