PHPackages                             stevenrombauts/genes-component - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. stevenrombauts/genes-component

ActiveNooku-component

stevenrombauts/genes-component
==============================

01PHP

Since Sep 9Pushed 11y ago1 watchersCompare

[ Source](https://github.com/stevenrombauts/genes-component)[ Packagist](https://packagist.org/packages/stevenrombauts/genes-component)[ RSS](/packages/stevenrombauts-genes-component/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Genes Component
===============

[](#genes-component)

The Genes component is a reusable component for [Nooku Framework](http://www.nooku.org). This is an *example*!

By installing this component you can easily re-use the functionality its classes offer in your own components.

Installing
----------

[](#installing)

You can install this extension using Composer. Add the following requirements to your `composer.json` file in your Joomla application's root directory:

```
{
    "require": {
        "stevenrombauts/genes-component": "dev-master"
    },
    "minimum-stability": "dev"
}
```

Run `composer install` to take care of downloading and installing the package.

Examples
--------

[](#examples)

### Gene entity

[](#gene-entity)

Having your entities extend the `ComGenesModelEntityGene` class will automatically add support for translating the DNA sequence into a protein sequence. Or call it directly:

```
$sequence =  'C02H7.2',
     'title'      => 'npr-19',
     'sequence'   => $sequence
);

$entity = KOBjectManager::getInstance()->getObject('com://stevenrombauts/genes.model.entity.gene', array('data' => $data));

echo $entity->protein;
```

### Fasta filter

[](#fasta-filter)

You can use the [FASTA](https://en.wikipedia.org/wiki/FASTA_format) filter to validate and sanitize strings representings nucleotide sequences or peptide sequences.

Example:

```
$filter = KObjectManager::getInstance()->getObject('com://stevenrombauts/genes.filter.fasta');

$sequence =
