-
- All Implemented Interfaces:
-
java.util.concurrent.Callable
public class RunHapConsensusPipelinePlugin.RunMergeAndCluster implements Callable<V>
This class takes a reference range, run through all the taxon with their variants List, create genotype table based on variant_id from PHG variants table. Send this genotype table through FindHaplotypeClustersPlugin Decode results from clustersPlugin into actual alleles
-
-
Field Summary
Fields Modifier and Type Field Description public Multimap<Position, Tuple<AnchorDataPHG, List<String>>>
consensusDataMap
-
Constructor Summary
Constructors Constructor Description RunHapConsensusPipelinePlugin.RunMergeAndCluster(DataSet graphToMerge, Properties dbProperties, GenomeSequence referenceSequence)
RunHapConsensusPipelinePlugin.RunMergeAndCluster(DataSet graphToMerge, Properties dbProperties, GenomeSequence referenceSequence, Map<String, Double> rankingMap)
RunHapConsensusPipelinePlugin.RunMergeAndCluster()
-
Method Summary
Modifier and Type Method Description Multimap<Position, Tuple<AnchorDataPHG, List<String>>>
getConsensusDataMap()
RunHapConsensusPipelinePlugin.RunMergeAndCluster
call()
void
clusterThenMerge()
DistanceMatrix
calculateDistanceMatrix(Map<Taxon, RangeMap<Integer, HaplotypeNode.VariantInfo>> taxonToVariantInfoMap)
double
distanceFromSNPs(RangeMap<Integer, HaplotypeNode.VariantInfo> rangeMap1, RangeMap<Integer, HaplotypeNode.VariantInfo> rangeMap2)
void
clusterAssemblies()
Method to cluster Assemblies Steps Taken Here: For the current Reference Range, extract out all haplotypes in the graph Compute a distance matrix using #SNPS/(#SNPs+#Ref) as the distance. List<HaplotypeNode.VariantInfo>
consensusVariants(Map<Taxon, RangeMap<Integer, HaplotypeNode.VariantInfo>> taxonToVariantInfoMap, List<Taxon> taxa, ReferenceRange refRange)
ReferenceRange
getReferenceRange()
-
-
Constructor Detail
-
RunHapConsensusPipelinePlugin.RunMergeAndCluster
RunHapConsensusPipelinePlugin.RunMergeAndCluster(DataSet graphToMerge, Properties dbProperties, GenomeSequence referenceSequence)
-
RunHapConsensusPipelinePlugin.RunMergeAndCluster
RunHapConsensusPipelinePlugin.RunMergeAndCluster(DataSet graphToMerge, Properties dbProperties, GenomeSequence referenceSequence, Map<String, Double> rankingMap)
-
RunHapConsensusPipelinePlugin.RunMergeAndCluster
RunHapConsensusPipelinePlugin.RunMergeAndCluster()
-
-
Method Detail
-
getConsensusDataMap
Multimap<Position, Tuple<AnchorDataPHG, List<String>>> getConsensusDataMap()
-
clusterThenMerge
void clusterThenMerge()
-
calculateDistanceMatrix
DistanceMatrix calculateDistanceMatrix(Map<Taxon, RangeMap<Integer, HaplotypeNode.VariantInfo>> taxonToVariantInfoMap)
-
distanceFromSNPs
double distanceFromSNPs(RangeMap<Integer, HaplotypeNode.VariantInfo> rangeMap1, RangeMap<Integer, HaplotypeNode.VariantInfo> rangeMap2)
-
clusterAssemblies
void clusterAssemblies()
Method to cluster Assemblies Steps Taken Here: For the current Reference Range, extract out all haplotypes in the graph Compute a distance matrix using #SNPS/(#SNPs+#Ref) as the distance. Ignore indels and Ns. From this distance matrix, compute a UPGMA tree and cut at parameter mxDiv Within each sub group, chose a single haplotype to be the representative haplotype. This choice is done by the external rankingFile required to run this Once the representative haplotypes are chosen, write them to the db with the full Taxa list for the sub-group
-
consensusVariants
List<HaplotypeNode.VariantInfo> consensusVariants(Map<Taxon, RangeMap<Integer, HaplotypeNode.VariantInfo>> taxonToVariantInfoMap, List<Taxon> taxa, ReferenceRange refRange)
-
getReferenceRange
ReferenceRange getReferenceRange()
-
-
-
-