GeneRuler_1kb_plus and GeneRuler_Mix

170 views
Skip to first unread message

Fatemeh Arabi

unread,
May 1, 2021, 10:37:36 AM5/1/21
to pydna
Dear Pydna developers,

I have problems with pydna.ladders including GeneRuler_1kb_plus and GeneRuler_Mix. 
The error is:

ValueError Traceback (most recent call last) <ipython-input-130-1acc70743e38> in <module> 1 from pydna.ladders import GeneRuler_Mix 2 from pydna.dseqrecord import Dseqrecord ----> 3 gel([GeneRuler_Mix,[Dseqrecord("A"*100)],[Dseqrecord("A"*600)]]) <ipython-input-120-af0f3efb45d4> in gel(samples, gel_length, margin, interpolator) 63 ((y1 - peak_centre) ** 2)) / (2 * (band_spread**2)) 64 ) * max_intensity ---> 65 for y in range(int(y1), int(y2)): 66 lanes[lane_number][y] += intensity 67 ValueError: cannot convert float NaN to integer

please help me to solve this problem.
Thank you in advance
 
Best

Fatemeh Arabi

unread,
May 2, 2021, 5:35:29 AM5/2/21
to pydna
Dear Pydna developers,

Fisrt, thank you for developing Pydna. I have another question about gel madule. What is the min length of DNA for gel simulation module? I tested 70 and 100 bp dna and the error is:

ValueError Traceback (most recent call last) <ipython-input-183-866dfb5e8ca0> in <module> 1 mix = [Dseqrecord("A"*75), Dseqrecord("A"*100)] ----> 2 gel([GeneRuler_1kb_, mix]) <ipython-input-120-af0f3efb45d4> in gel(samples, gel_length, margin, interpolator) 63 ((y1 - peak_centre) ** 2)) / (2 * (band_spread**2)) 64 ) * max_intensity ---> 65 for y in range(int(y1), int(y2)): 66 lanes[lane_number][y] += intensity 67 
  ValueError: cannot convert float NaN to integer


please help me to solve this problem.
Thank you in advance
 
Best

Message has been deleted
Message has been deleted

pydna

unread,
May 4, 2021, 6:56:32 AM5/4/21
to pydna
Hi, could you tell me which version of pydna you are using ?
import pydna
pydna.__version__

/bjorn

pydna

unread,
May 4, 2021, 8:40:54 AM5/4/21
to pydna
I think that I will need to do a new release of pydna. Look back here in a couple of hours!
/bjorn

Message has been deleted

Fatemeh Arabi

unread,
May 4, 2021, 9:58:21 AM5/4/21
to pydna
Hi, thank you for your kind reply.

I use 4.0.0a2 pydna version.
 
That's great. I'm eagerly waiting to see new release of pydna.
I check this group.

Thank you for everything you've done. I Look Forward to Hearing From You.

Best 
Fatemeh

pydna

unread,
May 5, 2021, 3:57:05 AM5/5/21
to pydna
Hi, the new version 4.0.0a6 should work, see below. 
Let me know if you have difficulties.

from pydna.gel import gel
from pydna.ladders import GeneRuler_1kb_plus
from pydna.dseqrecord import Dseqrecord
mix = [Dseqrecord("A"*75), Dseqrecord("A"*100)]
gel([GeneRuler_1kb_plus, mix])

gel.png

install by :

pip install pydna==4.0.0a6

or

conda install -c bjornfjohansson pydna

Fatemeh Arabi

unread,
May 5, 2021, 4:20:08 AM5/5/21
to pydna
Hi.
First, I want to specifically thank you for taking the time to develop new release of pydna.
Second, I tried new release and I am pleased to inform you that it worked for me.

I have another question, for using these gel images on my paper, I just cite your paper on BMC Bioinformatics, that's right?
Once again, I appreciate everything you have done, and I am looking forward to hearing from you soon.

Best 
Fatemeh

Fatemeh Arabi

unread,
May 5, 2021, 9:56:49 AM5/5/21
to pydna
Hello.
I compared the images of two gels. First on was made by previous release and the second one from new release.
I found that the intensity of bands in ladder have some differences in new release. I think that the pattern of increasing the intensities and also the intensities of 75, 500, 1500 bp length have some problems. Would you, please help me clarify this?
Please find attached images of gel.

