PHP code example of amelaye / biotools
1. Go to this page and download the library: Download amelaye/biotools library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
amelaye / biotools example snippets
return [
// ...
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
Amelaye\BioPHP\AmelayeBioPHPBundle::class => ['all' => true],
Amelaye\BioTools\AmelayeBioToolsBundle::class => ['all' => true],
];
use Amelaye\BioTools\Form\FindPalindromesType;
use Amelaye\BioTools\Service\FindPalindromeManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class MinitoolsController extends AbstractController
{
#[Route('/minitools/find-palindromes', name: 'find_palindromes')]
public function findPalindromes(Request $request, FindPalindromeManager $manager): Response
{
$palindromes = [];
$form = $this->createForm(FindPalindromesType::class);
if ($request->isMethod('POST') && $form->handleRequest($request)->isValid()) {
$data = $form->getData();
$palindromes = $manager->findPalindromicSeqs($data['seq'], $data['min'], $data['max']);
}
return $this->render('find_palindromes.html.twig', [
'form' => $form->createView(),
'palindromes' => $palindromes,
]);
}
}
$sFile = $chaosGameRepresentationManager->createCGRImage($sName, $sSequence, 300);
// /var/www/created_files/CGR_9f3a1c0e.svg
$aResult = $chaosGameRepresentationManager->createFCGRImage(...);
// ['map' => [...image map coordinates...], 'file' => '.../FCGR_1b7d4a22.svg']