phetsims / gene-expression-essentials

An educational simulation about how genes work to create proteins.
GNU General Public License v3.0
4 stars 6 forks source link

Oddly shaped mRNA produced #102

Closed BryceAG closed 6 years ago

BryceAG commented 6 years ago

Related to phetsims/QA#58

Testing with iPad Air 2 (Dalton), some oddly shaped mRNA were produced. One was just a little horizontal nub: image

and the other was still a squiggle, but smaller than it should have been: image

The nub seems to be produced as an additional mRNA from gene 3, and the small squiggle seems to be made as the mRNA from gene 1. Both can be have destroyers and ribosomes attached to them, but the nub will freeze the screen when connected to ribosome. Destroyers can get rid of both. image image The small squiggle basically acts like a normal gene 1 mRNA: image

Also the nub itself can not be dragged, but the squiggle can.

I found this while rapidly switching back and forth between next and previous genes while polymerase was creating mRNA. it may also be produces by switching from Expression section to mRNA section and back.

this might be a result of #65 ?

BryceAG commented 6 years ago

Testing with @jbphet and @phet-steele we found that it was actually reproduced when two polymerases were transcribing at the same time, and while the first one was reforming at the end, the second one caught up and pushed it off before it finished reforming. The still slightly deformed polymerase could then reattach itself anywhere in the transcribing region, and would start to form mRNA but would not be able to finish before it reached the end of the transcribing region. It had nothing to do with switching genes, and can be reproduces on multiple OSs and browsers.

Sometimes the deformation is more apparent than others. If the deformed polymerase is put right on top of another polymerase that is transcribing, they will play tag and a lot of small mRNAs are created as seen in the second half of this gif: ezgif com-video-to-gif

jbphet commented 6 years ago

(Edit: I hadn't noticed @BryceAG's previous comment when I initially wrote this, so I have made some revisions to remove redundant information.)

To resolve this I've done two things:

  1. added code to make the polymerase correctly detach from the DNA if it is bumped off the DNA by another polyerase
  2. made the deconformation time slightly shorter than the conformation time so that collisions are unlikely, if not impossible

I tested this by changing to code to make the deconformation time quite long and verifying that the state portion works, and I'm pretty confident that it does. I've now set the deconformation time to the new, shorter-than-the-conformation-time value, and I'm not able to cause collisions at all (which was the goal). Bottom line: I'm reasonably sure that this if fixed. Since this was a tricky problem, I'd like @BryceAG and/or @phet-steele to verify that this is no longer reproducible on master.

BryceAG commented 6 years ago

The shorter deconformation time does make it much harder to have them collide, and after many attempts I may have just barely had them collide, but it is hard to tell because the polymerase was so close to detaching on its own. If they did collide, then the first one popped off correctly and will not reattach in the middle of the transcribing region. If they didn't then I think it is safe to say it is impossible for them to collide any more.