Thank you in advance.

Best 
Fatemeh
New release with GeneRuler_1kb_plus ladder.jpg
Old version with GeneRuler_1kb_ ladder.jpg

pydna

unread,
May 6, 2021, 6:48:22 AM5/6/21
to pydna
Hi,
Yes, I removed the outline of the wells to save space.
The two gels have different ladders. Could you specify what you think
is wrong?

cheers,
Björn

Fatemeh Arabi

unread,
May 30, 2021, 9:41:20 AM5/30/21
to pydna
Dear pydna developers,

Hi,
First of all I really appreciate all you have done for my previous problem.

Now, I'm trying to write a code for my program. could you please help me? Thank you in advance.

When I use "if" statement in my code with gel module, I see some errors.

For example, this code:

from pydna.gel import gel
from pydna.ladders import GeneRuler_1kb
from pydna.ladders import GeneRuler_1kb_plus
from pydna.dseqrecord import Dseqrecord
mix = [Dseqrecord("A"*int(lamp1)), Dseqrecord("A"*int(lamp2)), Dseqrecord("A"*int(lamp3)), Dseqrecord("A"*int(lamp4)),Dseqrecord("A"*int(lamp5)),Dseqrecord("A"*int(lamp6)), Dseqrecord("A"*int(lamp7))]
gel([GeneRuler_1kb_plus, mix])
if box1.value == True :
    print("ddddd")
    gel([GeneRuler_1kb_plus, mix])
    
if box2.value == True:
    print("test2") 

...
Each if conditions with gel module, I find errors.

pydna

unread,
May 31, 2021, 6:47:33 AM5/31/21
to pydna
I simplified your example and I ran it without problems. See screenshot.
Hope that this helps. 
/bjorn


from pydna.gel import gel
from pydna.ladders import GeneRuler_1kb_plus
from pydna.dseqrecord import Dseqrecord

lamp1 = 1000

mix = [Dseqrecord("A"*int(lamp1)), ]

gel([GeneRuler_1kb_plus, mix])

if True == True :
    print("ddddd")

g = gel([GeneRuler_1kb_plus, mix])

if True == True:
    print("test2")
    
g.show()


Screenshot from 2021-05-31 11-42-02.png
Message has been deleted

Fatemeh Arabi

unread,
Jun 5, 2021, 3:59:23 PM6/5/21
to pydna
Dear  bjorn,

First please accept my deepest thanks for your help to solve my problem. I appreciate your help so much.

I am trying to use this code and display image using your suggested code in Google Colab. But nothing shows up in the output. 
Will you please help me to solve this problem?
hank you for considering my request.


Best
Fatemeh

pydna

unread,
Jun 7, 2021, 11:07:00 AM6/7/21
to pydna
Hi, I can look into this tonight, Ill let you know tomorrow. 
cheers,
Björn

Fatemeh Arabi

unread,
Jun 8, 2021, 9:20:20 AM6/8/21
to pydna
Hi, I'm waiting for your kind respons.

Best 
Fatemeh

pydna

unread,
Jun 9, 2021, 6:31:44 AM6/9/21
to pydna
Message has been deleted

Fatemeh Arabi

unread,
Jun 9, 2021, 3:28:28 PM6/9/21
to pydna
Thank you for helping me through this problem. I checked the code, that's right without if condition.

The following does not work with if statement, so the graph doesn't show up. I want to use gel module in if statement. The output show up in jupyther notebook, but not in google colab.


Thank you, again.
Best
Fatemeh

pydna

unread,
Jun 10, 2021, 2:03:22 PM6/10/21
to pydna
from IPython.display import display
if True == True:
    print("ok")
    from pydna.gel import gel
    from pydna.ladders import GeneRuler_1kb_plus
   g = gel([GeneRuler_1kb_plus])
   display(g)

Try the code above, it worked for me! /bjorn 

Fatemeh Arabi

unread,
Jun 22, 2021, 7:05:53 AM6/22/21
to pydna
Great. That's worked.
Thank you.

Reply all
Reply to author
Forward
0 new messages