observedMutations error message SHazaM

Issue #146 resolved
Habib Bashour created an issue

Hello,
I am trying to calculate the replacement and silent mutations count of the attached data tibble.
I have firstly used this following code:

 observedMutations(test_tibble, sequenceColumn="target_seq",
                  germlineColumn="germline_alignment",
                  regionDefinition=NULL,
                  mutationDefinition=CHARGE_MUTATIONS,
                  frequency=FALSE) 

I received this error “Error in { : task 1 failed - "sum(tab) == 1 is not TRUE"
I then tried to test if the command will work when trimming the germline_alignment column to the same length as the target_seq, and repeated as follows:

observedMutations(test_tibble, sequenceColumn="target_seq",
                  germlineColumn="germline_trim",
                  regionDefinition=NULL,
                  mutationDefinition=CHARGE_MUTATIONS,
                  frequency=FALSE) 

However, this did not work either and gave the same error “Error in { : task 1 failed - "sum(tab) == 1 is not TRUE”. I tried to run only few lines (test_tibble[1,]) or head(test_tibble,10), and received the same error as well.
Can you please look into this issue,
Thanks!

Comments (2)

  1. ssnn

    Hello!

    The error comes from your sequences having invalid characters (_), that cannot be translated correctly to codons. Gaps should ulse -, and IMGT alignment gaps should use . Also your sequences are not aligned. You should provide aligned sequences, for the mutations to be identified correctly.

    > db[[sequenceColumn]][1]
    [1] "CAGGTGCAGCTGGTGCAGTCTGGGGCTGAGGTGAAGAAGCCTGGGGCCTCAGTGAAGGTCTCCTGCAAGGCTTCTGGATACACCTTCACCAGTTATGATATCAACTGGGTGCGACAGGCCACTGGACAAGGGCTTGAGTGGATGGGATGGATGAACCCTAACAGTGGTAACACAGGCTATGCACAGAAGTTCCAGGGCAGAGTCACCATGACCAGGAACACCTCCATAAGCACAGCCTACATGGAGCTGAGCAGCCTGAGATCTGAGGACACGGCCGTGTATTAC"
    > db[[germlineColumn]][1]
    [1] "CAGGTGCAGCTGGTGCAGTCTGGGGCTGAGGTGAAGAAGCCTGGGGCCTCAGTGAAGGTCTCCTGCAAGGCTTCT_GGATACACCTTCACCAGTTATGAT_ATCAACTGGGTGCGACAGGCCACTGGACAAGGGCTTGAGTGGATGGGATGG_ATGAACCCTAACAGTGGTAACACA_GGCTATGCACAGAAGTTCCAGGGCAGAGTCACCATGACCAGGAACACCTCCATAAGCACAGCCTACATGGAGCTGAGCAGCCTGAGATCTGAGGACACGGCCGTGTATTACTGT"
    

  2. Log in to comment