changeset 6:8158a2f59371 draft

"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit e8c8198105af7eab636fb2405e5ff335539ca14b"
author jay
date Sun, 31 Jan 2021 02:24:23 +0000
parents 0c5867456e28
children 9e88a47cf1aa
files PDAUG_AA_Property_Based_Peptide_Descriptor/PDAUG_AA_Property_Based_Peptide_Descriptor.xml PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py
diffstat 2 files changed, 51 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/PDAUG_AA_Property_Based_Peptide_Descriptor/PDAUG_AA_Property_Based_Peptide_Descriptor.xml	Thu Jan 28 04:10:34 2021 +0000
+++ b/PDAUG_AA_Property_Based_Peptide_Descriptor/PDAUG_AA_Property_Based_Peptide_Descriptor.xml	Sun Jan 31 02:24:23 2021 +0000
@@ -61,12 +61,12 @@
     <conditional name='SelDescriptor' >
 
         <param name="Descriptor" type="select" label="Descriptor type" argument="">
-          <option value="AutoCorrCal">AutoCorrCal</option>
-          <option value="CrossCorrCal">CrossCorCal</option>
-          <option value="CalculateMovement">CalculateMovement</option>
-          <option value="GlobalCal">GlobalCal</option>
-          <option value="ProfileCal">ProfileCal</option>
-          <option value="ArcCal">ArcCal</option>
+          <option value="AutoCorrCal">Calculate AutoCorr</option>
+          <option value="CrossCorrCal">Calculate CrossCor</option>
+          <option value="CalculateMovement">Calculate Movement</option>
+          <option value="GlobalCal">Calculate Global</option>
+          <option value="ProfileCal">Calculate Profile</option>
+          <option value="ArcCal">Calculate Arc</option>
         </param>
 
         <when value="AutoCorrCal">          
@@ -179,46 +179,46 @@
 
     This tool calculates 6 different types of peptide descriptors.
 
-      * **AutoCorCal** This option calculates descriptor via auto-correlating the amino acid values for a given descriptor scale. 
-      * **CrosCorCal** This option calculates descriptor via cross-correlating the amino acid values for a given descriptor scale. 
-      * **CalculateMovement** This option calculates descriptor based on the maximum or mean movement of the amino acid values for a given descriptor scale and window.
-      * **GlobalCal** This option calculates descriptors via calculating a global / window averaging descriptor value of a given AA scale.
-      * **ProfileCal** This tool calculates description via calculating hydrophobicity or hydrophobic moment profiles for given sequences and fitting for slope and intercept.
-      * **ArcCal** This option calculates descriptors via calculating property arcs as seen in the helical wheel plot. This method work for binary amino acid scales only.
+      * **Calculate AutoCor** This option calculates descriptor via auto-correlating the amino acid values for a given descriptor scale. 
+      * **Calculate CrosCor** This option calculates descriptor via cross-correlating the amino acid values for a given descriptor scale. 
+      * **Calculate Movement** This option calculates descriptor based on the maximum or mean movement of the amino acid values for a given descriptor scale and window.
+      * **Calculate Global** This option calculates descriptors via calculating a global / window averaging descriptor value of a given AA scale.
+      * **Calculate Profile** This tool calculates description via calculating hydrophobicity or hydrophobic moment profiles for given sequences and fitting for slope and intercept.
+      * **Calculate Arc** This option calculates descriptors via calculating property arcs as seen in the helical wheel plot. This method work for binary amino acid scales only.
 
 -----
 
 **Inputs**
-    **1**  AutoCorrCal    
+    **1**  Calculate AutoCor    
        * **--Infile** Input fasta file with peptides. 
        * **--WindowSize**  Correlation window for descriptor calculation in a sliding window approach.  
        * **--ScaleName** Method to load amino acid values from a given scale.
 
-    **2** CrossCorrCal
+    **2** Calculate CrosCor
        * **--Infile** Input fasta file with peptides. 
        * **--WindowSize**  Correlation window for descriptor calculation in a sliding window approach  
        * **--ScaleName** Method to load amino acid values from a given scale.
 
-    **3** CalculateMovement
+    **3** Calculate Movement
        * **--Infile** Input fasta file with peptides. 
        * **--WindowSize**  Amino acid window in which to calculate the moment. If the sequence is shorter than the window, the length of the sequence is taken. So if the default window of 1000 is chosen, for all sequences shorter than 1000, the global hydrophobic moment will be calculated. Otherwise, the maximal hydrophiobic moment for the chosen window size found in the sequence will be returned.  
        * **--ScaleName** Method to load amino acid values from a given scale.
        * **--Angle** Angle in which to calculate the moment. 100 for alpha-helices, 180 for beta sheets.
        * **--Modality** Calculate respectively maximum or mean hydrophobic moment. If all, moments for all windows are returned.
 
-    **4** GlobalCal
+    **4** Calculate Global
        * **--Infile** Input fasta file with peptides. 
        * **--Modality** Calculate respectively maximum or mean hydrophobic moment.
        * **--WindowSize** amino acid window in which to calculate the moment. If the sequence is shorter than the window, the length of the sequence is taken.  
        * **--ScaleName** Method to load amino acid values from a given scale.
 
-    **5** ProfileCal
+    **5** Calculate Profile
        * **--Infile** Input fasta file with peptides. 
        * **--Infile** Input fasta file with peptides.  
        * **--ProfType** prof_type of the profile, available: ‘H’ for hydrophobicity or ‘uH’ for a hydrophobic moment
        * **--WindowSize** {int} size of sliding window used (odd-numbered).
 
-    **6** ArcCal
+    **6** Calculate Arc
        * **--Modality**  Modality of the arc to calculate, to choose between “max” and “mean”.
 
 -----
--- a/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Thu Jan 28 04:10:34 2021 +0000
+++ b/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Sun Jan 31 02:24:23 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: ")
+
+