Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more build files added #83

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bmd2Samps_v3/buildv3database.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion data/srp_build_files.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
17 changes: 9 additions & 8 deletions v3_buildScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading