Skip to content

Instantly share code, notes, and snippets.

@cbare
Created September 9, 2015 00:00
Show Gist options
  • Select an option

  • Save cbare/862caabbc97bf8d73ddd to your computer and use it in GitHub Desktop.

Select an option

Save cbare/862caabbc97bf8d73ddd to your computer and use it in GitHub Desktop.
Add a new sample to the SMC-DNA challenge
## SMC-DNA challenges are configured by entries in the table smc-dna-config,
## which lives in the MutationCallingChallengeStaging project, here:
## https://www.synapse.org/#!Synapse:syn4686078
## To add a new sample:
## create new evaluation queue (one for each of SNV, SV and possibly indel)
evaluation_snv = syn.store(Evaluation(
name="synthetic.challenge.set6.snv",
description="ICGC-TCGA Mutation Calling Challenge - synthetic tumor 6",
contentSource="syn2177211"))
## you've uploaded a truth vcf file to a non-public folder, right?
truth = syn.get(...TRUTH_FILE_SYN_ID...)
## each row of the smc-dna-config table configures one evaluation queue
new_rows = [[
evaluation_snv.id, ## Eval_id
truth.id, ## Truth_id
"synthetic_6", ## Tumor
"snv", ## Mode
"Synthetic 6 SNV", ## Title
"Mask", ## Score_columns
"2016-01-31 00:00:00", ## Deadline
"evaluator" ## Eval_code
]]
## get smc-dna-config table's schema:
schema = syn.get('syn4686078')
## upload the rows to Synapse
table = syn.store(Table(schema, new_rows))
@cbare
Copy link
Copy Markdown
Author

cbare commented Sep 9, 2015

This is a template. This code will not work as is, but should be used in an interactive Python session to create the needed artifacts - evaluation queues and entries in the configuration table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment