PIR: Protein Information Resource record

1

Starting code

This is the PHP code used by this example.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public function parsePirRecord()
{
    $parser = DatabaseParserFactory::createParser("PIR");
    $parser->parseDataFile(file($this->getParameter('kernel.project_dir') . '/public/data/sample.pir'));
 
    return $this->render('default/parsePirRecord.html.twig',
        [
            'entryName'  => $parser->getEntryName(),
            'entryType'  => $parser->getEntryType(),
            'recordTitle'=> $parser->getTitle(),
            'accessions' => $parser->getAccessions(),
            'organism'   => $parser->getOrganism(),
            'species'    => $parser->getSpecies(),
            'createDate' => $parser->getCreateDate(),
            'length'     => $parser->getLength(),
            'molwt'      => $parser->getMolwt(),
            'checksum'   => $parser->getChecksum(),
            'keywords'   => $parser->getKeywords(),
        ]
    );
}
2

Result

Result returned by BioPHP for the demonstration data.

Parsed record
Entry nameRHTDTO
Entry typecomplete
TitleR-phycoerythrin alpha-1 chain - red alga (Gastroclonium coulteri)
Accessions
  • 0 : PT0622
  • 1 : PT0680
  • 2 : PT0582
  • 3 : PT0673
Organismdomestic rabbit
SpeciesOryctolagus cuniculus
Create date15-Jun-2001
Length3
Mol. weight380
Checksum465
Keywords
  • 0 : amidated carboxyl end
  • 1 : cutaneous gland
  • 2 : hormone
  • 3 : pyroglutamic acid

The code above is the one actually executed by this page. Find the other examples in the left-hand column, or the tools in BioTools.