Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I convert peptide sequence into binary code
    primarykey
    data
    text
    <pre><code>bin_dict = { 'A':'10000000000000000000', 'C':'01000000000000000000', 'D':'00100000000000000000', 'E':'00010000000000000000', 'F':'00001000000000000000', 'G':'00000100000000000000', 'H':'00000010000000000000', 'I':'00000001000000000000', 'K':'00000000100000000000', 'L':'00000000010000000000', 'M':'00000000001000000000', 'N':'00000000000100000000', 'P':'00000000000010000000', 'Q':'00000000000001000000', 'R':'00000000000000100000', 'S':'00000000000000010000', 'T':'00000000000000001000', 'V':'00000000000000000100', 'W':'00000000000000000010', 'Y':'00000000000000000001' } seq1="ACDE" bin_string='' svm_string='' for letter in seq: code = bin_dict[letter] print code </code></pre> <p>out put of this code is coming out like this </p> <pre><code>10000000000000000000 01000000000000000000 00100000000000000000 00010000000000000000 </code></pre> <p>My first question has been solved I got the output in desired manner, AS @goncalopp suggested I am trying to reintroduce my Qtn for better understanding.</p> <pre><code> Fig 1. </code></pre> <p>Step first: Seq = ACDE </p> <p>Step two: through this binary code position of int "1" would be calculated as given below </p> <pre><code> 10000000000000000000010000000000000000000010000000000000000000010000000000000000 | | | | 1:1 1:22 1:42 1:58 </code></pre> <p>Step three: calculated positions </p> <pre><code> 1:1 1:22 1:42 1:58 </code></pre> <p>Step four:</p> <pre><code> Ultimate output should be a text file having code only 1:1 1:22 1:42 1:58 to represent the string ACDE </code></pre> <p>now please suggest me what would be the python code for this.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload