changeset 6:ea405d064794 draft

"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit e8c8198105af7eab636fb2405e5ff335539ca14b"
author jay
date Sun, 31 Jan 2021 02:54:08 +0000
parents 87b621620d52
children e64307e1733b
files PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.xml
diffstat 2 files changed, 83 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Thu Jan 28 04:37:32 2021 +0000
+++ b/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Sun Jan 31 02:54:08 2021 +0000
@@ -129,6 +129,21 @@
             OutFasta.write(">sequence_"+str(i)+'\n')
             OutFasta.write(O+'\n')
 
+
+def MixedLibrary_seq(seqnum, centrosymmetric, centroasymmetric, helix, kinked, oblique, rand, randAMP, randAMPnoCM, OutFasta):
+
+    lib = MixedLibrary(int(seqnum), int(centrosymmetric), int(centroasymmetric), int(helix), int(kinked), int(oblique), int(rand), int(randAMP), int(randAMPnoCM))
+    lib.generate_sequences()
+    OutFasta = open(OutFasta, 'w')
+
+    OutPep = lib.sequences
+        
+    for i,O in enumerate(OutPep):
+        OutFasta.write(">sequence_"+str(i)+'\n')
+        OutFasta.write(O+'\n')
+
+
+
 if __name__=='__main__':
 
     parser = argparse.ArgumentParser(description='Deployment tool')
@@ -192,6 +207,19 @@
     Arc.add_argument("-y","--hyd_gra", default='False', help="Method to mutate the generated sequences to have a hydrophobic gradient by substituting the last third of the sequence amino acids to hydrophobic.")
     Arc.add_argument("-O", "--OutFasta", required=True, default=None, help="Output Fasta")
 
+    Mix = subparsers.add_parser('MixedLibrary')
+    Mix.add_argument("-s","--seq_num", required=True, default=None, help="number of sequences to be generated")
+    Mix.add_argument("-c","--centrosymmetric", required=False, default=1, help="ratio of symmetric centrosymmetric sequences in the library")
+    Mix.add_argument("-ca","--centroasymmetric", required=False, default=1, help="ratio of asymmetric centrosymmetric sequences in the library")
+    Mix.add_argument("-hl","--helix", required=False, default=1, help="ratio of asymmetric centrosymmetric sequences in the library")
+    Mix.add_argument("-k","--kinked", required=False, default=1,   help="ratio of asymmetric centrosymmetric sequences in the library")
+    Mix.add_argument("-o", "--oblique", required=False, default=1,  help=" ratio of oblique oriented amphipathic helical sequences in the library")
+    Mix.add_argument("-r", "--rand", required=False, default=1,  help="ratio of random sequneces in the library")
+    Mix.add_argument("-ra", "--randAMP", required=False, default=1,  help="ratio of random sequences with APD2 amino acid distribution in the library")
+    Mix.add_argument("-rp", "--randAMPnoCM", required=False, default=1, help="ratio of random sequences with APD2 amino acid distribution without Cys and Met in the library")
+    Mix.add_argument("-O", "--OutFasta", required=True, default=None, help="Output Fasta")
+
+
     args = parser.parse_args()
 
     if sys.argv[1] == 'Random':
@@ -212,5 +240,9 @@
         AMPngrams_seq(args.seq_num, args.n_min, args.n_max, args.OutFasta)
     elif sys.argv[1] == 'AmphipathicArc':
         AmphipathicArc_seq(int(args.seq_num), int(args.lenmin_s), int(args.lenmax_s), int(args.arcsize), args.hyd_gra, args.OutFasta)
+    elif sys.argv[1] == 'MixedLibrary':
+        MixedLibrary_seq(args.seq_num, args.centrosymmetric, args.centroasymmetric, args.helix, args.kinked, args.oblique, args.rand, args.randAMP, args.randAMPnoCM, args.OutFasta)
     else:
-        print("You entered Wrong Values: ")
\ No newline at end of file
+        print("You entered Wrong Values: ")
+
+
--- a/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.xml	Thu Jan 28 04:37:32 2021 +0000
+++ b/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.xml	Sun Jan 31 02:54:08 2021 +0000
@@ -68,7 +68,20 @@
                             --lenmin_s '$SelLibGene.lenmin_s'
                             --arcsize '$SelLibGene.arcsize'
                             --hyd_gra '$SelLibGene.hydgra'
-                        #end if      
+                        #end if    
+
+
+                        #if $SelLibGene.LibGene == 'MixedLibrary' 
+                            --seq_num '$SelLibGene.seq_num'
+                            --centrosymmetric '$SelLibGene.centrosymmetric'
+                            --centroasymmetric '$SelLibGene.centroasymmetric'
+                            --helix '$SelLibGene.helix'
+                            --kinked '$SelLibGene.kinked'
+                            --oblique '$SelLibGene.oblique'
+                            --rand '$SelLibGene.rand'
+                            --randAMP '$SelLibGene.randAMP'
+                            --randAMPnoCM '$SelLibGene.randAMPnoCM'
+                        #end if 
 
 
                         --OutFasta '$output1'
@@ -81,16 +94,16 @@
     <conditional name='SelLibGene' >
 
         <param name="LibGene" type="select" label="Methods to generate peptide sequence" argument="">
