diff --git a/bmd2Samps_v3/buildv3database.R b/bmd2Samps_v3/buildv3database.R index 84c4f09..5afc3ca 100644 --- a/bmd2Samps_v3/buildv3database.R +++ b/bmd2Samps_v3/buildv3database.R @@ -892,13 +892,14 @@ main<-function(){ parser$add_argument('-s','--sample',dest='is_sample',action='store_true',default=FALSE,help='Flag to indicate file are for samples') parser$add_argument('-c','--chemical',dest='is_chem',default=FALSE,action='store_true', help='Flag to indicate file is for chemicals') - parser$add_argument('-d','--drcFile',dest='dose_res_stat',default'',help='dose response curve file') + parser$add_argument('-d','--drcFiles',dest='dose_res_stat',default='',help='dose response curve file') parser$add_argument('-p','--sampMap',dest='sample_mapping_file',default='',help='Sample mapping file location') parser$add_argument('-m','--chemMap',dest='chem_meta_file',default='',help='Chemical metadata file location') parser$add_argument('-e','--epMap',dest='endpoint_mapping_file',default='',help='Endpoint naming file location') parser$add_argument('-l','--chemClass',dest='chem_class_file',default='',help='chemical class file location') parser$add_argument('-x','--compToxFile',dest='comp_tox_mapping',default='',help='comptox data file location') parser$add_argument('-f','--sampleFiles',dest='sample_files',default='',help='comma dlimited list of fses files to merge' ) + parser$add_argument('-h','--chemDesc',dest='chem_desc',default='',help='Descriptions of chemicals') args <- parser$parse_args() diff --git a/data/srp_build_files.csv b/data/srp_build_files.csv index efab49c..703bd39 100644 --- a/data/srp_build_files.csv +++ b/data/srp_build_files.csv @@ -35,4 +35,5 @@ chemMap,mapping,chemical,https://raw.githubusercontent.com/PNNL-CompBio/srpAnaly sampMap,mapping,sample,https://raw.githubusercontent.com/PNNL-CompBio/srpAnalytics/main/data/sampleIdMapping.csv,1 class1,classification,chemical,https://raw.githubusercontent.com/PNNL-CompBio/srpAnalytics/main/data/MASV%20Classifications%202021.xlsx,1 compTox,mapping,chemical,https://github.com/PNNL-CompBio/srpAnalytics/blob/main/data/CCDBatch_2022-01-26_AND_2021_11_05.xlsx,1 -endpointMap,mapping,endpoint,https://github.com/PNNL-CompBio/srpAnalytics/blob/main/data/SuperEndpoint%20Mapping%202021NOV04.xlsx,1 \ No newline at end of file +endpointMap,mapping,endpoint,https://github.com/PNNL-CompBio/srpAnalytics/blob/main/data/SuperEndpoint%20Mapping%202021NOV04.xlsx,1 +chemdesc,classification,chemical,https://github.com/PNNL-CompBio/srpAnalytics/blob/main/data/ChemicalDescriptions.xlsx,1 \ No newline at end of file diff --git a/v3_buildScript.py b/v3_buildScript.py index 0750262..ade8f6d 100644 --- a/v3_buildScript.py +++ b/v3_buildScript.py @@ -75,17 +75,18 @@ def main(): sampfiles.append(fname) ##now map sample information - smap = df.loc[df.name=='sampMap'].location - cmap = df.loc[df.name=='chemMap'].location - cclass = df.loc[df.name=='class1'].location - emap = df.loc[df.name=='endpointMap'].location - fses = ','.join(df.loc[df.data_type=='sample'].location) - ctfile = df.loc[df.name=='colmpTox'].location + smap = list(df.loc[df.name=='sampMap'].location)[0] + cmap = list(df.loc[df.name=='chemMap'].location)[0] + cclass = list(df.loc[df.name=='class1'].location)[0] + emap = list(df.loc[df.name=='endpointMap'].location)[0] + fses = ','.join(list(df.loc[df.data_type=='sample'].location)) + ctfile = list(df.loc[df.name=='compTox'].location)[0] + desfile = list(df.loc[df.name=='chemdesc'].location)[0] ##call script with sample files - cmd = "Rscript bmd2Samps_v3/buildV3database.R --sample --drcFile="+','.join(sampfiles)+\ + cmd = "Rscript bmd2Samps_v3/buildV3database.R --sample --drcFiles="+','.join(sampfiles)+\ ' --sampMap='+smap+' --chemMap='+cmap+' --epMap='+emap+' --chemClass='+cclass+\ - ' --compToxFile='+ctfile+' --sampleFiles='+fses + ' --compToxFile='+ctfile+' --sampleFiles='+fses+' --chemDesc='+desfile print(cmd) os.system(cmd) ##call script with chemical files