src/CombingExperimentSimulation.java
//the probability distribution (uniform for combing expts)
the probability distribution (uniform for combing expts)
the probability distribution ( uniform for combing expts )
public static void main(String[] args) throws IOException {
        combingData = new CombingDataKN(ParameterSet.COMBING_DATA_FOLDER);
        combedMolList = combingData.getMoleculeArray();
        sortedCombedMolList = combedMolList.stream().
                sorted(Comparator.comparingDouble(m-> m.getMoleculeProps().getFxReplicated())).
                filter(e-> e.getMoleculeProps().getFxReplicated() < 1.0).collect(toList());
        ParameterSetListMaker maker = new ParameterSetListMaker(DefaultParameterRecipes.getDEFAULT_PARAMETER_RECIPES());
        List<ParameterSet> psList = maker.getParameterSetList();
        switch  (task) {
            case PRINT_COMBED_MOLECULE_PROPERTIES:
                printCombedMoleculeProperties(combedMolList);
                break;
            case PRINT_SEQUENCE:
                Path p1 = Paths.get(ParameterSet.FA_SEQ_FILE);
                seq = new SequenceDNA(p1, new SeqInterval(ParameterSet.SEQUENCE_START, ParameterSet.SEQUENCE_END));
                System.out.println(seq.intervalToString(new SeqInterval(0, seq.getLength() - 1)));
                break;
           }        
        for (ParameterSet paramSet : psList) {
            probDistribution = new ProbabilityDistribution2(ParameterSet.SEQUENCE_LENGTH, paramSet);
            population = new ReplicatingMoleculePopulationForCombingExpt(probDistribution,
                    paramSet, sortedCombedMolList);
            switch  (task) {
                case PRINT_PARAMETER_SET:
                    System.out.println(paramSet.toString());
                    break;
                case PRINT_RMS_DEVIATION_OBS_VS_PREDICTED_FORK_NUMBERS:
                    printRmsDeviationObservedAndPredictedForkNumbers(e-> e.getReferenceMoleculeFxReplicated() <1.0, paramSet);
                    break;
                case PRINT_OBSERVED_AND_PREDICTED_FORK_NUMBERS:
                    System.out.println(paramSet.toString());
                    printObservedVsSimulatedForkNumbers(e->e.getReferenceMolecule().getMoleculeProps().getFxReplicated() < 1.0); 
                    break;
                case PRINT_OBSERVED_AND_PREDICTED_CCDFS_ALL:
                    System.out.println(paramSet.toString());
                    printObservedAndPredictedCcdfs(e->e.getReferenceMolecule().getMoleculeProps().getFxReplicated() > 0
                            && e.getReferenceMolecule().getMoleculeProps().getFxReplicated() <= 1.0);
                    break;
                case PRINT_OBSERVED_AND_PREDICTED_CCDFS_LESS_THAN_TEN_PERCENT:
                    System.out.println(paramSet.toString());
                    printObservedAndPredictedCcdfs(e->e.getReferenceMolecule().getMoleculeProps().getFxReplicated() > 0
                            && e.getReferenceMolecule().getMoleculeProps().getFxReplicated() <= 0.1);
                    break;
                case PRINT_REPLICATION_DYNAMICS:
                    System.out.println(paramSet.toString());
                    population.printAverageStateVariables();
                    break;
                case PRINT_ELAPSED_TIME_HISTOGRAM:
                    printElapsedTimeHistogram();
                    break;
                case PRINT_AVERAGE_OBSERVED_NUMBER_FORKS_VS_FRACTION_REPLICATED:
                    printObservedNumberForksPerChromosomeHistogram();
            }
        }
    }
