-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tomáš Houfek
committed
Oct 22, 2024
1 parent
6bf26be
commit 7397437
Showing
17 changed files
with
213 additions
and
115 deletions.
There are no files selected for viewing
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import molgenis.client | ||
|
||
|
||
session = molgenis.client.Session("http://147.251.124.190:8080/api/") | ||
session.login("admin", "admin") | ||
|
||
table = session.get("fair-genomes_Analysis") | ||
print(table) |
This file contains 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
Binary file modified
BIN
-85 Bytes
(98%)
tests/__pycache__/test_miseq_sample_metadata.cpython-310-pytest-8.3.2.pyc
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
Binary file modified
BIN
-40 Bytes
(99%)
uploader/metadata_managers/__pycache__/miseq_sample_metadata.cpython-310.pyc
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
class IndividualConsent: | ||
from uploader.molgenis_models.MolgenisObject import MolgenisObject | ||
|
||
|
||
class IndividualConsent(MolgenisObject): | ||
|
||
TYPE = "fair-genomes_IndividualConsent" | ||
|
||
def __init__(self, patient_dict): | ||
sample = patient_dict["samples"][0] | ||
sample = patient_dict["samples"][0] | ||
self.IndividualConsentIdentifier = patient_dict["ID"].replace("patient", "consent") | ||
self.PersonConsenting = patient_dict["ID"] | ||
self.ConsentFormUsed = "mmci_consentform_1" | ||
self.CollectedBy= "Masaryk Memorial Cancer Institute" | ||
self.SigningDate = sample["freeze_time"] if sample["material"] == "tissue" else sample["taking_date"] | ||
self.CollectedBy = "Masaryk Memorial Cancer Institute" | ||
self.SigningDate = sample["freeze_time"] if sample["material"] == "Tissue" else sample["taking_date"] | ||
self.RepresentedBy = "patient" | ||
self.DataUsePermissions = "general research use" | ||
self.DataUsePermissions = "general research use" | ||
|
||
def add_to_catalog_if_not_exist(self, session): | ||
analysis_ids = [val["IndividualConsentIdentifier"] for val in session.get(self.TYPE)] | ||
if self.IndividualConsentIdentifier not in analysis_ids: | ||
self._add_to_catalog(session) | ||
|
||
def _add_to_catalog(self, session): | ||
data_dict = self.serialize | ||
session.add_all(self.TYPE, [data_dict]) |
This file contains 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
Oops, something went wrong.