public class MummerScriptProcessing extends Object
| Constructor and Description |
|---|
MummerScriptProcessing() |
| Modifier and Type | Method and Description |
|---|---|
static net.maizegenetics.util.Tuple<String,String> |
adjustEntryForOverlap(String prevEntry,
String currentEntry,
int numOverlaps,
com.google.common.collect.Multimap<Integer,String> snpByRefMap,
com.google.common.collect.Multimap<Integer,String> snpByAsmMap) |
static void |
alignWithNucmer(String refFasta,
String asmFasta,
String outputDeltaFilePrefix,
String outputDir,
String mummer4Path,
int clusterSize)
Call mummer nucmer program to align the sequences
Parameters are:
-c 250: Set the minimum cluster length to 250
--mum: Use anchor matches that are unique in both the reference and query
|
static List<String> |
checkForEmbedded(List<String> sortedList,
boolean splitByRef)
Check entries in a list of mummer4 coords file entries and removed those
that are embedded
|
static net.maizegenetics.util.Tuple<Integer,Boolean> |
checkForOverlap(net.maizegenetics.util.Tuple<Integer,Integer> prevStartEnd,
net.maizegenetics.util.Tuple<Integer,Integer> curStartEnd)
Returns a Tuple indicating
|
static boolean |
checkNoListEntriesInRange(HashSet<Integer> hashSet,
List<Integer> testList)
Method takes a RangeSet of Integers and a list of integers.
|
static void |
filterCoordsOverlaps(String coordsNoEmbedded,
String snpFile,
String coordsFinal)
Takes a mummer coords file and searches for overlaps.
|
static void |
finalSnpFiltering(String outputSNPS,
String deltaFilePrefix,
String chrom) |
static List<String> |
findAlignmentsToReturn(List<String> removedList)
Finds groups of 3 or more lines that have descending start values,
and where the position of 1 is no more than .01 percent away from
the start of the next value.
|
static String |
getAdjustedMummerCoordEntry(String entry,
int adjustLen) |
static void |
refilterCoordsFile(String outputDeltaFilePrefix,
String coordsDelta,
String coordsDeltaG,
String coordsGNoEmbedded,
String chrom)
This method post-processes the filtered and original coords file.
|
static void |
runDeltaFilter(String deltaFilePrefix,
String outputDir,
String mummer4Path)
Call mummer4 delta-filter method with parameter:
-g 1-to-1 global alignment not allowing rearrangements
NOTE: the -g option filters out many alignments, including inversions.
|
static void |
runShowCoords(String deltaFilePrefix,
String outputDir,
String mummer4Path)
call mummer4 show-coords method
|
static void |
runShowSNPs(String deltaFilePrefix,
String outputDir,
String mummer4Path,
String chrom)
This method calls show-snps using only a delta file as input
|
static void |
runShowSNPsWithCat(String deltaFilePrefix,
String coordsForShowSnps,
String outputDir,
String mummer4Path,
String chrom)
Fun the mummer4 show-snps entry against a delta file, using a coords file as
additional input.
|
static List<String> |
splitOverlappingCoordsEntries(List<String> sortedList,
List<String> snpList,
boolean splitByRef)
Splits overlapping entries,
The mummer4 coords file entries will have these tab-delimited columns:
S1 E1 S2 E2 Len1 Len2 %ID refID asmID
The files processed were sorted by ref-coordiates via the show-coords -r param, so S1/E1 is ref coords
and S2/E2 are the assembly coordinates.
|
static List<String> |
verifySNPEntries(List<String> deltaSNPs,
String coordsFile,
String chrom)
This method takes a list of Mummer SNP file entries and verifies the SNP
positions are represented in the filtered/overlap-merged coords
file.
|
public static void alignWithNucmer(String refFasta, String asmFasta, String outputDeltaFilePrefix, String outputDir, String mummer4Path, int clusterSize)
refFasta - asmFasta - outputDeltaFilePrefix - outputDir - public static void runDeltaFilter(String deltaFilePrefix, String outputDir, String mummer4Path)
deltaFilePrefix - outputDir - public static void runShowCoords(String deltaFilePrefix, String outputDir, String mummer4Path)
deltaFilePrefix - outputDir - public static void refilterCoordsFile(String outputDeltaFilePrefix, String coordsDelta, String coordsDeltaG, String coordsGNoEmbedded, String chrom)
coordsDelta - coordsDeltaG - coordsFinal - public static void filterCoordsOverlaps(String coordsNoEmbedded, String snpFile, String coordsFinal)
coordsNoEmbedded - snpFile - SnpFIle used to determine assembly indelscoordsFinal - public static List<String> splitOverlappingCoordsEntries(List<String> sortedList, List<String> snpList, boolean splitByRef)
sortedFile - File to be filteredpublic static List<String> checkForEmbedded(List<String> sortedList, boolean splitByRef)
sortedList - List of sorted mummer coords file entries. Should be sorted by ref startsplitByRef - Boolean - if true, check ref embedded. Otherwise check if assembly coordinates are embeddedpublic static net.maizegenetics.util.Tuple<String,String> adjustEntryForOverlap(String prevEntry, String currentEntry, int numOverlaps, com.google.common.collect.Multimap<Integer,String> snpByRefMap, com.google.common.collect.Multimap<Integer,String> snpByAsmMap)
public static String getAdjustedMummerCoordEntry(String entry, int adjustLen)
public static net.maizegenetics.util.Tuple<Integer,Boolean> checkForOverlap(net.maizegenetics.util.Tuple<Integer,Integer> prevStartEnd, net.maizegenetics.util.Tuple<Integer,Integer> curStartEnd)
prevStartEnd - curStartEnd - public static List<String> findAlignmentsToReturn(List<String> removedList)
removedList - public static void runShowSNPsWithCat(String deltaFilePrefix, String coordsForShowSnps, String outputDir, String mummer4Path, String chrom)
deltaFilePrefix - coordsForShowSnps - outputDir - public static void finalSnpFiltering(String outputSNPS, String deltaFilePrefix, String chrom)
public static void runShowSNPs(String deltaFilePrefix, String outputDir, String mummer4Path, String chrom)
deltaFilePrefix - outputDir - public static List<String> verifySNPEntries(List<String> deltaSNPs, String coordsFile, String chrom)
deltaSNPs - - list of SNPs from a Mummer filtered delta filecoordsFile - - coordinates file to use when checking for positions.public static boolean checkNoListEntriesInRange(HashSet<Integer> hashSet, List<Integer> testList)
rangeSet - testList - Copyright © 2018. All rights reserved.