changeset 6:370b68568ba2 draft

"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit e8c8198105af7eab636fb2405e5ff335539ca14b"
author jay
date Sun, 31 Jan 2021 02:46:28 +0000
parents 95900530d661
children 3cdcf2120d65
files PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py PDAUG_Peptide_CD_Spectral_Analysis/PDAUG_Peptide_CD_Spectral_Analysis.xml
diffstat 2 files changed, 43 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Thu Jan 28 04:29:35 2021 +0000
+++ b/PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py	Sun Jan 31 02:46:28 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_CD_Spectral_Analysis/PDAUG_Peptide_CD_Spectral_Analysis.xml	Thu Jan 28 04:29:35 2021 +0000
+++ b/PDAUG_Peptide_CD_Spectral_Analysis/PDAUG_Peptide_CD_Spectral_Analysis.xml	Sun Jan 31 02:46:28 2021 +0000
@@ -70,9 +70,9 @@
 
         <param name="Methods" type="select" label="Circular dichroism data analysis options" help="Circular dichroism data analysis options" >
           <option value="calc_ellipticity">Calculate Ellipticity</option>
-          <option value="PlotData">Plot Data</option>
-          <option value="Dichroweb">Save data in DichroWeb readable format</option>
-          <option value="helicity">Calculate the percentage of helicity</option>
+          <option value="PlotData">Generate CD Plots</option>
+          <option value="Dichroweb">Save Data in DichroWeb Readable Format</option>
+          <option value="helicity">Calculate the Percentage of Helicity</option>
         </param>
 
       <when value="calc_ellipticity">
@@ -303,36 +303,36 @@
 This tool handles circular dichroism data files and calculates several ellipticity and helicity values. The class can handle data files of the Applied Photophysics type. For explanations of different units used in CD spectroscopy, visit https://www.photophysics.com/resources/7-cd-units-conversions. Provided with four different options. 
 
   * **Calculate Ellipticity** Calculates molar and mean residue ellipticity.  
-  * **Plot Data** Generates circular_dichroism plots for all read data in the initial directory.
-  * **Save data in DichroWeb readable format** Method to save the calculated CD data into DichroWeb readable format (semi-colon separated). The produced files can then directly be uploaded to the DichroWeb analysis tool.
-  * **Calculate the percentage of helicity** Method to calculate the percentage of helicity out of the mean residue ellipticity data. The calculation is based on the formula by Fairlie and co-workers.
+  * **Generate CD Plots** Generates circular_dichroism plots for all read data in the initial directory.
+  * **Save Data in DichroWeb Readable Format** Method to save the calculated CD data into DichroWeb readable format (semi-colon separated). The produced files can then directly be uploaded to the DichroWeb analysis tool.
+  * **Calculate the Percentage of Helicity<** Method to calculate the percentage of helicity out of the mean residue ellipticity data. The calculation is based on the formula by Fairlie and co-workers.
 
 -----
 
 **Inputs**
 
-  **1** calc_ellipticity
+  **1** Calculate Ellipticity
      * **--Type**
      * **--Wmin** smallest wavelength measured
      * **--Wmax** highest wavelength measured
      * **--Amide** specifies whether the sequences have amidated C-termini
      * **--Pathlen** cuvette path length in mm
 
-  **2** PlotData
+  **2** Generate CD Plots
      * **--Type**
      * **--Wmin** smallest wavelength measured
      * **--Wmax** highest wavelength measured
      * **--Amide** specifies whether the sequences have amidated C-termini
      * **--Pathlen**  cuvette path length in mm
 
-  **3** Dicroweb
+  **3** Save Data in DichroWeb Readable Format
      * **--Type**
      * **--Wmin** smallest wavelength measured
      * **--Wmax** highest wavelength measured
      * **--Amide** specifies whether the sequences have amidated C-termini
      * **--Pathlen**  cuvette path length in mm
 
-  **4** helicity 
+  **4** Calculate the Percentage of Helicity 
      * **--Type**
      * **--Wmin** smallest wavelength measured
      * **--Wmax** highest wavelength measured
@@ -342,7 +342,6 @@
      * **--k** {float, 2.4 - 4.5} finite length correction factor. Can be adapted to the helicity of a known peptide.
      * **--Induction** whether the helical induction upon changing from one solvent to another should be calculated.
 
-
 -----
 
 **Outputs**