コード例 #1
0
# Example script to execute the "labcas-test" workflow

from gov.nasa.jpl.edrn.labcas.labcas_client import LabcasClient

if __name__ == '__main__':
    
    # submit workflow
    # ./wmgr-client --url http://localhost:9001 --operation --sendEvent --eventName labcas-test --metaData --key experiment 11 --key species snakes
    labcasClient = LabcasClient()
    wInstId = labcasClient.executeWorkflow(['urn:edrn:LabcasTestInit','urn:edrn:LabcasTestTask'], 
                                           {'experiment':'11', 
                                            'species':'snakes' } )

    # monitor workflow instance
    labcasClient.waitForCompletion(wInstId)

    # list all files of this product type
    labcasClient.listProducts('LabCAS_Test_Product')
コード例 #2
0
# Python script for programmatic execution of the AF workflow
# (and consequent publishing of UnivColoLungImages)

from gov.nasa.jpl.edrn.labcas.labcas_client import LabcasClient

if __name__ == '__main__':

    # upload these datasets    
    #dataset_names = ['UCHSC_1467', 'UCHSC_8798']
    #dataset_names = ['UCHSC_1467']
    dataset_names = ['UCHSC_8798']
    product_type = 'University_of_Colorado_Lung_Image'
    
    for dataset_name in dataset_names:
    
        # submit workflow
        # ./wmgr-client --url http://localhost:9001 --operation --sendEvent --eventName waf --metaData --key DatasetId UCHSC_1001
        labcasClient = LabcasClient()
        wInstId = labcasClient.executeWorkflow(['urn:edrn:WafInitTask',
                                                'urn:edrn:WafCrawlTask'], 
                                               { 'DatasetName':dataset_name },
                                               )
        # monitor workflow instance
        labcasClient.waitForCompletion(wInstId)
        
        # list all products for given product type
        labcasClient.listProducts(product_type)
コード例 #3
0
ファイル: upload_hanash.py プロジェクト: EDRN/labcas-backend
        
    # 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)