Mercurial > repos > jay > pdaug_word_vector_model
diff PDAUG_Peptide_Data_Access/PDAUG_Peptide_Data_Access.py @ 1:682fee9fef16 draft
"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit 3c91f421d26c8f42cf2671e47db735d2cf69dde8"
author | jay |
---|---|
date | Tue, 29 Dec 2020 04:32:31 +0000 |
parents | 3ce435b8d648 |
children |
line wrap: on
line diff
--- a/PDAUG_Peptide_Data_Access/PDAUG_Peptide_Data_Access.py Wed Oct 28 02:21:16 2020 +0000 +++ b/PDAUG_Peptide_Data_Access/PDAUG_Peptide_Data_Access.py Tue Dec 29 04:32:31 2020 +0000 @@ -10,13 +10,13 @@ def DataGen(DataBaseType, OutFile, IDs): - if DataBaseType == 'AMPvsTM': + if DataBaseType == 'AMPvsTMP': data = load_AMPvsTM() elif DataBaseType == 'AMPvsUniProt': data = load_AMPvsUniProt() - elif DataBaseType == 'ACPvsTM': + elif DataBaseType == 'ACPvsTMP': data = load_ACPvsTM() elif DataBaseType == 'ACPvsRandom': @@ -39,16 +39,11 @@ print ("Enter Correct Values") exit() - Target = data.target.tolist() - Target_list = set(Target) - df = data.sequences - - - Target = pd.DataFrame(Target, columns=['Target']) - df = pd.DataFrame(df, columns=['Peptide']) - - df = pd.DataFrame(df) - df = pd.concat([df, Target], axis=1) + peptide_data = data.sequences + class_label = int(len(peptide_data)/2)*[data.target_names[0]]+int(len(peptide_data)/2)*[data.target_names[1]] + peptide_data = pd.DataFrame(peptide_data, columns=['name']) + class_label = pd.DataFrame(class_label, columns=['class_label']) + df = pd.concat([peptide_data,class_label], axis=1) df.to_csv(OutFile, index=False, sep='\t') @@ -69,9 +64,9 @@ help="Out put file name for str descriptors") parser.add_argument("-L", "--List", - required=False, - default=None, - help="List of integer as ID") + required=False, + default=None, + help="List of integer as ID") args = parser.parse_args() DataGen(args.DataBaseType, args.OutFile, args.List)