public static void main ( String [ ] args ) throws IOException { combingData = new CombingDataKN ( ParameterSet . COMBING_DATA_FOLDER ) ; combedMolList = combingData . getMoleculeArray ( ) ; sortedCombedMolList = combedMolList . stream ( ) . sorted ( Comparator . comparingDouble ( m -> m . getMoleculeProps ( ) . getFxReplicated ( ) ) ) . filter ( e -> e . getMoleculeProps ( ) . getFxReplicated ( ) < 1.0 ) . collect ( toList ( ) ) ; ParameterSetListMaker maker = new ParameterSetListMaker ( DefaultParameterRecipes . getDEFAULT_PARAMETER_RECIPES ( ) ) ; List < ParameterSet > psList = maker . getParameterSetList ( ) ; switch ( task ) { case PRINT_COMBED_MOLECULE_PROPERTIES : printCombedMoleculeProperties ( combedMolList ) ; break ; case PRINT_SEQUENCE : Path p1 = Paths . get ( ParameterSet . FA_SEQ_FILE ) ; seq = new SequenceDNA ( p1 , new SeqInterval ( ParameterSet . SEQUENCE_START , ParameterSet . SEQUENCE_END ) ) ; System . out . println ( seq . intervalToString ( new SeqInterval ( 0 , seq . getLength ( ) - 1 ) ) ) ; break ; } for ( ParameterSet paramSet : psList ) { probDistribution = new ProbabilityDistribution2 ( ParameterSet . SEQUENCE_LENGTH , paramSet ) ; population = new ReplicatingMoleculePopulationForCombingExpt ( probDistribution , paramSet , sortedCombedMolList ) ; switch ( task ) { case PRINT_PARAMETER_SET : System . out . println ( paramSet . toString ( ) ) ; break ; case PRINT_RMS_DEVIATION_OBS_VS_PREDICTED_FORK_NUMBERS : printRmsDeviationObservedAndPredictedForkNumbers ( e -> e . getReferenceMoleculeFxReplicated ( ) < 1.0 , paramSet ) ; break ; case PRINT_OBSERVED_AND_PREDICTED_FORK_NUMBERS : System . out . println ( paramSet . toString ( ) ) ; printObservedVsSimulatedForkNumbers ( e -> e . getReferenceMolecule ( ) . getMoleculeProps ( ) . getFxReplicated ( ) < 1.0 ) ; break ; case PRINT_OBSERVED_AND_PREDICTED_CCDFS_ALL : System . out . println ( paramSet . toString ( ) ) ; printObservedAndPredictedCcdfs ( e -> e . getReferenceMolecule ( ) . getMoleculeProps ( ) . getFxReplicated ( ) > 0 && e . getReferenceMolecule ( ) . getMoleculeProps ( ) . getFxReplicated ( ) <= 1.0 ) ; break ; case PRINT_OBSERVED_AND_PREDICTED_CCDFS_LESS_THAN_TEN_PERCENT : System . out . println ( paramSet . toString ( ) ) ; printObservedAndPredictedCcdfs ( e -> e . getReferenceMolecule ( ) . getMoleculeProps ( ) . getFxReplicated ( ) > 0 && e . getReferenceMolecule ( ) . getMoleculeProps ( ) . getFxReplicated ( ) <= 0.1 ) ; break ; case PRINT_REPLICATION_DYNAMICS : System . out . println ( paramSet . toString ( ) ) ; population . printAverageStateVariables ( ) ; break ; case PRINT_ELAPSED_TIME_HISTOGRAM : printElapsedTimeHistogram ( ) ; break ; case PRINT_AVERAGE_OBSERVED_NUMBER_FORKS_VS_FRACTION_REPLICATED : printObservedNumberForksPerChromosomeHistogram ( ) ; } } }
the probability distribution (uniform for combing expts)
the probability distribution ( uniform for combing expts )
//get list of combed molecules from Kaykov and Nurse data - a singleton and sorted list in order of FxReplicated // set parameter set list //Print the properites of Kaykov and Nurse Molecules //Iterate over all parameter sets //Create uniform probability distribution //Replicate molecules - create new replicating molecule population with same probability distribution and parameters