Add real sequence collision rate
This commit is contained in:
@@ -27,7 +27,8 @@ public class Simulator implements GraphModificationFunctions {
|
|||||||
|
|
||||||
|
|
||||||
public static GraphWithMapData makeCDR3Graph(CellSample cellSample, Plate samplePlate, int readDepth,
|
public static GraphWithMapData makeCDR3Graph(CellSample cellSample, Plate samplePlate, int readDepth,
|
||||||
double readErrorRate, double errorCollisionRate, boolean verbose) {
|
double readErrorRate, double errorCollisionRate,
|
||||||
|
double realSequenceCollisionRate, boolean verbose) {
|
||||||
//start timing
|
//start timing
|
||||||
Instant start = Instant.now();
|
Instant start = Instant.now();
|
||||||
int[] alphaIndices = {SequenceType.CDR3_ALPHA.ordinal()};
|
int[] alphaIndices = {SequenceType.CDR3_ALPHA.ordinal()};
|
||||||
@@ -44,11 +45,11 @@ public class Simulator implements GraphModificationFunctions {
|
|||||||
//Make linkedHashMap keyed to sequences, values are SequenceRecords reflecting plate statistics
|
//Make linkedHashMap keyed to sequences, values are SequenceRecords reflecting plate statistics
|
||||||
if(verbose){System.out.println("Making sample plate sequence maps");}
|
if(verbose){System.out.println("Making sample plate sequence maps");}
|
||||||
Map<String, SequenceRecord> alphaSequences = samplePlate.countSequences(readDepth, readErrorRate,
|
Map<String, SequenceRecord> alphaSequences = samplePlate.countSequences(readDepth, readErrorRate,
|
||||||
errorCollisionRate, alphaIndices);
|
errorCollisionRate, realSequenceCollisionRate, alphaIndices);
|
||||||
int alphaCount = alphaSequences.size();
|
int alphaCount = alphaSequences.size();
|
||||||
if(verbose){System.out.println("Alphas sequences read: " + alphaCount);}
|
if(verbose){System.out.println("Alphas sequences read: " + alphaCount);}
|
||||||
Map<String, SequenceRecord> betaSequences = samplePlate.countSequences(readDepth, readErrorRate,
|
Map<String, SequenceRecord> betaSequences = samplePlate.countSequences(readDepth, readErrorRate,
|
||||||
errorCollisionRate, betaIndices);
|
errorCollisionRate, realSequenceCollisionRate, betaIndices);
|
||||||
int betaCount = betaSequences.size();
|
int betaCount = betaSequences.size();
|
||||||
if(verbose){System.out.println("Betas sequences read: " + betaCount);}
|
if(verbose){System.out.println("Betas sequences read: " + betaCount);}
|
||||||
if(verbose){System.out.println("Sample plate sequence maps made");}
|
if(verbose){System.out.println("Sample plate sequence maps made");}
|
||||||
@@ -131,7 +132,7 @@ public class Simulator implements GraphModificationFunctions {
|
|||||||
Duration time = Duration.between(start, stop);
|
Duration time = Duration.between(start, stop);
|
||||||
//create GraphWithMapData object
|
//create GraphWithMapData object
|
||||||
GraphWithMapData output = new GraphWithMapData(graph, numWells, samplePlate.getPopulations(), distCellsMapAlphaKey,
|
GraphWithMapData output = new GraphWithMapData(graph, numWells, samplePlate.getPopulations(), distCellsMapAlphaKey,
|
||||||
alphaCount, betaCount, readDepth, readErrorRate, errorCollisionRate, time);
|
alphaCount, betaCount, readDepth, readErrorRate, errorCollisionRate, realSequenceCollisionRate, time);
|
||||||
//Set source file name in graph to name of sample plate
|
//Set source file name in graph to name of sample plate
|
||||||
output.setSourceFilename(samplePlate.getFilename());
|
output.setSourceFilename(samplePlate.getFilename());
|
||||||
//return GraphWithMapData object
|
//return GraphWithMapData object
|
||||||
@@ -307,6 +308,7 @@ public class Simulator implements GraphModificationFunctions {
|
|||||||
metadata.put("sequence read depth", data.getReadDepth().toString());
|
metadata.put("sequence read depth", data.getReadDepth().toString());
|
||||||
metadata.put("sequence read error rate", data.getReadErrorRate().toString());
|
metadata.put("sequence read error rate", data.getReadErrorRate().toString());
|
||||||
metadata.put("read error collision rate", data.getErrorCollisionRate().toString());
|
metadata.put("read error collision rate", data.getErrorCollisionRate().toString());
|
||||||
|
metadata.put("real sequence collision rate", data.getRealSequenceCollisionRate().toString());
|
||||||
metadata.put("total alphas read from plate", data.getAlphaCount().toString());
|
metadata.put("total alphas read from plate", data.getAlphaCount().toString());
|
||||||
metadata.put("total betas read from plate", data.getBetaCount().toString());
|
metadata.put("total betas read from plate", data.getBetaCount().toString());
|
||||||
//HARD CODED, PARAMETERIZE LATER
|
//HARD CODED, PARAMETERIZE LATER
|
||||||
|
|||||||
Reference in New Issue
Block a user