Restriction Enzyme


Sample code :


/**
  * Here is some samples of how to use the functions
  * @param   RestrictionEnzymeInterface  $restrictionEnzymeManager
  * @param   SequenceInterface           $sequenceManager
  * @param   SequenceAlignmentInterface  $sequenceAlignmentManager
  * @return  Response
  * @throws  \Exception
  */
public function restrictionenzyme(
    RestrictionEnzymeInterface $restrictionEnzymeManager,
    SequenceInterface $sequenceManager,
    SequenceAlignmentInterface $sequenceAlignmentManager
) {
    $sequenceAlignmentManager->setFilename("data/fasta-2.txt");
    $sequenceAlignmentManager->setFormat("FASTA");
    $sequenceAlignmentManager->parseFile();
    $oSequence = $sequenceAlignmentManager->getSeqSet()->offsetGet(0);
    $oSequence->setMolType("DNA");
    $sequenceManager->setSequence($oSequence);
    $restrictionEnzymeManager->setSequenceManager($sequenceManager);
 
    // Gets the enzyme "AatI" properties
    $restrictionEnzymeManager->parseEnzyme('AatI', null, null, "inner");
    $oEnzymeParsed = $restrictionEnzymeManager->getEnzyme();
 
    // Cuts a DNA sequence into fragments using the restriction enzyme object - patpos group
    $sCutseq = $restrictionEnzymeManager->cutSeq();
    // Patposo group
    $sCutseq2 = $restrictionEnzymeManager->cutSeq('O');
 
    // Searching the database (api) of endonucleases for a particular restriction enzyme
    $aList = $restrictionEnzymeManager->findRestEn("AGGCCT"); // fetch pattern only
    $aList2 = $restrictionEnzymeManager->findRestEn("AGGCCT",3); // fetch pattern and cutpos
    $aList3 = $restrictionEnzymeManager->findRestEn(null,3); // fetch Cutpos
    $aList4 = $restrictionEnzymeManager->findRestEn(null,null, 6); // fetch Length
    $aList5 = $restrictionEnzymeManager->findRestEn(null,3, 6); // fetch Cutpos And Plen
 
    return $this->render('default/restrictionenzyme.html.twig',
        [
            "enzymeParsed"  => $oEnzymeParsed,
            "cutseq"        => $sCutseq,
            "cutseq2"       => $sCutseq2,
            "list"          => $aList,
            "list2"         => $aList2,
            "list3"         => $aList3,
            "list4"         => $aList4,
            "list5"         => $aList5
        ]
    );
}

Result :

Gets the enzyme "AatI" properties

Amelaye\BioPHP\Domain\Sequence\Entity\Enzyme {#502
  -name: "AatI"
  -pattern: "AGGCCT"
  -cutpos: 3
  -length: 6
}

Cuts a DNA sequence into fragments using the restriction enzyme object (patpos group)

array:2 [
  0 => "GGCAGATTCCCCCTAGACCCGCCCGCACCATGGTCAGGCATGCCCCTCCTCATCGCTGGGCACAGCCCAGAGGGTATAAACAGTGCTGGAGGCTGGCGGGGCAGGCCAGCTGAGTCCTGAGCAGCAGCCCAGCGCAGCCACCGAGACACCATGAGAGCCCTCACACTCCTCGCCCTATTGGCCCTGGCCGCACTTTGCATCGCTGGCCAGGCAGGTGAGTGCCCCCACCTCCCCTCAGGCCGCATTGCAGTGGGGGCTGAGAGGAGGAAGCACCATGGCCCACCTCTTCTCACCCCTTTGGCTGGCAGTCCCTTTGCAGTCTAACCACCTTGTTGCAGGCTCAATCCATTTGCCCCAGCTCTGCCCTTGCAGAGGGAGAGGAGGGAAGAGCAAGCTGCCCGAGACGCAGGGGAAGGAGGATGAGGGCCCTGGGGATGAGCTGGGGTGAACCAGGCTCCCTTTCCTTTGCAGGTGCGAAGCCCAGCGGTGCAGAGTCCAGCAAAGGTGCAGGTATGAGGATGGACCTGATGGGTTCCTGGACCCTCCCCTCTCACCCTGGTCCCTCAGTCTCATTCCCCCACTCCTGCCACCTCCTGTCTGGCCATCAGGAAGGCCAGCCTGCTCCCCACCTGATCCTCCCAAACCCAGAGCCACCTGATGCCTGCCCCTCTGCTCCACAGCCTTTGTGTCCAAGCAGGAGGGCAGCGAGGTAGTGAAGAGACCCAGGCGCTACCTGTATCAATGGCTGGGGTGAGAGAAAAGGCAGAGCTGGGCCAAGGCCCTGCCTCTCCGGGATGGTCTGTGGGGGAGCTGCAGCAGGGAGTGGCCTCTCTGGGTTGTGGTGGGGGTACAGGCAGCCTGCCCTGGTGGGCACCCTGGAGCCCCATGTGTAGGGAGAGGAGGGATGGGCATTTTGCACGGGGGCTGATGCCACCACGTCGGGTGTCTCAGAGCCCCAGTCCCCTACCCGGATCCCCTGGAGCCCAGGAGGGAGGTGTGTGAGCTCAATCCGGACTGTGACGAGTTGGCTGACCACATCGGCTTTCAGGAGG"
  1 => "CCTATCGGCGCTTCTACGGCCCGGTCTAGGGTGTCGCTCTGCTGGCCTGGCCGGCAACCCCAGTTCTGCTCCTCTCCAGGCACCCTTCTTTCCTCTTCCCCTTGCCCTTGCCCTGACCTCCCAGCCCTATGGATGTGGGGTCCCCATCATCCCAGCTGCTCCCAAATAAACTCCAGAAG"
]

