You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "", line 1, in
File "/Users/kcorreia/opt/anaconda3/lib/python3.8/site-packages/pydna/gel.py", line 70, in gel
for y in range(int(y1), int(y2)):
ValueError: cannot convert float NaN to integer
@kcorreia and thanks for taking your time to report this.
The default interpolator goes down to 75 bp. It is based on the data from the GeneRuler_1kb_plus list in the ladders.py module. There is another one called HI_LO_DNA_MARKER that goes down to 50 bp.
If you need even smaller ones, you need to make a list yourself, which is very easy. Get a gel image with bands that cover you use case, make a similar list but with the new sizes and Rf values calculated from the gel with
a screen ruler (https://www.rapidtables.com/web/tools/pixel-ruler.html) or gimp.
from pydna.gel import gel, interpolator
from pydna.ladders import HI_LO_DNA_MARKER
gel([ HI_LO_DNA_MARKER,[pcr_prod]], interpolator=interpolator(HI_LO_DNA_MARKER))
Perhaps you can tell me about your use case? Are you going to need less than 50 bp?
I don't really need an image of bands of less than 75 or 50bp as those can be hard to see on a real gel anyway. At a minimum would be nice to raise an Exception about the size restriction.
I digest linear fragment and plasmid sequences and want to see what it looks like on a virtual gel. That way I can compare it with an actual gel, rather than reading a fragment list size and visualizing it on a real gel as I have done for many years.
As of now, I filter the fragment list so that only fragments longer than 75bp are shown on the virtual gel.
`
from pydna.ladders import PennStateLadder
from pydna.gel import gel
from pydna.dseqrecord import Dseqrecord
sample_1 = [Dseqrecord('A'*1000),Dseqrecord('A'*80),Dseqrecord('A'*50)]
sample_2 = [Dseqrecord('A'*1000),Dseqrecord('A'*80)]
gel( [PennStateLadder, sample_1 ])
Traceback (most recent call last):
File "", line 1, in
File "/Users/kcorreia/opt/anaconda3/lib/python3.8/site-packages/pydna/gel.py", line 70, in gel
for y in range(int(y1), int(y2)):
ValueError: cannot convert float NaN to integer
gel( [PennStateLadder, sample_2 ])
<PIL.Image.Image image mode=RGB size=180x600 at 0x7F8E88447CD0>
`
Didn't test the exact cutoff but it looks like between 70-75 bp.
The text was updated successfully, but these errors were encountered: