Skip to content

Commit

Permalink
Hot fixes (#365)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Yu <[email protected]>
  • Loading branch information
thomasyu888 and Thomas Yu authored Nov 5, 2020
1 parent 7b04b81 commit 957fd89
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
47 changes: 26 additions & 21 deletions genie/dashboardTemplate.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -349,37 +349,42 @@ possible_retracted = public_sampledf[!exist_idx & !in_db_samples_idx,
# Determine if sample is explicitly or implicitly retracted
# assume most samples are implicitly retracted
possible_retracted$RETRACTION = "implicit"
# Get explicitly retracted
retracted_patient = synTableQuery(
sprintf("select geniePatientId from %s", patient_retract_synid)
)
retracted_patientdf = retracted_patient$asDataFrame()
retracted_sample = synTableQuery(
sprintf("select genieSampleId from %s", sample_retract_synid)
)
retracted_sampledf = retracted_sample$asDataFrame()
retracted_patients_idx = possible_retracted$PATIENT_ID %in%
retracted_patientdf$geniePatientId
retracted_samples_idx = possible_retracted$SAMPLE_ID %in%
retracted_sampledf$genieSampleId
possible_retracted$RETRACTION[
retracted_patients_idx & retracted_samples_idx
] = 'explicit'
if (nrow(possible_retracted) > 0) {
possible_retracted$RETRACTION = "implicit"
# Get explicitly retracted
retracted_patient = synTableQuery(
sprintf("select geniePatientId from %s", patient_retract_synid)
)
retracted_patientdf = retracted_patient$asDataFrame()
retracted_sample = synTableQuery(
sprintf("select genieSampleId from %s", sample_retract_synid)
)
retracted_sampledf = retracted_sample$asDataFrame()
retracted_patients_idx = possible_retracted$PATIENT_ID %in%
retracted_patientdf$geniePatientId
retracted_samples_idx = possible_retracted$SAMPLE_ID %in%
retracted_sampledf$genieSampleId
possible_retracted$RETRACTION[
retracted_patients_idx & retracted_samples_idx
] = 'explicit'
}
write.csv(possible_retracted, "samples_to_retract.csv", row.names=F, quote=F)
ent = synStore(File("samples_to_retract.csv", parent=release_synid))
unlink("samples_to_retract.csv")
```

This table below lists the number of samples explicitly or implicitly retracted by centers.


```{r}
kable(table(possible_retracted$CENTER, possible_retracted$RETRACTION))
if (nrow(possible_retracted) > 0) {
kable(table(possible_retracted$CENTER, possible_retracted$RETRACTION))
} else {
kable(possible_retracted)
}
```

These sample/patient IDs have been marked for retraction from GENIE: `r paste0("https://www.synapse.org/#!Synapse:", ent$properties$id)` and have been removed from the GENIE database. However, removal from public release files occurs according to the following fixed schedule. Please apprise your patients of this schedule so that they are aware of the timeline for retraction of their data. If you see samples that should not be retracted, please upload a fix to your data or let Tom Yu from Sage know immediately.
Expand Down
2 changes: 1 addition & 1 deletion genie/database_to_staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def store_file(syn, filePath, genieVersion="database", name=None,
if cBioFileFormat is not None:
ent.cBioFileFormat = cBioFileFormat
if tag_or_commit is None:
tag_or_commit = f"v{__version__.__version__}"
tag_or_commit = f"v{__version__}"
ent = syn.store(
ent,
used=f"https://github.com/Sage-Bionetworks/Genie/tree/{tag_or_commit}"
Expand Down

0 comments on commit 957fd89

Please sign in to comment.