本文整理匯總了Python中synapseclient.File.sampleId方法的典型用法代碼示例。如果您正苦於以下問題:Python File.sampleId方法的具體用法?Python File.sampleId怎麽用?Python File.sampleId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類synapseclient.File
的用法示例。
在下文中一共展示了File.sampleId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: upload
# 需要導入模塊: from synapseclient import File [as 別名]
# 或者: from synapseclient.File import sampleId [as 別名]
def upload(args,syn):
if args.dataType == "rnaseq":
parentId = "syn6034916"
pipeline = "syn6126122"
dataType = "RNASeq"
elif args.dataType == "dnaseq":
parentId = "syn6034751"
pipeline = "syn6126123"
dataType = "TargDNASeq"
elif args.dataType == "snparray":
parentId = "syn6038475"
pipeline = "syn6126121"
dataType = "SNParray"
elif args.dataType == "exparray":
parentId = "syn6038915"
pipeline = "syn6126120"
dataType = "expression_microarray"
elif args.dataType == "exome":
parentId = "syn6115597"
dataType = "exome"
pipeline = ""
else:
raise ValueError("dataType needs to be rnaseq/dnaseq/snparray/exparray/exome")
if args.workflow is not None:
workflow = syn.get(pipeline,downloadFile=False)
workflow.path = args.workflow
workflow.name = os.path.basename(args.workflow)
workflow = syn.store(workflow)
pipeline = workflow.id
fileEnt = File(args.input,parent=parentId)
#fileEnt.annotations = temp.to_dict('index').values()[0]
fileEnt.dataType = dataType
fileEnt.sampleId = sampleId
fileEnt = syn.store(fileEnt,used = pipeline)
return(fileEnt.id)