{'fraction_non_alphanumeric': 0.021719382277644726, 'fraction_numerical': 0.02750020645800644, 'mean_word_length': 4.901559454191033, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Tumorcode - A framework to simulate vascularized tumors

During the past years our group published several articles using computer simulations to address the complex interaction of tumors and the vasculature as underlying transport network. Advances in imaging and lab techniques pushed in vitro research of tumor spheroids forward and animal models as well as clinical studies provided more insights to single processes taking part in tumor growth, however, an overall picture is still missing. Computer simulations are a none-invasive option to cumulate current knowledge and form a quasi in vivo system. In our software, several known models were assembled into a multi-scale approach which allows to study length scales relevant for clinical applications. We release our code to the public domain, together with a detailed description of the implementation and several examples, with the hope of usage and futher development by the community. Justification for the included algorithms and the biological models was obtained in previous publications, here we summarize technical aspects following the workflow of a typical simulation procedure.


Introduction
transforming the present blood vessels, the tumor exploits them for his own purposes. 7 The full complexity of this process is not yet understood. 8 Since the vasculature transports drugs to cancer cells, this transformation is 9 certainly of interest for chemotherapy, and also radio therapy is known to be dependent 10 on the oxygen level inside the tissue which is again dependent on the vessel morphology 11 and vessel wall properties. The complex dependence of solute transport or solute 12 distribution and spatial arrangement of the blood vessels is therefore of great 13 importance in every cancer therapy. 14 Obtaining experimental or clinical data of sufficiently high resolution to reconstruct 15 vascular networks is by itself a hard task [2]. To overcome the lack of data, in silico Naturally this takes considerable computational efforts providing greater details on the 26 cell level. Second: models where the tumor is described by continuous equations, 27 reaching dimensions relevant for diagnostics [8]. Nevertheless, it is mostly neglected that 28 tumors in patients or animal models grow within well-vascularized environments which 29 means the original or initial network is not adequately represented. 30 Another problem in the field is that the code is maintained and used by 31 corresponding groups only, rather than sharing implementations which would simply 32 save time. Repositories for open source code are well known in computer science and 33 started to become useful in life science as well [9] [10]. 34 To create blood vessel networks, we use a lattice-based attempt which discretizes the 35 angular freedom and enables us to explore large scales. To the best of our knowledge 36 there is no other software constructing synthetic arterio-venous blood vessel networks on 37 macroscopic tissue volumes in 3 dimension matching topological, morphological and 38 hydrodynamic properties observed in real samples. Our multi-scale approach describes 39 tumor growth by partial differential equations and thus it is possible to simulate system 40 sizes of the order of centimeters.  Like modern implementations we reassemble two most distinct aspects. On the one 50 hand we use python together with by the scipy packages for an easy and straight 51 forward scripting of scientific problems. On the other hand, computationally expensive 52 tasks are delegated to a core written in C++ for performance reasons. Following up, a 53 pythonic interface to this core has been created with the help of Boost.Python. We 54 decided to use the 'hdf5' -file format [11] to store data since it is highly scale-able and 55 supported by both programming languages used. Standard C++ coding is used where the comments follow the doxygen notation 58 enabling the user to retrieve information about dependencies and inheritance within the 59 object-oriented kernel. Instructions on how to create the documentation can be found in 60 the subfolder 'doc'.

61
Examples for demanding main applications are 1) calculating the hydro-and 62 hemodynamics and 2) solving partial differential equations. Both problems reduce to 63 solving systems of sparse linear equations which we do by the Trilinos package [12]. Before determining hydro-and hemodynamics of the network, the topology itself is 66 created by the vesselgenerator (see folder 'src/common/vesselgen' ). The idea follows a 3 67 dimensional generalization of the algorithm presented in [13]. An example output can segments are appended at random until arterial and venous trees meet. Fixing the radii 74 of the capillaries, Murray's law allows us to determine the radii of all mother vessels up 75 to the root node level. Once the radii are known, we assume mass conservation at each 76 vertex to get a matrix equation analogues to a Kirchhoff circuit in electrodynamics.

77
Solving these sparse matrix equation provides blood pressure values and blood flow 78 rates for every vessel. Subsequently, the formula for laminar flow allows to calculate the 79 shear force acting on the wall. In a last step, the total shear force is optimized in a 80 Monte Carlo manner which requires to solve the sparse matrix equation frequently.

