Created
September 9, 2015 00:00
-
-
Save cbare/862caabbc97bf8d73ddd to your computer and use it in GitHub Desktop.
Add a new sample to the SMC-DNA challenge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 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)) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.