-          <option value="Random">Random sequences</option>
-          <option value="Helices">Presumed amphipathic helical sequences with a hydrophobic moment</option>
-          <option value="Kinked">Presumed amphipathic helices with a kink (Pro residue)</option>
-          <option value="Oblique">Presumed oblique oriented sequences in presence of libid membranes</option>
-          <option value="Centrosymmetric">Centrosymmetric sequences with a symmetry axis</option>
-          <option value="HelicesACP">Sequences with the amino acid probabiliy of helical ACPs</option>
-          <option value="Hepahelices">Presumed amphipathic helices with a heparin-binding-domain</option>
-          <option value="AMPngrams">Sequences from most frequent ngrams in the APD3</option>
-          <option value="AmphipathicArc">Presumed amphipathic helices with controlled hydrophobic arc size</option>
-
+            <option value="AmphipathicArc">AmphipathicArc Peptides</option>
+            <option value="AMPngrams">AMPngrams Peptides</option>
+            <option value="Centrosymmetric">Centrosymmetric Peptides</option>
+            <option value="Helices">Helices Peptides</option>
+            <option value="HelicesACP">HelicesACP Peptides</option>
+            <option value="Hepahelices">Hepahelices Peptides</option>
+            <option value="Kinked">Kinked Peptides</option>
+            <option value="Oblique">Oblique Peptides</option>
+            <option value="Random">Random Peptides</option>
+            <option value="MixedLibrary">MixedLibrary Peptides</option>
         </param>
 
         <when value="Random">
@@ -154,6 +167,20 @@
             <param name="hydgra" type="boolean"  value="false" argument="--hyd_gra" label="Hydrophobic gradient" help="Method to mutate the generated sequences to have a hydrophobic gradient by substituting the last third of the sequence amino acids to hydrophobic."/>
         </when>
 
+        <when value="MixedLibrary">
+
+            <param name="seq_num"  type="integer" value="1000" label="Number of peptides" argument= "--seq_num" help="Number of peptides."/>
+            <param name="centrosymmetric" type="integer" value="5" label="Ratio of symmetric centrosymmetric sequences in the library" argument="--lenmin_s" help="Ratio of symmetric centrosymmetric sequences in the library"/>
+            <param name="centroasymmetric" type="integer" value="5" label="Ratio of asymmetric centrosymmetric sequences" help="Ratio of asymmetric centrosymmetric sequences in the library"/>
+            <param name="helix" type="integer" value="3" label="Ratio of asymmetric centrosymmetric sequences"  help="Ratio of asymmetric centrosymmetric sequences in the library"/>
+            <param name="kinked" type="integer"  value="3" label="Ratio of kinked" help="Ratio of kinked amphipathic helical sequences in the library"/>
+            <param name="oblique" type="integer"  value="2" label="Ratio of oblique" help="Ratio of oblique oriented amphipathic helical sequences in the library"/>
+            <param name="rand" type="integer"  value="10" label="Ratio of random sequneces" help="Ratio of random sequneces in the library"/>
+            <param name="randAMP" type="integer"  value="10"  label="Ratio of random sequences with APD2 amino acid distribution" help="Ratio of random sequences with APD2 amino acid distribution in the library"/>
+            <param name="randAMPnoCM" type="integer" value="5"  label="Ratio of random sequences with APD2 amino acid distribution without Cys and Met in the library" help="Ratio of random sequences with APD2 amino acid distribution in the library"/>
+
+        </when>
+
     </conditional>
   </inputs>
 
@@ -274,54 +301,57 @@
 -----
 
 **Inputs**
-    **1**  Random    
+    **1**  Random Peptides   
        * **--seq_num**  Number of sequences to be generated.  
        * **--lenmin_s** Peptide minimum legnth. 
        * **--lenmax_s** Peptide maximum legnth. 
        * **--S_proba**  AA probability to be used to generate sequences. Available from str: AMP, AMPnoCM, rand, randnoCM. You can also provide your own list of porbabilities as a list (in AA order, length 20, sum to 1)
        
-    **2** Helice
+    **2** Helice Peptides
        * **--seq_num**  Number of sequence to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum length. 
 
-    **3** Kinked
+    **3** Kinked Peptides
        * **--seq_num**  Number of sequences to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum length. 
 
-    **4** Obliqu
+    **4** Obliqu Peptides
        * **--seq_num**  Number of sequence to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum length. 
 
-    **5** Centrosymmetric
+    **5** Centrosymmetric Peptides
        * **--seq_num**  Number of sequences to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum length. 
        * **--symmetry_s**   symmetry type of centrosymmetric sequences. symmetric: builds sequences out of only one block, asymmetric: builds sequences out of different blocks
 
-    **6** HelicesACP
+    **6** HelicesACP Peptides
        * **--seq_num**  Number of sequences to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum length. 
 
-    **7** Hepahelices
+    **7** Hepahelices Peptides
        * **--seq_num**  Number of sequences to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum length. 
 
-    **7** AMPngrams
+    **7** AMPngrams Peptides
        * **--seq_num**  Number of sequence to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum length. 
 
-    **9** AmphipathicArc
+    **9** AmphipathicArc Peptides
        * **--seq_num**  Number of sequence to be generated.  
        * **--lenmin_s** Peptide minimum length. 
        * **--lenmax_s** Peptide maximum lenngth. 
        * **--arcsize** Choose among 100, 140, 180, 220, 260, or choose mixed to generate a mixture
 
+    **10** MixedLibrary Peptides
+      * **Todo**
+
 -----