changeset 6:8362edfd463e draft

"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit e8c8198105af7eab636fb2405e5ff335539ca14b"
author jay
date Sun, 31 Jan 2021 02:51:27 +0000
parents f647277cac06
children 86cb904383fb
files PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py PDAUG_Peptide_Data_Plotting/PDAUG_Peptide_Data_Plotting.xml
diffstat 2 files changed, 45 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Thu Jan 28 04:34:56 2021 +0000
+++ b/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Sun Jan 31 02:51:27 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_Peptide_Data_Plotting/PDAUG_Peptide_Data_Plotting.xml	Thu Jan 28 04:34:56 2021 +0000
+++ b/PDAUG_Peptide_Data_Plotting/PDAUG_Peptide_Data_Plotting.xml	Sun Jan 31 02:51:27 2021 +0000
@@ -46,10 +46,10 @@
     <conditional name='SelPlot' >
 
         <param name="Plot" type="select" label="Plotting method" argument="">
-          <option value="HelWhl">Helical wheel</option>
-          <option value="PltPde">Probability density estimations</option>
-          <option value="PltVio">Violin</option>
-          <option value="PltAaDis">Amino acid distribution</option>
+          <option value="HelWhl">Helical Wheel Plot</option>
+          <option value="PltPde">Probability Density Estimations Plot</option>
+          <option value="PltVio">Violin Plot</option>
+          <option value="PltAaDis">Amino Acid Distribution Plot</option>
         </param>
 
         <when value="HelWhl">
@@ -121,23 +121,23 @@
 
 This tool provided with some advance plotting functions for peptide data.
 
-  * **Helical wheel** Generates a helical wheel projection plot of a given sequence.
-  * **Probability density estimations** Generates a probability density estimation plot of given data arrays.
-  * **Violin** Generates a violin plot for given classes and corresponding distributions.
-  * **Amino acid distribution**  Generates an amino acid frequency plot for all 20 natural amino acids.
+  * **Helical Wheel Plot** Generates a helical wheel projection plot of a given sequence.
+  * **Probability Density Estimations Plot** Generates a probability density estimation plot of given data arrays.
+  * **Violin Plot** Generates a violin plot for given classes and corresponding distributions.
+  * **Amino Acid Distribution Plot**  Generates an amino acid frequency plot for all 20 natural amino acids.
 
 
 -----
 
 **Inputs**
-    **1** HelWhl
+    **1** Helical Wheel Plot
       * **--InFile** Input fasta file with peptide sequences. 
       * **----colorcoding**  the color coding to be used, available: rainbow, charge, polar, simple, amphipathic
       * **--lineweights** defines whether connection lines decrease in thickness along the sequence
       * **--seq** whether the amino acid sequence should be plotted as a title
       * **--movment** whether the Eisenberg hydrophobic moment should be calculated and plotted
 
-    **2** PltPde
+    **2** Probability Density Estimations Plot
       * **--InFile** Input descriptor data as tabular file.
       * **--ClmList** Listt of dataframe columns to be plotted. 
       * **--Title** Plot title.
@@ -147,7 +147,7 @@
       * **--x_min**  x-axis maximum.
       * **--alpha** color alpha for filling pde curve.
 
-    **3** PltVio
+    **3** Violin Plot
       * **--InFile** Input fasta file with peptide sequences. 
       * **--ClmList** List of data frame columns to be plotted. 
       * **--colors**  Face color of the violin plots, can also be a list of colors with the same dimension as x
@@ -157,7 +157,7 @@
       * **--y_max** y-axis minimum.
       * **--y_min** y_max – {number} y-axis maximum.
 
-    **4** PltAaDis
+    **4** Amino Acid Distribution Plot
       * **--InFile** Input fasta file with peptide sequences.
 
 -----