Repository navigation
Handle SV in hypsipyle - #65
likhitha-surapaneni merged 61 commits into
Conversation
richysix
left a comment
There was a problem hiding this comment.
Let me know if any of the comments aren't clear.
Rich
| """ | ||
| return structural_variant.get_alleles() | ||
|
|
||
|
|
There was a problem hiding this comment.
I can't find resolver functions for @STRUCTURAL_VARIANT_ALLELE_TYPE length and copy_number
For copy number it returns null, but for length it causes an error because the schema says length can't be null
query structural_variant_allele_type {
structural_variant(
by_id: {
genome_id: "a7335667-93e7-11ec-a39d-005056b38ce3",
variant_id: "1:46000:nsv4514092"
}
) {
name
alleles {
name
copy_number
length
}
}
}
{
"data": {
"structural_variant": {
"name": "nsv4514092",
"alleles": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
}
},
"errors": [
{
"message": "Cannot return null for non-nullable field StructuralVariantAllele.length.",
"locations": [
{
"line": 12,
"column": 7
}
],
"path": [
"structural_variant",
"alleles",
0,
"length"
]
},
...
}
There was a problem hiding this comment.
Hi @richysix , made a fix to add these resolvers, please let me know if it works as expected
|
richysix
left a comment
There was a problem hiding this comment.
Comments are mostly typos and whitespace, but there's one about allele_type for the reference allele in common/file_model/structural_variant.py.
| }, | ||
| { | ||
| "allele_name": "deletion", | ||
| "stable_id": "ENST00000831254" | ||
| }, | ||
| { | ||
| "allele_name": "deletion" |
There was a problem hiding this comment.
Is this the reference allele?
For SNVs, the reference allele has type biological_region. Should that be the same for structural variants? See my comment in structural_variant.py
| if allele == self.ref: | ||
| allele_type = "biological_region" | ||
| so_term = "SO:0001411" |
There was a problem hiding this comment.
For the reference allele, svtype gets set to None, so the if svtype: block doesn't run and the ref allele ends up with a type based on the ALT alleles
For SNVs and small indels, the REF allele type is "biological_region", so I'm assuming that should also happen here.
There was a problem hiding this comment.
Hi @richysix , this should now be fixed. I separated the logic for get_allele_type for structural_variant and structural_variant_allele as it is getting a bit complex. Similar behaviour for short variants
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
Co-authored-by: Richard White <richysix@users.noreply.github.com>
|
Confirm the folder structure with downstream pipeline before merging |
Test data: NW-52
HGSVC3 data: NW-136
Plants data: NW-148
Accessioned human data: NW-102
Example query:
examples/structural_variation/query.graphqlTesting:
Setup hypsipyle following README.md
Test with new data structure with the example query and check if the response matches example response
Ensembl VDM docs