Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. turtles-own
  2. [
  3. stem? ;; true for stem cells, false for transitory cells
  4. age ;; age of cell. changes color with age
  5. metastatic? ;; false for progeny of stem cell 0, true for progeny of stem cell 1
  6. EGFR
  7. RAS ; 0 si désactivée, 1 si activée
  8. RAF ; 0 si désactivée, 1 si activée
  9.  
  10. ]
  11.  
  12. patches-own
  13. [
  14. GEF ;;growth factor
  15. GAP ;;growth factor
  16. other_growth_factors ;;growth factor
  17. ]
  18.  
  19. globals
  20. [
  21. cell-count
  22. ]
  23.  
  24. to setup
  25. clear-all
  26. ;;set-default-shape turtles "ball "
  27. ;;ask patches
  28. ;;[ set pcolor black + 1 ]
  29. set-stem
  30. ;;set-gradients
  31. evaluate-params
  32. reset-ticks
  33. end
  34.  
  35. to set-stem ;;create two stem cells
  36. create-turtles 2
  37. [
  38. set size 2 ; easier to see
  39. setxyz (min-pxcor / 3) (min-pycor / 3) (min-pzcor / 3) ;; placement pour que les cellules filles ne sortent pas du cube
  40. set stem? true
  41. set metastatic? false
  42. set color blue
  43. set age 0
  44. ]
  45. ask turtle 1
  46. [
  47. set metastatic? true
  48. facexyz 270 270 270 ;; stem cell 1 will move away
  49. ]
  50. set cell-count 2
  51. end
  52.  
  53. ;;to set-gradients
  54. ;; ask patches
  55. ;;[ set H+ 0
  56. ;; set O2 20
  57. ;;]
  58. ;;end
  59.  
  60. to go
  61. ask turtles
  62. [
  63. if GEF
  64. [ activate_RAS ]
  65. if GAP
  66. [ deactivate_RAS ]
  67. if (who = 1) and (xcor < max-pxcor - 12)
  68. [ fd 0.1 ] ;stem cell movement
  69. set age age + 1
  70. move-transitional-cells
  71. mitosis
  72. death
  73. ]
  74.  
  75. ;;consommation
  76.  
  77. tick
  78. evaluate-params
  79.  
  80. end
  81.  
  82. ;;transitional cells move and hatch more. Turtle proc.
  83. to move-transitional-cells
  84. if (not stem?)
  85. [
  86. set color ( red + 0.25 * age )
  87. fd 1
  88. if (age < 6)
  89. [
  90. hatch 1
  91. [ ;amplification
  92. facexyz random-float 360 random-float 360 random-float 360
  93. fd 0.5
  94. ;kill-wrapped
  95. ]
  96. ]
  97. ]
  98. end
  99.  
  100. to mitosis ;; turtle proc. - stem cells only
  101. if stem?
  102. [
  103. hatch 1
  104. [
  105. fd 0.3
  106. set color red
  107. set stem? false
  108. ifelse (who = 1)
  109. [ set age 16 ]
  110. [ set age 0 ]
  111. ]
  112. ]
  113.  
  114. if (not stem?) and (distancexyz (min-pxcor / 3) (min-pycor / 3) (min-pzcor / 3) < 0.8) ;; division des cellules autres que souches proches des cellules souches
  115. [
  116. hatch 1
  117. [
  118. fd 0.3
  119. set color red
  120. set stem? false
  121. ifelse (who = 1)
  122. [ set age 16 ]
  123. [ set age 0 ]
  124. ]
  125. ]
  126. end
  127.  
  128. to death ;; turtle proc.
  129. if (not stem?) and (not metastatic?) and (age > 20)
  130. [ die ]
  131. if (not stem?) and metastatic? and (age > 4)
  132. [ die ]
  133. end
  134.  
  135. to evaluate-params
  136. set cell-count count turtles ;cell count
  137. if (cell-count <= 0)
  138. [ stop ]
  139. end
  140.  
  141. to kill-original-stem-cell
  142. ask turtle 0
  143. [ die ]
  144. end
  145.  
  146. to kill-moving-stem-cell
  147. ask turtle 1
  148. [ die ]
  149. end
  150.  
  151. to kill-transitory-cells
  152. ask turtles with [ age < 10 and not stem? ]
  153. [ die ]
  154. end
  155.  
  156. ;;to consommation
  157. ;; ask patches with [(O2 > 0) and (H+ < 20)]
  158. ;; [
  159. ;; set O2 O2 - (count turtles-here) / 2
  160. ;; set H+ H+ + (count turtles-here) / 2
  161. ;; ]
  162. ;;end
  163.  
  164.  
  165. to activate_RAS
  166. ask turtles
  167. [ set RAS 1]
  168.  
  169. end
  170.  
  171. to deactivate_RAS
  172. ask turtles
  173. [ set RAS 0]
  174.  
  175. end
  176.  
  177.  
  178.  
  179.  
  180. ;;;;;;;;;;partie commentaire;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  181. ; mettre des cirseurs pour chaque protéine ou composant ayant une influence majeur dans le comportement de le tumeur
  182. ;ajouter un bouton chimio qui tue quasi toutes les cellules sauf les souches et mettre une proba très faible pour que les souches relancent une tumeur(rand entre 0 et 1 et que si le nombre est <0.000000000001 par exemple)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement