transmart / transmart-extensions Goto Github PK
View Code? Open in Web Editor NEWElements that are being collected for refactoring but do not yet have a home. This project needs to be reviewed often!
Elements that are being collected for refactoring but do not yet have a home. This project needs to be reviewed often!
Hi,
I created new database from transmart-data master branch and it looks like biomart.bio_data_uuid doesn't contains records for bio_assay_platform (which used for "Add new analysis" and "Add new assay" on "Browse" tab). I tried to insert them manually using following command:
insert into biomart.bio_data_uid
(bio_data_id, unique_id, bio_data_type)
select p.bio_assay_platform_id, 'BAP:' || platform_accession, 'BIO_ASSAY_PLATFORM'
from biomart.bio_assay_platform p
left join biomart.bio_data_uid uid
on uid.bio_data_id = p.bio_assay_platform_id and uid.bio_data_type = 'BIO_ASSAY_PLATFORM'
where uid.bio_data_id is null;
but it fails with error:
ERROR: duplicate key value violates unique constraint "bio_data_uid_pk"
DETAIL: Key (bio_data_id)=(169331) already exists.
I checked this id and it is already occupied by BIO_CONCEPT_CODE:
169331;"ASSAY_TYPE_OF_BM_STUDIED:PROTEIN";"BIO_CONCEPT_CODE"
The easiest way to avoid this problem from my point of view it make unique contraint by pair (bio_data_type, bio_data_id) and looking for unique code using filter by type additional to filter by id.
BioData data = BioData.get(id);
should be replaced with something like:
BioData data = BioData.findWhere(id: id, type: "BIO_ASSAY_PLATFORM");
It can be incapsulated into BioData to just provide method like:
BioData.getUniqueId(platform)
Please, let me know what do you think about it and may be I'm doing something wrong. I can provide pull request if you like for this solution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.