/** * Here is some samples of how to use the functions * @param SequenceAlignmentInterface $sequenceAlignmentManager * @param SequenceInterface $sequenceManager * @return Response * @throws \Exception */ public function playwithsequencies( SequenceAlignmentInterface $sequenceAlignmentManager, SequenceInterface $sequenceManager ) { $sequenceAlignmentManager->setFilename("data/fasta-2.txt"); $sequenceAlignmentManager->setFormat("FASTA"); $sequenceAlignmentManager->parseFile(); // We take this sequence as example $oSequence = $sequenceAlignmentManager->getSeqSet()->offsetGet(0); $oSequence->setMolType("DNA"); $sequenceManager->setSequence($oSequence); // Complement of the demo sequence $aComplement = $sequenceManager->complement("DNA"); // Shows halfstring for pattern "GATTAG" $sHalfStr = $sequenceManager->halfSequence(0, "GATTAG"); // Returns the sequence located between two palindromic halves of a palindromic string //$sBridge = $sequenceManager->getBridge("ATGcacgtcCAT"); //dump($sBridge); // Returns the expansion of a nucleic acid sequence $sExpandNa = $sequenceManager->expandNa("GATTAGSW"); // Computes the molecular weight of a particular sequence. $sMolWt = $sequenceManager->molwt(); // Creates a new sequence object with a sequence that is a substring of another. $sCoupe = $sequenceManager->subSeq(2,100); // Array where each key is a substring matching a given pattern $aPatpos = $sequenceManager->patPos("TTT"); // Similar to patPos() except that this allows for overlapping patterns. $aPatPoso = $sequenceManager->patPoso("TTT"); // Returns the frequency of a given symbol in the sequence property string $iSymfreq = $sequenceManager->symFreq("A"); // Returns the n-th codon in a sequence, with numbering starting at 0 $sCodon = $sequenceManager->getCodon(3); // Translates a particular DNA sequence into its protein product sequence $sTranslate = $sequenceManager->translate(); // Translates an amino acid sequence into its equivalent "charge sequence". $sCharge = $sequenceManager->charge("GAVLIFYWKRH"); // Returns a string of symbols from an 8-letter alphabet: A, L, M, R, C, H, I, S. $sChemicalGroup = $sequenceManager->chemicalGroup("GAVLIFYWKRH"); // Returns a two-dimensional array containing palindromic substrings found in a sequence $aTestPalindrome = $sequenceManager->findPalindrome(null, 2, 2); return $this->render('default/playwithsequencies.html.twig', [ 'complement' => $aComplement, 'halfStr' => $sHalfStr, 'expandNa' => $sExpandNa, 'molWt' => $sMolWt, 'coupe' => $sCoupe, 'patpos' => $aPatpos, 'patposo' => $aPatPoso, 'symfreq' => $iSymfreq, 'codon' => $sCodon, 'translate' => $sTranslate, 'charge' => $sCharge, 'chemicalGroup' => $sChemicalGroup, 'testPalindrome1' => $aTestPalindrome ] ); }
DNA Complement :
Returns the expansion of a nucleic acid sequence ("GATTAGSW")
Shows halfstring for pattern "GATTAG"
Computes the molecular weight of a particular sequence.
Creates a new sequence object with a sequence that is a substring of another
Array where each key is a substring matching a given pattern ("TTT")
Similar to patPos() except that this allows for overlapping patterns. ("TTT")
Returns the frequency of a given symbol in the sequence property string ("A")
Returns the 3rd codon in a sequence, with numbering starting at 0
Translates a particular DNA sequence into its protein product sequence
Translates an amino acid sequence ("GAVLIFYWKRH") into its equivalent "charge sequence"
Returns a string of symbols from an 8-letter alphabet: A, L, M, R, C, H, I, S
Returns a two-dimensional array containing palindromic substrings found in a sequence