Skip to content

PCTSEA guide for developers

Salvador Martínez de Bartolomé edited this page Jul 28, 2021 · 15 revisions

This is a detailed description of how the PCTSEA analysis is implemented in Java.

This guide is supposed to help future developers to continue improving this software.

Flow chart:

See a flow chart here

Both command line and web versions are coupled to the pctsea-core module where the PCTSEA.java class is defined and where the logic of the analysis is implemented, more in particular, in the run() method which has been filled with comments so that can be followed.

This class is well documented, with a lot of comments along the code, however here there is more information about it that might be useful:

In order to change scoring methods, the developer should focus on method

private int calculateScoresToRankSingleCells(List<SingleCell> singleCellList,
			GeneExpressionsRetriever interactorExpressions, ScoringSchema scoringSchema, boolean writeScoresFile,
			boolean outputToLog, boolean getExpressionsUsedForScore, boolean takeZerosForCorrelation,
			double minCorrelation) throws IOException

where depending on the ScoringMethod of the ScoringSchema a different score is calculated per SingleCell that reorder them in a ranking list used in the Kolmogorov-Smirnov test used for the calculation of the enrichment score.

Inside this method there is a switch clause that calls the appropriate method depending on the ScoringMethod:

				switch (scoringMethod) {
				case PEARSONS_CORRELATION:
					singleCell.calculateCorrelation(interactorExpressions, getExpressionsUsedForScore, minCorrelation);
					break;
				case SIMPLE_SCORE:
					singleCell.calculateSimpleScore(interactorExpressions, getExpressionsUsedForScore, minCorrelation);
					break;
				case DOT_PRODUCT:
					singleCell.calculateDotProductScore(interactorExpressions, takeZerosForCorrelation,
							getExpressionsUsedForScore);
					break;
				case REGRESSION:
					singleCell.calculateRegressionCoefficient(interactorExpressions, getExpressionsUsedForScore);
					break;
				default:
					throw new IllegalArgumentException(
							"Method " + scoringMethod.getScoreName() + " still not supported.");

				}
Clone this wiki locally