Mercurial > repos > jay > pdaug_basic_plots
comparison PDAUG_AA_Property_Based_Peptide_Generation/PDAUG_AA_Property_Based_Peptide_Generation.py @ 6:738ee8fc0ede draft
"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit e8c8198105af7eab636fb2405e5ff335539ca14b"
author | jay |
---|---|
date | Sun, 31 Jan 2021 02:02:32 +0000 |
parents | 7d247e27ff11 |
children |
comparison
equal
deleted
inserted
replaced
5:4c3242563796 | 6:738ee8fc0ede |
---|---|
126 OutPep = amphi_hel.sequences | 126 OutPep = amphi_hel.sequences |
127 | 127 |
128 for i,O in enumerate(OutPep): | 128 for i,O in enumerate(OutPep): |
129 OutFasta.write(">sequence_"+str(i)+'\n') | 129 OutFasta.write(">sequence_"+str(i)+'\n') |
130 OutFasta.write(O+'\n') | 130 OutFasta.write(O+'\n') |
131 | |
132 | |
133 def MixedLibrary_seq(seqnum, centrosymmetric, centroasymmetric, helix, kinked, oblique, rand, randAMP, randAMPnoCM, OutFasta): | |
134 | |
135 lib = MixedLibrary(int(seqnum), int(centrosymmetric), int(centroasymmetric), int(helix), int(kinked), int(oblique), int(rand), int(randAMP), int(randAMPnoCM)) | |
136 lib.generate_sequences() | |
137 OutFasta = open(OutFasta, 'w') | |
138 | |
139 OutPep = lib.sequences | |
140 | |
141 for i,O in enumerate(OutPep): | |
142 OutFasta.write(">sequence_"+str(i)+'\n') | |
143 OutFasta.write(O+'\n') | |
144 | |
145 | |
131 | 146 |
132 if __name__=='__main__': | 147 if __name__=='__main__': |
133 | 148 |
134 parser = argparse.ArgumentParser(description='Deployment tool') | 149 parser = argparse.ArgumentParser(description='Deployment tool') |
135 subparsers = parser.add_subparsers() | 150 subparsers = parser.add_subparsers() |
189 Arc.add_argument("-m","--lenmin_s", required=False, default=7, help="") | 204 Arc.add_argument("-m","--lenmin_s", required=False, default=7, help="") |
190 Arc.add_argument("-M","--lenmax_s", required=False, default=20, help="Len max") | 205 Arc.add_argument("-M","--lenmax_s", required=False, default=20, help="Len max") |
191 Arc.add_argument("-a","--arcsize", help="Choose among 100, 140, 180, 220, 260, or choose mixed to generate a mixture") | 206 Arc.add_argument("-a","--arcsize", help="Choose among 100, 140, 180, 220, 260, or choose mixed to generate a mixture") |
192 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.") | 207 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.") |
193 Arc.add_argument("-O", "--OutFasta", required=True, default=None, help="Output Fasta") | 208 Arc.add_argument("-O", "--OutFasta", required=True, default=None, help="Output Fasta") |
209 | |
210 Mix = subparsers.add_parser('MixedLibrary') | |
211 Mix.add_argument("-s","--seq_num", required=True, default=None, help="number of sequences to be generated") | |
212 Mix.add_argument("-c","--centrosymmetric", required=False, default=1, help="ratio of symmetric centrosymmetric sequences in the library") | |
213 Mix.add_argument("-ca","--centroasymmetric", required=False, default=1, help="ratio of asymmetric centrosymmetric sequences in the library") | |
214 Mix.add_argument("-hl","--helix", required=False, default=1, help="ratio of asymmetric centrosymmetric sequences in the library") | |
215 Mix.add_argument("-k","--kinked", required=False, default=1, help="ratio of asymmetric centrosymmetric sequences in the library") | |
216 Mix.add_argument("-o", "--oblique", required=False, default=1, help=" ratio of oblique oriented amphipathic helical sequences in the library") | |
217 Mix.add_argument("-r", "--rand", required=False, default=1, help="ratio of random sequneces in the library") | |
218 Mix.add_argument("-ra", "--randAMP", required=False, default=1, help="ratio of random sequences with APD2 amino acid distribution in the library") | |
219 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") | |
220 Mix.add_argument("-O", "--OutFasta", required=True, default=None, help="Output Fasta") | |
221 | |
194 | 222 |
195 args = parser.parse_args() | 223 args = parser.parse_args() |
196 | 224 |
197 if sys.argv[1] == 'Random': | 225 if sys.argv[1] == 'Random': |
198 Random_seq(args.seq_num, args.lenmin_s, args.lenmax_s, args.S_proba, args.OutFasta) | 226 Random_seq(args.seq_num, args.lenmin_s, args.lenmax_s, args.S_proba, args.OutFasta) |
210 Hepahelices_seq(args.seq_num, args.lenmin_s, args.lenmax_s, args.OutFasta) | 238 Hepahelices_seq(args.seq_num, args.lenmin_s, args.lenmax_s, args.OutFasta) |
211 elif sys.argv[1] == 'AMPngrams': | 239 elif sys.argv[1] == 'AMPngrams': |
212 AMPngrams_seq(args.seq_num, args.n_min, args.n_max, args.OutFasta) | 240 AMPngrams_seq(args.seq_num, args.n_min, args.n_max, args.OutFasta) |
213 elif sys.argv[1] == 'AmphipathicArc': | 241 elif sys.argv[1] == 'AmphipathicArc': |
214 AmphipathicArc_seq(int(args.seq_num), int(args.lenmin_s), int(args.lenmax_s), int(args.arcsize), args.hyd_gra, args.OutFasta) | 242 AmphipathicArc_seq(int(args.seq_num), int(args.lenmin_s), int(args.lenmax_s), int(args.arcsize), args.hyd_gra, args.OutFasta) |
243 elif sys.argv[1] == 'MixedLibrary': | |
244 MixedLibrary_seq(args.seq_num, args.centrosymmetric, args.centroasymmetric, args.helix, args.kinked, args.oblique, args.rand, args.randAMP, args.randAMPnoCM, args.OutFasta) | |
215 else: | 245 else: |
216 print("You entered Wrong Values: ") | 246 print("You entered Wrong Values: ") |
247 | |
248 |