diff --git a/src/main.cxx b/src/main.cxx index b8aae71..772ce50 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -18,12 +18,6 @@ #include "CustomScalingFunctions.h" -void printHelp(){ - //TODO fix this help - std::cout << "usage: ./c2c-sepia --fUniqueGraph .tsv --fInitialPerturbationPerType .tsv [.txt] --typeInteractionFolder (containing .tsv files)]\nFILE STRUCTURE SCHEMA:\ngraph.tsv\nstart\tend\tweight\n\t\t <0.something>\n...\n\n\ninitialPerturbationPerType.tsv\n\ttype1\ttype2\t...\ttypeN\ngene1\t\t\t...\t\ngene1\t\t\t...\t\n...\n\n\ntypesInteraction.tsv\nstartType:geneLigand\tendType:geneReceptor\tweight\n\t\t <0.something>\n...\n\n\nsubtypes.txt\ntype1\ntype3\n..."< := placeholder for the name of the file\n[] := optional\n{} := at least one"<.tsv [.txt] [.tsv]\nFILE STRUCTURE SCHEMA:\ngraph.tsv\nstart end weight\n <0.something>\n...\n\n\ninitialPerturbationPerType.tsv\n type1 type2 ... typeN\ngene1 ... \ngene1 ... \n...\n\n\ntypesInteraction.tsv\nstartType:geneLigand endType:geneReceptor weight\n <0.something>\n...\n\n\nsubtypes.txt\ntype1\ntype3\n...") ("fUniqueGraph", po::value(), "(string) graph filename, for an example graph see in resources. NOTE: if this option is chosen, graphsFilesFolder cannot be used") @@ -48,7 +41,7 @@ int main(int argc, char** argv ) { ("timestep",po::value(),"timestep to use for the iteration, the final time is iterationIntracell*iterationIntercell*timestep") ("dissipationModel",po::value(),"(string) the dissipation model for the computation, available models are: 'none (default)','power','random','periodic','scaled' and 'custom'") ("dissipationModelParameters",po::value>()->multitoken(),"(string) the parameters for the dissipation model, for the power dissipation indicate the base, for the random dissipation indicate the min and max value, for the periodic dissipation indicate the period") - ("graphsFilesFolder",po::value(),"(string) graphs (pathways or other types of graphs) file folder TODO implement different graphs loading") + ("graphsFilesFolder",po::value(),"(string) graphs (pathways or other types of graphs) file folder") ("conservationModel",po::value(),"(string) the conservation model used for the computation, available models are: 'none (default)','scaled','random' and 'custom' ") ("conservationModelParameters", po::value>()->multitoken(),"(vector) the parameters for the dissipation model, for the scaled parameter the constant used to scale the conservation final results, in the case of random the upper and lower limit (between 0 and 1)") ("saturation",po::bool_switch(&saturation),"use saturation of values, default to 1, if another value is needed, use the saturationTerm") @@ -69,7 +62,6 @@ int main(int argc, char** argv ) { double timestep = 1; if (vm.count("help")) { - //printHelp(); std::cout << desc << std::endl; return 1; } @@ -460,7 +452,6 @@ int main(int argc, char** argv ) { std::vector initialNames = std::get<0>(initialValues); inputInitials = std::get<2>(initialValues); std::vector typesFromValues = std::get<1>(initialValues); - //TODO understand if types from values should be the same as the types from the graphs since values could be specified for a subset of the types //this condition should take into account the intersection of the types and the subtypes if(typesFromValues.size() == 0){ std::cerr << "[ERROR] types from the initial values folder are 0, control if the types are the same to the one specified in the matrix, in the graphs folder and in the subtypes: aborting"< input = std::vector(graphsNodes[i].size(),0); - Computation* tmpCompPointer = new Computation(types[i],input,graphs[i],graphsNodes[i]); //TODO order the genes directly or use the names and set them one by one + Computation* tmpCompPointer = new Computation(types[i],input,graphs[i],graphsNodes[i]); tmpCompPointer->setDissipationModel(dissipationModel); tmpCompPointer->setConservationModel(conservationModel); typeComputations[indexComputation] = tmpCompPointer; @@ -502,7 +493,7 @@ int main(int argc, char** argv ) { } else { int index = indexMapGraphTypesToValuesTypes[i]; std::vector input = inputInitials[index]; - Computation* tmpCompPointer = new Computation(types[i],input,graphs[i],graphsNodes[i]); //TODO order the genes directly or use the names and set them one by one + Computation* tmpCompPointer = new Computation(types[i],input,graphs[i],graphsNodes[i]); tmpCompPointer->setDissipationModel(dissipationModel); tmpCompPointer->setConservationModel(conservationModel); typeComputations[indexComputation] = tmpCompPointer; @@ -526,7 +517,6 @@ int main(int argc, char** argv ) { } else { typeInteractionsEdges = cellInteractionFileToEdgesListAndNodesByName(*typeInteractionFilename, subtypes, ensembleGeneNames); } - //TODO insert edges to the correspondent type graph #pragma omp parallel for for (uint i = 0; i < types.size();i++) { if(typeInteractionsEdges.contains(types[i]) && typesIndexes[i] != -1){ @@ -559,16 +549,16 @@ int main(int argc, char** argv ) { if (saturation) { if(vm.count("saturationTerm") == 0){ - std::vector outputValues = typeComputations[i]->computeAugmentedPerturbationEnhanced2((iterationIntertype*intratypeIterations + iterationIntratype)*timestep, saturation = true); // TODO check if iteration intratype should be multiplied by iteration intertype + std::vector outputValues = typeComputations[i]->computeAugmentedPerturbationEnhanced2((iterationIntertype*intratypeIterations + iterationIntratype)*timestep, saturation = true); } else if (vm.count("saturationTerm") >= 1) { //TODO create saturation vector double saturationTerm = vm["saturationTerm"].as(); //TODO TEST std::vector saturationVector = std::vector(graphsNodes[invertedTypesIndexes[i]].size(),saturationTerm); - std::vector outputValues = typeComputations[i]->computeAugmentedPerturbationEnhanced2((iterationIntertype*intratypeIterations + iterationIntratype)*timestep, saturation = true, saturationVector); // TODO check if iteration intratype should be multiplied by iteration intertype + std::vector outputValues = typeComputations[i]->computeAugmentedPerturbationEnhanced2((iterationIntertype*intratypeIterations + iterationIntratype)*timestep, saturation = true, saturationVector); } } else{ - std::vector outputValues = typeComputations[i]->computeAugmentedPerturbationEnhanced2(iterationIntertype*intratypeIterations + iterationIntratype, saturation = false); // TODO check if iteration intratype should be multiplied by iteration intertype + std::vector outputValues = typeComputations[i]->computeAugmentedPerturbationEnhanced2(iterationIntertype*intratypeIterations + iterationIntratype, saturation = false); } } //save output values