private void Call(int?upToPosition = null) { var readyBatch = _stateManager.GetCandidatesToProcess(upToPosition, _chrReference); if (readyBatch == null) { return; } if (readyBatch.HasCandidates) { // evaluate and call variants (including ref calls if producing gvcf) var BaseCalledAllelesByPosition = _alleleCaller.Call(readyBatch, _stateManager); var BaseCalledAlleles = BaseCalledAllelesByPosition.Values.SelectMany(a => a).ToList(); // write to vcf _vcfWriter.Write(BaseCalledAlleles, _regionMapper); if (_biasFileWriter != null) { _biasFileWriter.Write(BaseCalledAlleles); } } if (_intervalSet != null && readyBatch.MaxClearedPosition.HasValue) { _intervalSet.SetCleared(readyBatch.MaxClearedPosition.Value); } _stateManager.DoneProcessing(readyBatch); }
private void Call(int?upToPosition = null) { var readyBatch = _stateManager.GetCandidatesToProcess(upToPosition, _chrReference); // map to intervals if needed if (_regionMapper != null) { _regionMapper.Pad(readyBatch, !upToPosition.HasValue); } if (readyBatch.HasCandidates) { // evaluate and call variants (including ref calls if producing gvcf) var calledVariants = _alleleCaller.Call(readyBatch, _stateManager); _numCalledAlleles += calledVariants.Count(); // write to vcf _vcfWriter.Write(calledVariants); if (_biasFileWriter != null) { _biasFileWriter.Write(calledVariants); } } _stateManager.DoneProcessing(readyBatch); }
private void Call(int?upToPosition = null) { var readyBatch = _stateManager.GetCandidatesToProcess(upToPosition, _chrReference, _forcedGtAlleles); if (readyBatch == null) { return; } if (readyBatch.HasCandidates) { // evaluate and call variants (including ref calls if producing gvcf) var BaseCalledAllelesByPosition = _alleleCaller.Call(readyBatch, _stateManager); var BaseCalledAlleles = BaseCalledAllelesByPosition.Values.SelectMany(a => a).ToList(); // write to vcf _vcfWriter.Write(BaseCalledAlleles, _regionMapper); //always coupled together for simplicty, so no need for two checks. if (_writeBiasFiles) { _strandBiasFileWriter.Write(BaseCalledAlleles); _ampliconBiasFileWriter.Write(BaseCalledAlleles); } } if (_intervalSet != null && readyBatch.MaxClearedPosition.HasValue) { _intervalSet.SetCleared(readyBatch.MaxClearedPosition.Value); } _stateManager.DoneProcessing(readyBatch); }