'DataCustodianEmail':'*****@*****.**', 'CollaborativeGroup':'Prostate and Urologic', 'OrganSite':'Pancreas', 'UpdateCollection':'true', # default value = true } # upload dataset staged in directory $LABCAS_STAGING/<product_type>/<dataset_id> labcasClient.uploadCollection(dataset_name, metadata) # update the dataset metadata WITHOUT generating a new version metadata['ProtocolId'] = '99' labcasClient.uploadCollection(dataset_name, metadata) # update dataset metadata while generating a new version metadata['LeadPI'] = 'Mister X' labcasClient.uploadCollection(dataset_name, metadata, newVersion=True) # list all product types in File manager labcasClient.listProductTypes() # query the product types from the XML/RPC File Manager interface labcasClient.getProductTypeByName(product_type) # or equivalently labcasClient.getProductTypeById("urn:edrn:%s" % product_type) # list all products for given product type labcasClient.listProducts(product_type)
labcasClient = LabcasClient() # product type metadata (to be submitted as part of upload workflow) metadata = { # required 'DatasetName':'Autoantibody Biomarkers', 'ProtocolId':'138', 'ProtocolName':'Validation of Protein Markers for Lung Cancer Using CARET Sera and Proteomics Techniques', 'LeadPI':'Samir Hanash', 'DataCustodian':'Ji Qiu', 'DataCustodianEmail':'*****@*****.**', 'CollaborativeGroup':'Lung and Upper Aerodigestive', 'OwnerPrincipal':'/Samir/Hanash', # optional 'OrganSite':'Lung', 'SiteName':'Fred Hutchinson Cancer Research Center (Biomarker Developmental Laboratories)', 'SiteShortName':'FHCRC', 'QAState':'Accepted', 'PubMedId':'http://www.ncbi.nlm.nih.gov/pubmed/18794547', 'DateDatasetFrozen':'2007/05/29', } # upload dataset staged in directory 'mydata' labcasClient.uploadDataset(datasetId, metadata) # query the product types from the XML/RPC File Manager interface labcasClient.getProductTypeByName(datasetId) # list all products for given dataset == product type labcasClient.listProducts(datasetId)