Simple sequence analysis

This code finds mirrors into a sequence string. It takes as parameter one start and one end.

1

Starting code

This is the PHP code used by this example.

1
2
3
4
5
6
7
8
9
10
11
12
public function sequenceanalysis(SequenceInterface $sequenceManager)
{
    $oSequence = new Sequence();
    $oSequence->setSequence("AGGGAATTAAGTAAATGGTAGTGG");
    $sequenceManager->setSequence($oSequence);
    
    $aMirrors = $sequenceManager->findMirror(null, 6, 8, "E");
    
    return $this->render('default/sequenceanalysis.html.twig',
        array('mirrors' => $aMirrors)
    );
}
2

Result

Result returned by BioPHP for the demonstration data.

Mirrors found
  • 6 :
    • 0 :
      • 0 : AATTAA
      • 1 : 4
    • 1 :
      • 0 : ATGGTA
      • 1 : 14
  • 8 :
    • 0 :
      • 0 : GAATTAAG
      • 1 : 3

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.