class BioInterchange::FALDO

Public Class Methods

BagOfRegions() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 8
def self.BagOfRegions
  return RDF::URI.new('http://biohackathon.org/resource/faldo#BagOfRegions')
end
Both_strands() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 32
def self.Both_strands
  return RDF::URI.new('http://biohackathon.org/resource/faldo#BothStrandsPosition')
end
CollectionOfRegions() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 14
def self.CollectionOfRegions
  return RDF::URI.new('http://biohackathon.org/resource/faldo#CollectionOfRegions')
end
Exact_position() click to toggle source

Use when you exactly know the position. (biohackathon.org/resource/faldo#ExactPosition)

# File lib/biointerchange/faldo.rb, line 56
def self.Exact_position
  return RDF::URI.new('http://biohackathon.org/resource/faldo#ExactPosition')
end
Fuzzy_position() click to toggle source

Use this class to indicate that you lack exact position data. (biohackathon.org/resource/faldo#FuzzyPosition)

# File lib/biointerchange/faldo.rb, line 86
def self.Fuzzy_position
  return RDF::URI.new('http://biohackathon.org/resource/faldo#FuzzyPosition')
end
In_between_positions() click to toggle source

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)

# 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() click to toggle source

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)

# 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
ListOfRegions() click to toggle source

As an ordered list of regions (but the list might not be complete) (biohackathon.org/resource/faldo#ListOfRegions)

# File lib/biointerchange/faldo.rb, line 122
def self.ListOfRegions
  return RDF::URI.new('http://biohackathon.org/resource/faldo#ListOfRegions')
end
Negative_strand() click to toggle source

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)

# 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() click to toggle source

The position must be one of the more detailed positions listed by the location predicate. (biohackathon.org/resource/faldo#OneOfPosition)

# File lib/biointerchange/faldo.rb, line 74
def self.One_of_positions
  return RDF::URI.new('http://biohackathon.org/resource/faldo#OneOfPosition')
end
Position() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 50
def self.Position
  return RDF::URI.new('http://biohackathon.org/resource/faldo#Position')
end
Positive_strand() click to toggle source

The position is on the forward (positive, 5’ to 3’) strand. Shown as a ‘+’ in GFF3 and GTF. (biohackathon.org/resource/faldo#ForwardStrandPosition)

# File lib/biointerchange/faldo.rb, line 20
def self.Positive_strand
  return RDF::URI.new('http://biohackathon.org/resource/faldo#ForwardStrandPosition')
end
Region() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 104
def self.Region
  return RDF::URI.new('http://biohackathon.org/resource/faldo#Region')
end
Stranded_position() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 26
def self.Stranded_position
  return RDF::URI.new('http://biohackathon.org/resource/faldo#StrandedPosition')
end
after() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 68
def self.after
  return RDF::URI.new('http://biohackathon.org/resource/faldo#after')
end
before() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 62
def self.before
  return RDF::URI.new('http://biohackathon.org/resource/faldo#before')
end
begin() click to toggle source

The inclusive begin position of a position. Also known as start. (biohackathon.org/resource/faldo#begin)

# File lib/biointerchange/faldo.rb, line 92
def self.begin
  return RDF::URI.new('http://biohackathon.org/resource/faldo#begin')
end
end() click to toggle source

The inclusive end of the position. (biohackathon.org/resource/faldo#end)

# File lib/biointerchange/faldo.rb, line 98
def self.end
  return RDF::URI.new('http://biohackathon.org/resource/faldo#end')
end
has_parent?(uri, parent) click to toggle source

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.

# 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
is_class?(uri) click to toggle source

Determines whether the given URI is a class.

uri

URI that is tested for being a class

# 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) click to toggle source

Determines whether the given URI is a datatype property.

uri

URI that is tested for being a datatype property

# 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) click to toggle source

Determines whether the given URI is a named individual.

uri

URI that is tested for being a named individual

# File lib/biointerchange/faldo.rb, line 219
def self.is_named_individual?(uri)
  return false
end
is_object_property?(uri) click to toggle source

Determines whether the given URI is an object property.

uri

URI that is tested for being an object property

# 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
location() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 128
def self.location
  return RDF::URI.new('http://biohackathon.org/resource/faldo#location')
end
position() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 110
def self.position
  return RDF::URI.new('http://biohackathon.org/resource/faldo#position')
end
reference() click to toggle source

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)

# File lib/biointerchange/faldo.rb, line 116
def self.reference
  return RDF::URI.new('http://biohackathon.org/resource/faldo#reference')
end
with_parent(uris, parent) click to toggle source

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.

# File lib/biointerchange/faldo.rb, line 227
def self.with_parent(uris, parent)
  return uris.select { |uri| has_parent?(uri, parent) }
end