Benjamin-Lee / Benjamin-Lee/CodonAdaptationIndex

Bug with sequence length

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
38
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I am testing CAI package following your instructions and I got a bug when processing small sequences. My sequence is:

```
>testseq
ATGAAATTAATATTGAAACTCGTGGAACGGAAAAAACTGATCAAGGAGTTAAAAGAAGATATTGAAGTAATTTAA
```

Then, when I execute the program:

```>>> sequence = SeqIO.read("t.fasta", "fasta")
>>> reference = [seq.seq for seq in SeqIO.parse("../database/annotation/1036673.PRJNA67335/1036673.PRJNA67335.ffn", "fasta")]
>>> CAI(sequence, reference=reference)
```

I receive this message:

```Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/dist-packages/CAI/CAI.py", line 220, in CAI
weights = relative_adaptiveness(sequences=reference, genetic_code=genetic_code)
File "/usr/local/lib/python3.7/dist-packages/CAI/CAI.py", line 149, in relative_adaptiveness
RSCUs = RSCU(sequences, genetic_code=genetic_code)
File "/usr/local/lib/python3.7/dist-packages/CAI/CAI.py", line 75, in RSCU
raise ValueError("Input sequence not divisible by three")
ValueError: Input sequence not divisible by three
```

The problem is, this is a coding sequence that we work for long time now and it is divisible in codons (presents even the start and stop codon there). So, I do not know what is misinterpreted by the package. I look forward to hearing from you.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.