Conversation
ielis
left a comment
There was a problem hiding this comment.
Hi,
thanks a lot for the code!
I have two comments, please see below. The get_allele_frequency might need to be updated, and pls consider the other comment as well. Apart from these issues, the code looks good to me.
|
Yes, I agree with you. On the one hand, I decided to go through the possible alternatives alleles in case there is more than one, keeping the index stored and then splicing the corresponding AF tuple with it. I am assuming the AFs are in the same order as the alleles alts. On the other hand, I created a separate function to check the errors separately, I kept the |
|
It's true that can induce bugs, I didn't realize, so I just kept the second part of the method. Making sure that the alternative allele given in the |
Create a method to get the allele frequency from the GnomAD's VCF file. Usually, the alleles frequencies are in a tuple of an unique float, but there could be a list, so I tried to manage all the possibilities, even if it does not have an AF (None).
Change the assertions to exceptions in the
prepare_alt_seqfunction. I think the pastAssertionErrorwas too prohibitive and when I was plotting the results, I found impossible to continue with them. So, I thought it handling them asExceptionErrorwas a better way to proceed.Make personalized errors messages for better readability and update corresponding error test.