public class MutationFinder extends MutationExtractor
Modifier and Type | Field and Description |
---|---|
protected static Set<String> |
ambiguous |
protected static String |
MUT_RES |
protected static String |
POS |
protected static String |
WT_RES |
populateAminoAcidNameToOneLookupMap, populateAminoAcidThreeToOneLookupMap
Constructor and Description |
---|
MutationFinder()
Initialization of MutationFinder requires a set of regular expressions that will be used to detect mutations.
|
MutationFinder(File file)
Initialization of MutationFinder requires a set of regular expressions that will be used to detect mutations.
|
MutationFinder(Set<String> unprocessed_python_regexes)
Initialization of MutationFinder requires a set of regular expressions that will be used to detect mutations.
|
MutationFinder(String fileName)
Initialization of MutationFinder requires a set of regular expressions that will be used to detect mutations.
|
Modifier and Type | Method and Description |
---|---|
static Map<String,Integer> |
extractMappingsFromPythonRegex(String pythonRegex) |
Map<Mutation,Set<int[]>> |
extractMutations(String rawText)
Extract point mutations mentions from raw_text and return them in a map.
|
static void |
main(String[] args)
The main method demonstrates the execution of MutationFinder.
|
static String |
removeTagsFromPythonRegex(String regexStr) |
error, warn
protected static final String MUT_RES
protected static final String WT_RES
protected static final String POS
public MutationFinder()
public MutationFinder(String fileName)
fileName
- Since the original development of MutationFinder was conducted in Python, the input file contains regular expressions that are
Python-specific (due to the fact that that Java does not handle explicitly named groups). These regular expressions must therefore
be converted prior to use in the Java implementation. This conversion is handled by this constructor.public MutationFinder(File file)
file
- Since the original development of MutationFinder was conducted in Python, the input file contains regular expressions that are
Python-specific (due to the fact that that Java does not handle explicitly named groups). These regular expressions must therefore
be converted prior to use in the Java implementation. This conversion is handled by this constructor.public MutationFinder(Set<String> unprocessed_python_regexes)
unprocessed_python_regexes
- Since the original development of MutationFinder was conducted in Python, the set of regular expressions used is Python-specific in
that Java does not handle explicitly named groups. These regular expressions must therefore be converted prior to use in the Java
implementation. This conversion is handled by this constructor.public static Map<String,Integer> extractMappingsFromPythonRegex(String pythonRegex)
public Map<Mutation,Set<int[]>> extractMutations(String rawText) throws MutationException
extractMutations
in class MutationExtractor
rawText
- the text to be processedMutationException
public static void main(String[] args)
args
- args[0] - the regular expression fileCopyright © 2016. All rights reserved.