J-SPACE is a Julia package to simulate the spatial growth and the genomic evolution of a cell population and the experiment of sequencing the genome of the sampled cells.
Hi, I'm working on the spatial-input branch and I've added some features related to reading and translating DataFrames in MetaGraph. Specifically, I've created some nearly identical function in Start.jl for initiating the simulation, in J_Space.jl for loading DataFrames and in DataFrameGraphBridge.jl for building the MetaGraph. To generate the MetaGraph, I'm using the function metagraph_from_dataframe_JHistint and passing the following parameters:
G_meta = DataFrameGraphBridge.metagraph_from_dataframe_JHistint(MetaGraph, df_edges, :origin, :destination, :weight, :weight, df_labels, :label).
Here, df_edges is a DataFrame containing information about the edges (:origin, :destination, :weight), and df_labels is a DataFrame containing information about the vertices (:label, :position, :color).
In the metagraph_from_dataframe_JHistint function, I have removed the following part because the input DataFrame (df_edges) does not have the columns defined as :Child,:Time,Subpop_Child :
#add times on graph
times_df = df[:,[:Child, :Time]]
vertex_names = leftjoin(vertex_names, times_df, on = :name => :Child)
#add subpop_child on graph
subpop_df = df[:,[:Child, :Subpop_Child]]
vertex_names = leftjoin(vertex_names, subpop_df, on = :name => :Child)
# Set vertex names and attributes
attr_names = propertynames(vertex_names[!, Not(:vertex_id)])
for r in eachrow(vertex_names)
set_props!(mg, r[:vertex_id], Dict([a => r[a] for a in attr_names]))
end
I'm not sure if it's related to this change or to the function's structure itself, but when I try to launch the simulation, I encounter the following error in the third step during RUN DYNAMIC:
Hi, I'm working on the
spatial-input
branch and I've added some features related to reading and translating DataFrames in MetaGraph. Specifically, I've created some nearly identical function inStart.jl
for initiating the simulation, inJ_Space.jl
for loading DataFrames and inDataFrameGraphBridge.jl
for building the MetaGraph. To generate the MetaGraph, I'm using the functionmetagraph_from_dataframe_JHistint
and passing the following parameters:G_meta = DataFrameGraphBridge.metagraph_from_dataframe_JHistint(MetaGraph, df_edges, :origin, :destination, :weight, :weight, df_labels, :label).
Here,df_edges
is a DataFrame containing information about the edges(:origin, :destination, :weight)
, anddf_labels
is a DataFrame containing information about the vertices(:label, :position, :color)
. In themetagraph_from_dataframe_JHistint
function, I have removed the following part because the input DataFrame (df_edges
) does not have the columns defined as:Child,
:Time,
Subpop_Child
:I'm not sure if it's related to this change or to the function's structure itself, but when I try to launch the simulation, I encounter the following error in the third step during RUN DYNAMIC:
What could be the issue? Thank you in advance.
NM