Cuts a DNA sequence into fragments using the restriction enzyme object (patposo group)

array:2 [
  0 => "GGCAGATTCCCCCTAGACCCGCCCGCACCATGGTCAGGCATGCCCCTCCTCATCGCTGGGCACAGCCCAGAGGGTATAAACAGTGCTGGAGGCTGGCGGGGCAGGCCAGCTGAGTCCTGAGCAGCAGCCCAGCGCAGCCACCGAGACACCATGAGAGCCCTCACACTCCTCGCCCTATTGGCCCTGGCCGCACTTTGCATCGCTGGCCAGGCAGGTGAGTGCCCCCACCTCCCCTCAGGCCGCATTGCAGTGGGGGCTGAGAGGAGGAAGCACCATGGCCCACCTCTTCTCACCCCTTTGGCTGGCAGTCCCTTTGCAGTCTAACCACCTTGTTGCAGGCTCAATCCATTTGCCCCAGCTCTGCCCTTGCAGAGGGAGAGGAGGGAAGAGCAAGCTGCCCGAGACGCAGGGGAAGGAGGATGAGGGCCCTGGGGATGAGCTGGGGTGAACCAGGCTCCCTTTCCTTTGCAGGTGCGAAGCCCAGCGGTGCAGAGTCCAGCAAAGGTGCAGGTATGAGGATGGACCTGATGGGTTCCTGGACCCTCCCCTCTCACCCTGGTCCCTCAGTCTCATTCCCCCACTCCTGCCACCTCCTGTCTGGCCATCAGGAAGGCCAGCCTGCTCCCCACCTGATCCTCCCAAACCCAGAGCCACCTGATGCCTGCCCCTCTGCTCCACAGCCTTTGTGTCCAAGCAGGAGGGCAGCGAGGTAGTGAAGAGACCCAGGCGCTACCTGTATCAATGGCTGGGGTGAGAGAAAAGGCAGAGCTGGGCCAAGGCCCTGCCTCTCCGGGATGGTCTGTGGGGGAGCTGCAGCAGGGAGTGGCCTCTCTGGGTTGTGGTGGGGGTACAGGCAGCCTGCCCTGGTGGGCACCCTGGAGCCCCATGTGTAGGGAGAGGAGGGATGGGCATTTTGCACGGGGGCTGATGCCACCACGTCGGGTGTCTCAGAGCCCCAGTCCCCTACCCGGATCCCCTGGAGCCCAGGAGGGAGGTGTGTGAGCTCAATCCGGACTGTGACGAGTTGGCTGACCACATCGGCTTTCAGGAGG"
  1 => "CCTATCGGCGCTTCTACGGCCCGGTCTAGGGTGTCGCTCTGCTGGCCTGGCCGGCAACCCCAGTTCTGCTCCTCTCCAGGCACCCTTCTTTCCTCTTCCCCTTGCCCTTGCCCTGACCTCCCAGCCCTATGGATGTGGGGTCCCCATCATCCCAGCTGCTCCCAAATAAACTCCAGAAG"
]

