MAFToGVCF

class MAFToGVCF

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val totalDP: Int = 30

Functions

Link copied to clipboard
fun addSequenceDictionary(vcfheader: VCFHeader, refGenomeSequence: Map<String, NucSeq>)

Function to add a sequence Dictionary based on the reference genome. This uses the loaded genome to get the lengths.

Link copied to clipboard
fun buildIndel(chrom: String, position: Int, refAlleles: String, altAlleles: String, assemblyChrom: String, assemblyStart: Int, assemblyStrand: String, startInsertion: Boolean = false): AssemblyVariantInfo

Method to build an indel AssemblyVariantInfos.

Link copied to clipboard
fun buildMissingRegion(chrom: String, startPos: Int, endPos: Int, refAlleles: String, assemblyChrom: String, assemblyStart: Int, assemblyEnd: Int, assemblyStrand: String): AssemblyVariantInfo
Link copied to clipboard
fun buildRefBlockVariantInfo(refSequence: Map<String, NucSeq>, chrom: String, currentRefBlockBoundaries: Pair<Int, Int>, assemblyChrom: String, currentAssemblyBoundaries: Pair<Int, Int>, assemblyStrand: String): AssemblyVariantInfo

Function to build a reference block AssemblyVariantInfo NucSeq is 0-based, so subtract 1 from the boundaries when grabbing the sequence allele

Link copied to clipboard
fun buildRefBlockVariantInfoZeroDepth(refSequence: Map<String, NucSeq>, chrom: String, currentRefBlockBoundaries: Pair<Int, Int>, assemblyChrom: String, currentAssemblyBoundaries: Pair<Int, Int>, assemblyStrand: String, isMissing: Boolean = false): AssemblyVariantInfo

Method to build a Reference Block AssemblyVariantInfo setting the depth to 0. This is mainly used to fill in missing basepairs between MAF entries. NucSeq is 0-based, so subtract 1 from the boundary value when grabbing sequence allele

Link copied to clipboard
fun buildSNP(chrom: String, position: Int, refAllele: Char, altAllele: Char, assemblyChrom: String, assemblyPosition: Int, assemblyStrand: String): AssemblyVariantInfo

Method to build SNP AssemblyVariantInfos

Link copied to clipboard
fun buildTempVariants(refSequence: Map<String, NucSeq>, mafRecord: MAFRecord, anchorwaveLegacy: Boolean = false): List<AssemblyVariantInfo>

Function to build the AssemblyVariantInfos found in the given Maf record.

Link copied to clipboard
fun buildVariantsForAllAlignments(mafRecords: List<MAFRecord>, refGenomeSequence: Map<String, NucSeq>, fillGaps: Boolean, outputType: MAFToGVCF.OUTPUT_TYPE, anchorwaveLegacy: Boolean = false): List<AssemblyVariantInfo>

Function to build the variants for all the alignments.

Link copied to clipboard
fun convertVariantInfoToContext(sampleName: String, variantInfo: AssemblyVariantInfo, outJustGT: Boolean, delAsSymbolic: Boolean, maxDeletionSize: Int): VariantContext

Function to turn the AssemblyVariantInfo into an actual VariantContext. If the Assembly annotations are not in the VariantInfo, we do not add them into the VariantContext.

Link copied to clipboard
fun createGVCFfromMAF(mafFile: String, referenceFile: String, gvcfOutput: String, sampleName: String, fillGaps: Boolean = false, twoGvcfs: Boolean = false, outJustGT: Boolean = false, outputType: MAFToGVCF.OUTPUT_TYPE = OUTPUT_TYPE.gvcf, compressAndIndex: Boolean = true, delAsSymbolic: Boolean = false, maxDeletionSize: Int = 0, anchorwaveLegacy: Boolean = false)

This method takes a mafFile and outputs a gvcf file to the specified path

Link copied to clipboard
fun createVariantContextsFromInfo(sampleName: String, variantInfos: List<AssemblyVariantInfo>, outJustGT: Boolean, delAsSymbolic: Boolean, maxDeletionSize: Int): List<VariantContext>
Link copied to clipboard
fun exportVariantContext(sampleName: String, variantContexts: List<AssemblyVariantInfo>, outputFileName: String, refGenomeSequence: Map<String, NucSeq>, outputJustGT: Boolean, delAsSymbolic: Boolean, maxDeletionSize: Int)

Function to export a list of htsjdk VariantContext records to a gvcf formatted output file

Link copied to clipboard
fun fillInMissingVariantBlocks(tempVariantInfos: MutableList<AssemblyVariantInfo>, refGenomeSequence: Map<String, NucSeq>, fillWithRef: Boolean = true): MutableList<AssemblyVariantInfo>

Function to fill in the missing variant blocks between MAF records. If fillWithRef is set to true it will make VariantBlocks, if false it will make missing blocks.

Link copied to clipboard
fun getVariantContextsfromMAF(mafFile: String, refSeqs: Map<String, NucSeq>, sampleName: String, fillGaps: Boolean = false, twoGvcfs: Boolean = false, outJustGT: Boolean = false, outputType: MAFToGVCF.OUTPUT_TYPE = OUTPUT_TYPE.gvcf, delAsSymbolic: Boolean = false, maxDeletionSize: Int = 0, anchorwaveLegacy: Boolean = false): Map<String, List<AssemblyVariantInfo>>

This function creates a list of MAFRecords records which will be further processed by the calling routing

Link copied to clipboard
Link copied to clipboard
fun processIdenticalLengthStrings(refString: String, altString: String, startPos: Int, chrom: String, refseq: Map<String, NucSeq>, assemblyChrom: String, asmStartPos: Int, asmStrand: String): List<AssemblyVariantInfo>

Function to convert a multi-bp substitution into a series of SNPs. This allows the GVCF to pass a vcf-validator.

Link copied to clipboard

Method to resize the previous Reference block Variant Info. We only need to delete 1 bp off the end of the Blocks. We need to do this otherwise we will cover base pairs surrounding the indels.

Link copied to clipboard