-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update schema for donor metadata (#655)
- Loading branch information
1 parent
985e48c
commit 973358d
Showing
28 changed files
with
519 additions
and
233 deletions.
There are no files selected for viewing
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,4 +1,4 @@ | ||
SELECT * | ||
FROM cds.alignment a | ||
INNER JOIN cds.antibody_sequence aseq ON a.sequence_id = aseq.sequence_id | ||
INNER JOIN cds.MAbMetadata mm ON aseq.mab_id = mm.mab_id | ||
INNER JOIN cds.donor_mab_sequence dseq ON a.sequence_id = dseq.sequence_id | ||
INNER JOIN cds.MAbMetadata mm ON dseq.mab_id = mm.mab_id |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
SELECT DISTINCT dms.mab_id, | ||
dms.donor_id | ||
FROM donor_mab_sequence AS dms | ||
WHERE dms.donor_id IS NOT NULL |
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,3 @@ | ||
SELECT * | ||
FROM alignment ali | ||
JOIN donor_mab_sequence AS dms ON dms.sequence_id = ali.sequence_id |
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,12 @@ | ||
SELECT dms.mab_id, | ||
dms.donor_id, | ||
sgl.sequence_id, | ||
sgl.allele, | ||
sgl.percent_identity, | ||
sgl.matches, | ||
sgl.alignment_length, | ||
sgl.score, | ||
sgl.container, | ||
sgl.run_application | ||
FROM sequence_germline AS sgl | ||
JOIN donor_mab_sequence AS dms ON dms.sequence_id = sgl.sequence_id |
15 changes: 15 additions & 0 deletions
15
resources/queries/cds/donor_mab_sequence_header_source.sql
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,15 @@ | ||
SELECT seq.sequence_id, | ||
dms.mab_id, | ||
dms.donor_id, | ||
mab.mab_name_std, | ||
don.donor_code, | ||
sqh.header, | ||
src.source, | ||
seq.sequence_aa, | ||
seq.sequence_nt | ||
FROM sequence seq | ||
JOIN donor_mab_sequence AS dms ON dms.sequence_id = seq.sequence_id | ||
JOIN sequence_header AS sqh ON sqh.sequence_id = seq.sequence_id | ||
JOIN header_source AS src ON src.source_id = sqh.source_id | ||
LEFT JOIN mabMetadata AS mab ON mab.mab_id = dms.mab_id | ||
LEFT JOIN donor_metadata AS don ON don.donor_id = dms.donor_id |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 +1,4 @@ | ||
SELECT * | ||
FROM cds.sequence_germline sg | ||
INNER JOIN cds.antibody_sequence aseq ON sg.sequence_id = aseq.sequence_id | ||
INNER JOIN cds.MAbMetadata mm ON aseq.mab_id = mm.mab_id | ||
INNER JOIN cds.donor_mab_sequence dseq ON sg.sequence_id = dseq.sequence_id | ||
INNER JOIN cds.MAbMetadata mm ON dseq.mab_id = mm.mab_id |
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.