-
- All Implemented Interfaces:
public class HapCallingUtils
Created by zrm22 on 8/29/17.
-
-
Method Summary
Modifier and Type Method Description static List<VariantContext>
getVariantContextFromHaplotypePath(HaplotypePath bestPath)
Method to extract the VCF VariantContexts from the HaplotypePath. static List<VariantContext>
getVariantContextFromHaplotypeNodeList(List<HaplotypeNode> nodeList)
Method to extract the VCF VariantContexts from a List of HaplotypeNodes static void
writeVariantContextsToVCF(List<VariantContext> variantContextList, String exportVCFFileName, String referenceFileName, List<String> taxa)
static void
writeVariantContextsToVCF(List<VariantContext> variantContextList, String exportVCFFileName, String referenceFileName, String taxonName)
Method to write the list of VariantContexts out to a vcf file. static void
callSNPsFromHaplotypePath(HaplotypeGraph graph, HaplotypePath bestPath, String vcfFileDir, String exportVCFFileName, String referenceFileName, String taxonName)
static void
callSNPsFromSomeVCFs(String inputVCFFileDir, String exportVCFFileName, String referenceFileName, String taxonName)
static void
callSNPsFromHaplotypeNodes(List<HaplotypeNode> listOfNodes, HashMap<Integer, String> hapIdToFileNameMapping, String vcfFileDir, String exportVCFFileName, String referenceFileName, String taxonName)
static HashMap<Integer, String>
createHapIdToFileNameMapping(HaplotypeGraph graph, String pangenomeDir)
static VCFHeader
createGenericHeader(List<String> taxaNames)
static Set<VCFHeaderLine>
createGenericHeaderLineSet()
static VCFHeader
createGATKGVCFHeader(List<String> taxaNames)
static void
addInGQBlockHeader(Set<VCFHeaderLine> headerLines)
static VCFHeaderLine
createGVCFBlockHeaderLine(int start, int exclusiveEnd)
-
-
Method Detail
-
getVariantContextFromHaplotypePath
static List<VariantContext> getVariantContextFromHaplotypePath(HaplotypePath bestPath)
Method to extract the VCF VariantContexts from the HaplotypePath. TODO remove if we get rid of HaplotypePath
- Parameters:
bestPath
- HaplotypePath containing one single path through the PHG.
-
getVariantContextFromHaplotypeNodeList
static List<VariantContext> getVariantContextFromHaplotypeNodeList(List<HaplotypeNode> nodeList)
Method to extract the VCF VariantContexts from a List of HaplotypeNodes
- Parameters:
nodeList
- List of HaplotypeNodes which we want the variantContexts from
-
writeVariantContextsToVCF
static void writeVariantContextsToVCF(List<VariantContext> variantContextList, String exportVCFFileName, String referenceFileName, List<String> taxa)
-
writeVariantContextsToVCF
static void writeVariantContextsToVCF(List<VariantContext> variantContextList, String exportVCFFileName, String referenceFileName, String taxonName)
Method to write the list of VariantContexts out to a vcf file. If the referenceFileName is not null, it will also index the file on the fly. TODO when we convert TASSEL's VCF reader to use htsjdk, rework this method into ExportUtils TODO use an optional for the referenceFileName
- Parameters:
variantContextList
- list of VariantContext objects that need to be written to the vcf fileexportVCFFileName
- String file name of the exported VCF filereferenceFileName
- String name of the reference fasta file name.taxonName
- Taxon name
-
callSNPsFromHaplotypePath
static void callSNPsFromHaplotypePath(HaplotypeGraph graph, HaplotypePath bestPath, String vcfFileDir, String exportVCFFileName, String referenceFileName, String taxonName)
-
callSNPsFromSomeVCFs
static void callSNPsFromSomeVCFs(String inputVCFFileDir, String exportVCFFileName, String referenceFileName, String taxonName)
-
callSNPsFromHaplotypeNodes
static void callSNPsFromHaplotypeNodes(List<HaplotypeNode> listOfNodes, HashMap<Integer, String> hapIdToFileNameMapping, String vcfFileDir, String exportVCFFileName, String referenceFileName, String taxonName)
-
createHapIdToFileNameMapping
static HashMap<Integer, String> createHapIdToFileNameMapping(HaplotypeGraph graph, String pangenomeDir)
-
createGenericHeader
static VCFHeader createGenericHeader(List<String> taxaNames)
-
createGenericHeaderLineSet
static Set<VCFHeaderLine> createGenericHeaderLineSet()
-
createGATKGVCFHeader
static VCFHeader createGATKGVCFHeader(List<String> taxaNames)
-
addInGQBlockHeader
static void addInGQBlockHeader(Set<VCFHeaderLine> headerLines)
-
createGVCFBlockHeaderLine
static VCFHeaderLine createGVCFBlockHeaderLine(int start, int exclusiveEnd)
-
-
-
-