Searching our database of endonucleases for a particular restriction enzyme
Fetch pattern "AGGCCT" only

array:1 [
  0 => "AatI"
]

Fetch pattern "AGGCCT" & cutpos 3

array:1 [
  0 => "AatI"
]

Fetch cutpos 3 only

array:33 [
  0 => "AatI"
  1 => "Acc16I"
  2 => "AccBSI"
  3 => "AcvI"
  4 => "AfeI"
  5 => "AgSI"
  6 => "AjiI"
  7 => "AspLEI"
  8 => "AssI"
  9 => "BalI"
  10 => "BmiI"
  11 => "BsaAI"
  12 => "Bsp68I"
  13 => "BssNAI"
  14 => "Bst4CI"
  15 => "BstC8I"
  16 => "BstKTI"
  17 => "BstSNI"
  18 => "DraI"
  19 => "Ecl136II"
  20 => "Eco32I"
  21 => "EgeI"
  22 => "HincII"
  23 => "HpaI"
  24 => "Hpy166II"
  25 => "Hpy188I"
  26 => "MspA1I"
  27 => "NaeI"
  28 => "PsiI"
  29 => "PvuII"
  30 => "SmaI"
  31 => "SspI"
  32 => "ZraI"
]

Fetch length 6 only

array:102 [
  0 => "AatI"
  1 => "AatII"
  2 => "Acc16I"
  3 => "Acc65I"
  4 => "AccB1I"
  5 => "AccBSI"
  6 => "AccI"
  7 => "AccIII"
  8 => "AclI"
  9 => "AcoI"
  10 => "AcsI"
  11 => "AcvI"
  12 => "AcyI"
  13 => "AfeI"
  14 => "AflII"
  15 => "AflIII"
  16 => "AgeI"
  17 => "AhlI"
  18 => "AjiI"
  19 => "Alw21I"
  20 => "Alw44I"
  21 => "Ama87I"
  22 => "ApaI"
  23 => "AseI"
  24 => "AspA2I"
  25 => "AssI"
  26 => "AsuII"
  27 => "AsuNHI"
  28 => "BaeGI"
  29 => "BalI"
  30 => "BamHI"
  31 => "BanII"
  32 => "BanIII"
  33 => "BauI"
  34 => "BbeI"
  35 => "BbuI"
  36 => "BclI"
  37 => "BfmI"
  38 => "BfoI"
  39 => "BglII"
  40 => "BmiI"
  41 => "BmtI"
  42 => "BpvUI"
  43 => "BsaAI"
  44 => "BsaJI"
  45 => "BsaWI"
  46 => "Bse118I"
  47 => "BsePI"
  48 => "BseX3I"
  49 => "BseYI"
  50 => "Bsh1285I"
  51 => "BsiWI"
  52 => "Bsp120I"
  53 => "Bsp1286I"
  54 => "Bsp1407I"
  55 => "Bsp19I"
  56 => "Bsp68I"
  57 => "BspHI"
  58 => "BspLU11I"
  59 => "BspMAI"
  60 => "BssNAI"
  61 => "BssT1I"
  62 => "BstC8I"
  63 => "BstDSI"
  64 => "BstNSI"
  65 => "BstSNI"
  66 => "BstX2I"
  67 => "Cfr42I"
  68 => "Cfr9I"
  69 => "CfrI"
  70 => "DinI"
  71 => "DraI"
  72 => "Ecl136II"
  73 => "Eco32I"
  74 => "EcoRI"
  75 => "EcoT22I"
  76 => "EgeI"
  77 => "FauNDI"
  78 => "GsaI"
  79 => "HincII"
  80 => "HindIII"
  81 => "HpaI"
  82 => "Hpy166II"
  83 => "Hpy188III"
  84 => "KasI"
  85 => "KpnI"
  86 => "KroI"
  87 => "MfeI"
  88 => "MluI"
  89 => "MspA1I"
  90 => "NaeI"
  91 => "PaeR7I"
  92 => "PsiI"
  93 => "Psp124BI"
  94 => "PvuII"
  95 => "SalI"
  96 => "SmaI"
  97 => "SmlI"
  98 => "SspI"
  99 => "TatI"
  100 => "XbaI"
  101 => "ZraI"
]

Fetch length 6 and cutpos 3 (no results)

[]