Closed ThomasGro closed 11 months ago
Hi @ThomasGro,
Thank you for reaching out! I just checked the vr file you shared. It looks like the start locations of the variants in your data are -1 from their respective end location (see image). )
I was not aware that this was allowed in a vRanges object. Seems also strange to me that the start location lies behind the end location of the variant. Or is there a reason for this?
I'll check how to fix this and add some tests for this particular problem in the future. For now, the following works on my machine:
vr2 <- vr |>
as_tibble() |>
mutate(
start = start -1
) |>
GenomicRanges::makeGRangesFromDataFrame(keep.extra.columns = TRUE) |>
VariantAnnotation::makeVRangesFromGRanges()
kd <- detectKataegis(vr2, aggregateRecords = TRUE)
Thank you, for the investigation.
The point is that I set for your MAF test file: makeGRangesFromDataFrame(starts.in.df.are.0based=TRUE)
This led to the shift in the start position. However, I belief MAF files usually are 0-based, whereas VCFs are 1-based.
Best, Thomas From: Daan Hazelaar @.> Sent: Freitag, 8. Dezember 2023 17:44 To: ErasmusMC-CCBC/katdetectr @.> Cc: Thomas Grombacher @.>; Mention @.> Subject: Re: [ErasmusMC-CCBC/katdetectr] VRange input error (Issue #8)
[WARNING - EXTERNAL EMAIL] Do not open links or attachments unless you recognize the sender of this email. If you are unsure please click the button "Report suspicious email"
Thank you for reaching out! I just checked the vr file you shared. It looks like the start locations of the variants in your data are -1 from their end location (see image). Screenshot.2023-12-08.at.17.35.41.png (view on web)https://urldefense.com/v3/__https:/github.com/ErasmusMC-CCBC/katdetectr/assets/55545896/fe9dd3ed-67be-4c55-bb15-086132c25ba1__;!!Eu8ikxSnpXkBCg!ehptsqoIoRPrvna2sWVo7MGThZX1GM04_b4gXr6R_aIg-EU5C2DRChPJUI8UaxpBIX35g9jzA1mqj0g3apMfT8wAFhnxl83rnig$ )
I was not aware that this was allowed in a vRanges object. Seems also strange to me that the start location lies behind the end location of the variant. Or is there a reason for this?
I'll check how to fix this and add some tests for this particular problem in the future. For now, the following works on my machine:
vr2 <- vr |>
as_tibble() |>
mutate(
start = start -1
) |>
GenomicRanges::makeGRangesFromDataFrame(keep.extra.columns = TRUE) |>
VariantAnnotation::makeVRangesFromGRanges()
kd <- detectKataegis(vr2, aggregateRecords = TRUE)
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ErasmusMC-CCBC/katdetectr/issues/8*issuecomment-1847506810__;Iw!!Eu8ikxSnpXkBCg!ehptsqoIoRPrvna2sWVo7MGThZX1GM04_b4gXr6R_aIg-EU5C2DRChPJUI8UaxpBIX35g9jzA1mqj0g3apMfT8wAFhnx-2yfQeQ$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AENMOYIXBBNNITOHSJS2CIDYIM7VVAVCNFSM6AAAAABAM3QQSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGUYDMOBRGA__;!!Eu8ikxSnpXkBCg!ehptsqoIoRPrvna2sWVo7MGThZX1GM04_b4gXr6R_aIg-EU5C2DRChPJUI8UaxpBIX35g9jzA1mqj0g3apMfT8wAFhnx5BrUTQs$. You are receiving this because you were mentioned.Message ID: @.**@.>>
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith.
Click merckgroup.com/disclaimerhttps://www.merckgroup.com/en/legal-disclaimer/mail-disclaimer.html to access the German, French, Spanish, Portuguese, Turkish, Polish and Slovak versions of this disclaimer.
Please find our Privacy Statement information by clicking here: merckgroup.com/privacy-statements-by-locationhttps://www.merckgroup.com/en/privacy-statement/privacy-statements-by-location.html
Hi @ThomasGro,
Aah thank you for the explanation! Do you perhaps have a recommendation for how I should deal with this?
I was thinking about adding tests that let the user now that the start location >= end location. But if this a common way of describing variant locations perhaps I should incorporate this in a different way? Any suggestions are much appreciated!
Kind regards, Daan Hazelaar
Hello Daan, you may want to look here: https://genomewiki.ucsc.edu/index.php/Coordinate_Transforms
The 0-based system has SNV coordinates like start = 0 end =1 Whereas 1-based systems has SNV coordinates like start = 1 end = 1
Length of the range of 0-based systems is (end-start) and in 1-base systems (end-(start-1)).
Best, Thomas From: Daan Hazelaar @.> Sent: Dienstag, 12. Dezember 2023 10:37 To: ErasmusMC-CCBC/katdetectr @.> Cc: Thomas Grombacher @.>; Mention @.> Subject: Re: [ErasmusMC-CCBC/katdetectr] VRange input error (Issue #8)
[WARNING - EXTERNAL EMAIL] Do not open links or attachments unless you recognize the sender of this email. If you are unsure please click the button "Report suspicious email"
Aah thank you for the explanation! Do you perhaps have a recommendation for how I should deal with this?
I was thinking about adding tests that let the user now that the start location >= end location. But if this a common way of describing variant locations perhaps I should incorporate this in a different way? Any suggestions are much appreciated!
Kind regards, Daan Hazelaar
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ErasmusMC-CCBC/katdetectr/issues/8*issuecomment-1851650985__;Iw!!Eu8ikxSnpXkBCg!fSjwJJ0Mrpkme8RK9ZmcIE7dsbks7pBmQIqOnJxi_WaHlt8pY6_pYNDmGWFce-DHndtE6fqfRkNcHZx3UtKVsSSqXtSPrwnkXlY$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AENMOYJSTPP24VDMASL2WTTYJAQVBAVCNFSM6AAAAABAM3QQSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRGY2TAOJYGU__;!!Eu8ikxSnpXkBCg!fSjwJJ0Mrpkme8RK9ZmcIE7dsbks7pBmQIqOnJxi_WaHlt8pY6_pYNDmGWFce-DHndtE6fqfRkNcHZx3UtKVsSSqXtSPnv5_BTY$. You are receiving this because you were mentioned.Message ID: @.**@.>>
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith.
Click merckgroup.com/disclaimerhttps://www.merckgroup.com/en/legal-disclaimer/mail-disclaimer.html to access the German, French, Spanish, Portuguese, Turkish, Polish and Slovak versions of this disclaimer.
Please find our Privacy Statement information by clicking here: merckgroup.com/privacy-statements-by-locationhttps://www.merckgroup.com/en/privacy-statement/privacy-statements-by-location.html
Hi @ThomasGro,
0 based or 1 based does not matter for Katdetectr. as long as: start >= end, everything is fine.
In the data file you supplied: start < end, for this things brake in Katdetectr at least. That's where to problem comes from. Right?
Kind regards, Daan Hazelaar
I want to use a VRange object as input and tried it first with your MAF file as source, filtered for "SNP". Running 'detectKataegis(genomicVariants = vr, aggregateRecords = TRUE)' returns error. I belief the "sampleNames(vr)" are not used?! which leads to duplicated entries.
vr.zip