81
Capillaries are deleted and inserted as long as the total shear force is minimized and the 82 spatial distribution of capillaries is maximized. At the end of the construction step we 83 take the Fåhraeus-Lindqvist and phase separation effect into account. The bulk tissue tumor model is based on a framework developed in [8], where the tissue 86 is described as a mixture of various components. Our implementation includes normal, 87 tumor and necrotic phases. The levelset-method is used to distinguish the different 88 phases and defines the interface between them. Assuming incompressibility, one can 89 describe the composition in terms of volume fractions which leads to a system of partial 90 differential equations of diffusion-convection-reaction type for each phase. Introducing 91 a regular cubic lattice for bulk tissue allows to solve these equations by Finite Difference 92 techniques. Consequently, the numerical resolution of the tumorcode is governed by the 93 lattice constant chosen. The number of grid points and vessels is limited by the 94 provided hardware memory. Note that the bulk tissue and vascular network coexist in 95 the same space, however, on different lattices. To fully utilize modern computing 96 equipment we parallelized our code with the shared memory API of OpenMP. More 97 details about this methodology could be found in the well written article [14].  In [15] we showed that the equation for the vascular oxygen distribution together with 104 the diffusion equation for the tissue form a complicated nonlinear system of equations 105 with the partial pressure values of oxygen as unknowns. For the longitudinal transport a 106 bisection search is used to gather the partial oxygen pressure values within each vessel. 107 Constructing consistent expressions for the transvascular exchange of oxygen across the 108 vessel lumen was a challenging task, but enabled us to use the exchange as source or

116
After successful installation, the main tools can be found in the 'bin' folder. Note that 117 the Input Interface is written in python and that necessary parameters are also stored 118  as python dictionaries (see folder 'py/krebsjobs/parameters' ).

119
tumorcode is ready to use on computing clusters equipped with a queuing system. 120 To remember the fact that the computation will be submitted to a queuing system, the 121 name of the simulation programs start with submit. Currently we support 'PBS   In general, one starts by creating synthetic blood vessels which serve as host and 136 transport network (see 2.1.1). Another possibility is to provide measured input data. A 137 transformation from the published data in [16] to the structure used by our software is 138 described in the file 'py/krebs/adaption/apj2hdf.py'. To elaborate the characteristic     Secondly, an elaborated model of blood and tissue oxygenation was developed [15]. 181 Similarly to 'submitIff', 'submitDetailedO2' needs a parameter set, a tumor simulation 182 and a specified time point as input. 183

Analyzing and visualization 184
Finally, we offer a large number of scripts that we use to analyze raw simulation data. 185 Like the simulations, our analysis programs are hybrids between C++ and python. 186 Since the datasets can become quite large in filesize and take a long time to be oxygen and drug datasets to POV-Ray scene files, and run POV-Ray automatically in 198 succession. Images of these kind are depicted in our latest publications [15,17] .  For details on the exact setup we refer to [15,17]. implemented straightforward in our software. Additionally, we can average data over 211 spherical surfaces to mimic various experimental measurements. A profound inspection 212 of a bulk tissue tumor simulation on a large scale could be found in [17,Fig 3]. There 213 the graphs display microvessel density (MVD), vessel radius, cell velocity, oxygen, wall 214 thickness and wall shear stress where the time course of tumor growth is visualized by 215 different colors. The level set method allows to localize the distance of the tumor-tissue 216 interface which is used as ordinate for the cited plots. Within that framework it is easy 217 to define "inside" and "outside" of a tumor and focus on the differences.

218
Distinct experimental techniques such as MRI, micro-CT or xenografts are available 219 to access morphological data of tumor tissue as well. But comparable data obtained 220 from animal models usually requires the immolation of an animal per time point.

221
Therefore such studies are heavily biases by inter-subject variation. Recently, we used 222 this framework to create networks matching the morphology of a swine animal model. 223 In appendix EX1 Blood vessel network creation, we create a dataset of this kind and 224 present the analysis.  included. [17,Fig 4,7]. Notably, our results obtained by these simulations suggest that 243 despite of an IFP plateau within the tumor, IFF does not cease and still allows for 244 substantial convective transport which was in contradiction to the view at that time.

245
Furthermore we varied numerous parameters and the administration protocol emulating 246 clinical studies which would be extensive and lengthy in practice.   Despite the code is platform independent, successful compilation and usage as 285 described in this article is restricted to Unix-based systems at the moment. If required, 286 support for different operating systems is feasible. Likewise, implementing a graphical 287 user interface as extension of our module-based code is straight forward and could serve 288 other researchers in life science with less background in computer science. Following the 289 direction towards a common code base in the field, we hope this article and mainly the 290 examples in the supplemental material help to overcome technical struggles. In future, 291 merging tumorcode with other codes may be an option.

292
Currently, the drug as well as the detailed oxygen distribution is calculated at time 293 snapshots of the tumor growth process only. To engage pharmacodynamics and improve 294 predictions, correlating the time points could be considered in future. Also additional 295 features relevant for clinics like, pH, ATP consumption or formation of metastasis could 296 be included. The questions in the broad field of cancer research are immense. we describe here how interstitial fluid pressure and drug distributions could be 315 calculated and visualized. These simulation where used for the publication [17].

316
EX4 Detailed oxygen distribution Providing a tumor simulation, we calculate 317 the detailed oxygen distribution as described in [15] and run the scripts in order to 318 analyze those oxygen distribution.