josura / c2c-sepia

Multi agent model for perturbations in networks of networks. Used for Cell-to-cell communication with enriched pathways, using scRNA-seq or spatial data
Creative Commons Attribution 4.0 International
2 stars 0 forks source link

c2c-sepia

Original project and development for the MASFENON framework(now under migration and development in here), used for the perturbation in networks of networks using a MAS(Multi-agent system), enhanced with parallel and distributed processing. Specifically built for Cell-to-cell communication with enriched pathways, using scRNA-seq data.

DEPENDENCIES

BUILD

mkdir build
cmake -B build
cd build
make

PARAMETER CUSTOMIZATION

The custom functions used for the scaling of the perturbation values (dissipation and conservation) are defined in <src/CustomFunctions> in the source folder

USAGE

./build/c2c-sepia --fUniqueGraph [graph].tsv --fInitialPerturbationPerType [matrix].tsv --typeInteractionFolder [typesInteractionFolder]

The options are the following:

INPUTS

For the structure of the input see the following reference example data in the repository:

EXAMPLES

different graphs, saturation at 1, dissipation scaled at 0.2, conservation scaled at 0.5

./build/c2c-sepia --graphsFilesFolder data/testdata/testHeterogeneousGraph/graphs \
            --initialPerturbationPerTypeFolder data/testdata/testHeterogeneousGraph/initialValuesPartialTypes \
            --typeInteractionFolder data/testdata/testHeterogeneousGraph/interactions \
            --subtypes data/testdata/testGraph/subcelltypes.txt \
            --dissipationModel scaled \
            --dissipationModelParameters 0.2 \
            --saturation \
            --conservationModel scaled \
            --conservationModelParameters 0.5 \
            --outputFolder outputs

To use the MPI version with 2 processors(as the subtypes used are only 2), the command is the following

mpirun -np 2 ./build/c2c-sepia-MPI --graphsFilesFolder data/testdata/testHeterogeneousGraph/graphs \
            --initialPerturbationPerTypeFolder data/testdata/testHeterogeneousGraph/initialValuesPartialTypes \
            --typeInteractionFolder data/testdata/testHeterogeneousGraph/interactions \
            --subtypes data/testdata/testHeterogeneousGraph/subcelltypes.txt \
            --dissipationModel scaled \
            --dissipationModelParameters 0.2 \
            --virtualNodesGranularity typeAndNode \
            --saturation \
            --conservationModel scaled \
            --conservationModelParameters 0.5 \
            --outputFolder outputs

USE CASES

The framework can be used in every situation with the following structure:

things to consider

The map file that is used for the mapping of ensemble gene names to entrez ids (required if the metapathway in the resourse folder are used) can b e found in the metapathways folders themselves. The one used in the tool is found at resources/graphs/metapathwayReactome/nodes.txt

The mapping file is only available to use entrez ids for the metapathway used and loaded into this repository, if the graph used for the computation is different there is no need to the mapping file and it will not be even considered during the computation

If the custom functions and scaling functions are used, the project need to be rebuilt with make

If the output needs to be in a single file for every type for the time series, the output folder where the iteration results are saved can be passed to an Rscript in this repository in the following way:

Rscript scripts/R/generalGetPerturbationCorrectTimeSeries.R <MASFENONresultsFolder>  <timeSeriesOutputFolder>

LICENSE

Under development, if any problems arises open an issue in the repository

Shield: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0