Mercurial > repos > jay > pdaug_sequence_property_based_descriptors
changeset 5:7dc979925e31 draft
"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit ac4353ca5c0ac9ce60df9f4bf160ed08b99fbee3"
| author | jay |
|---|---|
| date | Thu, 28 Jan 2021 04:18:51 +0000 |
| parents | 0a31e26e68d7 |
| children | dd4523d4ae2f |
| files | PDAUG_Basic_Plots/PDAUG_Basic_Plots.py PDAUG_Basic_Plots/test-data/test5/report_dir/Out.png PDAUG_Basic_Plots/test-data/test5/report_dir/report.html PDAUG_Peptide_CD_Spectral_Analysis/PDAUG_Peptide_CD_Spectral_Analysis.py PDAUG_Sequence_Based_Peptide_Generation/PDAUG_Sequence_Based_Peptide_Generation.py PDAUG_Sequence_Property_Based_Descriptors/PDAUG_Sequence_Property_Based_Descriptors.py PDAUG_Sequence_Property_Based_Descriptors/PDAUG_Sequence_Property_Based_Descriptors.xml PDAUG_Sequence_Property_Based_Descriptors/test-data/Out.tsv PDAUG_TSVtoFASTA/test-data/1.fasta PDAUG_TSVtoFASTA/test-data/2.fasta PDAUG_TSVtoFASTA/test-data/out.fasta PDAUG_Word_Vector_Model/PDAUG_Word_Vector_Model.py |
| diffstat | 12 files changed, 179 insertions(+), 159 deletions(-) [+] |
line wrap: on
line diff
--- a/PDAUG_Basic_Plots/PDAUG_Basic_Plots.py Tue Jan 12 19:38:40 2021 +0000 +++ b/PDAUG_Basic_Plots/PDAUG_Basic_Plots.py Thu Jan 28 04:18:51 2021 +0000 @@ -182,4 +182,4 @@ WordCloudPlot(args.InFile, args.FragSize, args.Workdirpath, args.htmlOutDir, args.htmlFname) else: - print("In Correct Option:") + print("Incorrect option provided: %s" % (sys.argv[1]))
--- a/PDAUG_Basic_Plots/test-data/test5/report_dir/report.html Tue Jan 12 19:38:40 2021 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - - - <!DOCTYPE html> - <html lang="en"> - <head> - <title>Bootstrap Example</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> - <body> - <style> - div.container_1 { - width:600px; - margin: auto; - padding-right: 10; - } - div.table { - width:600px; - margin: auto; - padding-right: 10; - } - </style> - </head> - <div class="jumbotron text-center"> - <h1> Word Cloud </h1> - </div> - <div class="container"> - <div class="row"> - <div class="col-sm-4"> - <img src="Out.png" alt="Smiley face" height="1000" width="800"> - </div> - - </div> - </div> - </body> - </html> - \ No newline at end of file
--- a/PDAUG_Peptide_CD_Spectral_Analysis/PDAUG_Peptide_CD_Spectral_Analysis.py Tue Jan 12 19:38:40 2021 +0000 +++ b/PDAUG_Peptide_CD_Spectral_Analysis/PDAUG_Peptide_CD_Spectral_Analysis.py Thu Jan 28 04:18:51 2021 +0000 @@ -71,8 +71,6 @@ if sys.argv[1] == "PlotData": - os.system('ls temp') - if args.Type == "mean residue ellipticity": cd = CD(args.DirPath, wmin=int(args.WMin), wmax=int(args.Wmax), amide=args.Amide, pathlen=float(args.Pathlen)) @@ -119,7 +117,3 @@ cd = CD(args.DirPath, wmin=int(args.WMin), wmax=int(args.Wmax), amide=args.Amide, pathlen=float(args.Pathlen)) cd.calc_meanres_ellipticity() cd.helicity(temperature=float(args.temperature), k=float(args.k), induction=args.Induction, filename=args.OutPut ) - - - -
--- a/PDAUG_Sequence_Based_Peptide_Generation/PDAUG_Sequence_Based_Peptide_Generation.py Tue Jan 12 19:38:40 2021 +0000 +++ b/PDAUG_Sequence_Based_Peptide_Generation/PDAUG_Sequence_Based_Peptide_Generation.py Thu Jan 28 04:18:51 2021 +0000 @@ -150,5 +150,5 @@ SlidingWindowPeptide(args.InFile, args.winSize, args.FragSize, args.outputFile) else: - print("In Correct Option:") + print("Incorrect option provided: %s" % (sys.argv[1]))
--- a/PDAUG_Sequence_Property_Based_Descriptors/PDAUG_Sequence_Property_Based_Descriptors.py Tue Jan 12 19:38:40 2021 +0000 +++ b/PDAUG_Sequence_Property_Based_Descriptors/PDAUG_Sequence_Property_Based_Descriptors.py Thu Jan 28 04:18:51 2021 +0000 @@ -43,10 +43,10 @@ return df -def Decriptor_generator(InFile, Lamda, Weight, DesType, Out_file): +def Decriptor_generator(infile, lamda, weight, maxlag, destype, out_file): list_pep_name = [] - f = open(InFile) + f = open(infile) lines = f.readlines() for line in lines: @@ -62,62 +62,71 @@ protein = PyPro() protein.ReadProteinSequence(seq) - if DesType == 'PAAC': - DS = protein.GetPAAC(lamda=int(Lamda), weight=float(Weight)) + + if destype == "GetAAComp": + DS = protein.GetAAComp() df = pd.DataFrame(DS, index=[0]) - elif DesType == 'APAAC': - DS = protein.GetAPAAC(lamda=int(Lamda), weight=float(Weight)) - df = pd.DataFrame(DS, index=[0]) - elif DesType == 'CTD': - DS = protein.GetCTD() - df = pd.DataFrame(DS, index=[0]) - elif DesType == 'DPComp': + elif destype == "GetDPComp": DS = protein.GetDPComp() df = pd.DataFrame(DS, index=[0]) - elif DesType == 'GearyAuto': - DS = protein.GetGearyAuto() + elif destype == "GetTPComp": + DS = protein.GetTPComp() df = pd.DataFrame(DS, index=[0]) - elif DesType == 'MoranAuto': - DS = protein.GetMoranAuto() - df = pd.DataFrame(DS, index=[0]) - elif DesType == 'MoreauBrotoAuto': + elif destype == "GetMoreauBrotoAuto": DS = protein.GetMoreauBrotoAuto() df = pd.DataFrame(DS, index=[0]) - elif DesType == 'QSO': - DS = protein.GetQSO() + elif destype =="GetMoranAuto": + DS = protein.GetMoranAuto() + df = pd.DataFrame(DS, index=[0]) + elif destype =="GetGearyAuto": + DS = protein.GetGearyAuto() + df = pd.DataFrame(DS, index=[0]) + elif destype == "GetCTD": + DS = protein.GetCTD() df = pd.DataFrame(DS, index=[0]) - elif DesType == 'SOCN': - DS = protein.GetSOCN() + elif destype == "GetPAAC": + DS = protein.GetPAAC(lamda=int(lamda), weight=float(weight)) df = pd.DataFrame(DS, index=[0]) - elif DesType == 'TPComp': - DS = protein.GetTPComp() + elif destype == "GetAPAAC": + DS = protein.GetAPAAC(lamda=int(lamda), weight=float(weight)) + df = pd.DataFrame(DS, index=[0]) + elif destype =="GetSOCN": + DS = protein.GetSOCN(maxlag=int(maxlag)) df = pd.DataFrame(DS, index=[0]) - elif DesType == 'All': - DS_1 = protein.GetPAAC(lamda=int(Lamda), weight=float(Weight)) - DS_2 = protein.GetAPAAC(lamda=int(Lamda), weight=float(Weight)) - DS_3 = protein.GetCTD() - DS_4 = protein.GetDPComp() - DS_5 = protein.GetGearyAuto() - DS_6 = protein.GetMoranAuto() - DS_7 = protein.GetMoreauBrotoAuto() - DS_8 = protein.GetQSO() - DS_9 = protein.GetSOCN() - DS_10 = protein.GetTPComp() + elif destype =="GetQSO": + DS = protein.GetQSO(maxlag=int(maxlag), weight=float(weight)) + df = pd.DataFrame(DS, index=[0]) + elif destype == "GetTriad": + DS = protein.GetTriad() + df = pd.DataFrame(DS, index=[0]) + elif destype == "All": + DS1 = protein.GetAAComp() + DS2 = protein.GetDPComp() + DS3 = protein.GetTPComp() + DS4 = protein.GetMoreauBrotoAuto() + DS5 = protein.GetMoranAuto() + DS6 = protein.GetGearyAuto() + DS7 = protein.GetCTD() + DS8 = protein.GetPAAC(lamda=int(lamda), weight=float(weight)) + DS9 = protein.GetAPAAC(lamda=int(lamda), weight=float(weight)) + DS10 = protein.GetSOCN(maxlag=int(maxlag)) + DS11 = protein.GetQSO(maxlag=int(maxlag), weight=float(weight)) + DS12 = protein.GetTriad() DS = {} - for D in (DS_1, DS_2, DS_3, DS_4, DS_5, DS_6, DS_7, DS_8, DS_9, DS_10): + for D in (DS1,DS2,DS3,DS4,DS5,DS6,DS7,DS8,DS9,DS10,DS11,DS12): + print(D) DS.update(D) - df = pd.DataFrame(DS, index=[0]) - if DesType == 'BinaryDescriptor': + if destype == 'BinaryDescriptor': out_df = BinaryDescriptor(list_pep_name) else: out_df = pd.concat([out_df, df], axis=0) - out_df.to_csv(Out_file, index=False, sep='\t') + out_df.to_csv(out_file, index=False, sep='\t') if __name__=="__main__": @@ -141,7 +150,12 @@ required=False, default=0.5, help="pep file") - + + parser.add_argument("-m", "--MaxLag", + required=False, + default=10, + help="pep file") + parser.add_argument("-t", "--DesType", required=True, default=None, @@ -153,6 +167,6 @@ help="Path to target tsv file") args = parser.parse_args() - Decriptor_generator(args.InFile, args.Lamda, args.Weight, args.DesType, args.Out_file) + Decriptor_generator(args.InFile, args.Lamda, args.Weight, args.MaxLag, args.DesType, args.Out_file) \ No newline at end of file
--- a/PDAUG_Sequence_Property_Based_Descriptors/PDAUG_Sequence_Property_Based_Descriptors.xml Tue Jan 12 19:38:40 2021 +0000 +++ b/PDAUG_Sequence_Property_Based_Descriptors/PDAUG_Sequence_Property_Based_Descriptors.xml Thu Jan 28 04:18:51 2021 +0000 @@ -6,29 +6,53 @@ <requirement type="package" version="0.24.2">pandas</requirement> <requirement type="package" version="1.0">pydpi</requirement> </requirements> - <stdio> - <exit_code range="1" level="fatal" /> - </stdio> + <command detect_errors="exit_code"><