Skip to content

Commit

Permalink
[Dataspace] Add support to import and store B-Cell Receptor (BCR) dat…
Browse files Browse the repository at this point in the history
…a - Client Requested Changes 4 (#592)

* Add new queries. Add field descriptions
* Schema updates
* Update sample data
  • Loading branch information
labkey-bpatel authored Jul 18, 2023
1 parent e9c44d1 commit 319acb9
Show file tree
Hide file tree
Showing 8 changed files with 478 additions and 123 deletions.
11 changes: 11 additions & 0 deletions resources/queries/cds/antibody_sequence_header_source.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
SELECT
aseq.mab_id,
seqs.sequence_id,
shed.header,
hsrc.source,
seqs.sequence_nt,
aseq.lineage
FROM sequence seqs
JOIN antibody_sequence AS aseq ON aseq.sequence_id = seqs.sequence_id
JOIN sequence_header AS shed ON shed.sequence_id = seqs.sequence_id
JOIN header_source AS hsrc ON hsrc.source_id = shed.source_id
98 changes: 98 additions & 0 deletions resources/queries/cds/lineage_alignment.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
aseq.mab_id,
algn.sequence_id,
algn.locus,
algn.stop_codon,
algn.vj_in_frame,
algn.productive,
algn.rev_comp,
algn.complete_vdj,
algn.v_call,
algn.d_call,
algn.j_call,
algn.sequence_alignment,
algn.germline_alignment,
algn.sequence_alignment_aa,
algn.germline_alignment_aa,
algn.v_alignment_start,
algn.v_alignment_end,
algn.d_alignment_start,
algn.d_alignment_end,
algn.j_alignment_start,
algn.j_alignment_end,
algn.v_sequence_alignment,
algn.v_sequence_alignment_aa,
algn.v_germline_alignment,
algn.v_germline_alignment_aa,
algn.d_sequence_alignment,
algn.d_sequence_alignment_aa,
algn.d_germline_alignment,
algn.d_germline_alignment_aa,
algn.j_sequence_alignment,
algn.j_sequence_alignment_aa,
algn.j_germline_alignment,
algn.j_germline_alignment_aa,
algn.fwr1,
algn.fwr1_aa,
algn.cdr1,
algn.cdr1_aa,
algn.fwr2,
algn.fwr2_aa,
algn.cdr2,
algn.cdr2_aa,
algn.fwr3,
algn.fwr3_aa,
algn.fwr4,
algn.fwr4_aa,
algn.cdr3,
algn.cdr3_aa,
algn.junction,
algn.junction_length,
algn.junction_aa,
algn.junction_aa_length,
algn.v_score,
algn.d_score,
algn.j_score,
algn.v_cigar,
algn.d_cigar,
algn.j_cigar,
algn.v_support,
algn.d_support,
algn.j_support,
algn.v_identity,
algn.d_identity,
algn.j_identity,
algn.v_sequence_start,
algn.v_sequence_end,
algn.v_germline_start,
algn.v_germline_end,
algn.d_sequence_start,
2
algn.d_sequence_end,
algn.d_germline_start,
algn.d_germline_end,
algn.j_sequence_start,
algn.j_sequence_end,
algn.j_germline_start,
algn.j_germline_end,
algn.fwr1_start,
algn.fwr1_end,
algn.cdr1_start,
algn.cdr1_end,
algn.fwr2_start,
algn.fwr2_end,
algn.cdr2_start,
algn.cdr2_end,
algn.fwr3_start,
algn.fwr3_end,
algn.fwr4_start,
algn.fwr4_end,
algn.cdr3_start,
algn.cdr3_end,
algn.np1,
algn.np1_length,
algn.np2,
algn.np2_length,
algn.run_application,
aseq.lineage
FROM alignment AS algn
JOIN antibody_sequence AS aseq ON algn.sequence_id = aseq.sequence_id
14 changes: 14 additions & 0 deletions resources/queries/cds/lineage_sequence_germline.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SELECT
aseq.mab_id,
sgrm.allele,
sgrm.sequence_id,
sgrm.percent_identity,
sgrm.matches,
sgrm.alignment_length,
sgrm.score,
sgrm.run_application,
pref.status AS preferred_status,
aseq.lineage
FROM sequence_germline AS sgrm
JOIN antibody_sequence AS aseq ON sgrm.sequence_id = aseq.sequence_id
LEFT JOIN preferred_allele AS pref ON pref.sequence_id = sgrm.sequence_id AND pref.allele = sgrm.al
Loading

0 comments on commit 319acb9

Please sign in to comment.