Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framepool can't handle deletions such as "AT"->"" #242

Open
KalinNonchev opened this issue Apr 1, 2021 · 4 comments
Open

Framepool can't handle deletions such as "AT"->"" #242

KalinNonchev opened this issue Apr 1, 2021 · 4 comments

Comments

@KalinNonchev
Copy link
Member

Reproduce:

import kipoi

model = kipoi.get_model("../Framepool", source="dir")
inputs = {
    "ref_seq": "AT",
    "alt_seq": ""
}

model.predict_on_batch(inputs)

results in:

ValueError: Error when checking input: expected input_seq to have 3 dimensions, but got array with shape (1, 0)

Suggestion:

  • Better error message would be helpful if vcf pre-filtering is required to remove this kind of variants
  • Overall, I would just return nan prediction values for incorrect input with a warning
@Hoeze
Copy link
Member

Hoeze commented Apr 1, 2021

@KalinNonchev I agree, there should be a better error message.
But how did you get to an empty alternative sequence?

@KalinNonchev
Copy link
Member Author

@KalinNonchev
Copy link
Member Author

http://grch37.ensembl.org/Homo_sapiens/Transcript/Exons?db=core;g=ENSG00000114115;r=3:139243249-139258561;t=ENST00000483943

Here for example we have only one letter ref 5'UTR seq also, which would result in

inputs = {
    "ref_seq": "A",
    "alt_seq": "G"
}

model.predict_on_batch(inputs)

InvalidArgumentError: Requires start <= limit when delta > 0: 2/1 [[{{node frame_masking_1/arange_2}}]]

Just warning with nan values would be better, instead of exception

@Hoeze
Copy link
Member

Hoeze commented Apr 1, 2021

OK, got it.
Still, I don't think a 1-letter UTR makes sense.

@Karollus Maybe we could add three additional flags:

  • Could not predict (for whatever reason)
  • Reference sequence too short
  • Alternative sequence too short

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants