public class MutationMention extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MutationMention.Tool
Enumeration of all named entity recognition components
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
ambiguous
Flag indicating if this SNP is ambiguous.
|
protected EntityOffset |
location
Location in the text.
|
protected String |
mutResidue
Mutated residue.
|
protected List<dbSNPNormalized> |
normalized
List with normalized SNPs
|
protected boolean |
nsm
Flag indicating if this SNP is a nucleotide sequence mutation (NSM).
|
protected int |
patternId
Which regular expression has been used to extract this SNP from text (MutationFinder only)
|
protected String |
position
Location of the mutation wrt residue or nucleotides
|
protected boolean |
psm
Flag indicating if this SNP is a protein sequence mutation (PSM).
|
protected String |
ref
Used reference sequence (e.g.
|
protected String |
text
Text mention in the text.
|
protected MutationMention.Tool |
tool
Refers to which tool has been used for extraction (e.g., MutationFinder, SETH, ...)
|
protected Set<TranscriptNormalized> |
transcripts
Set of transcripts with which we successfully associated this Element
|
protected Type |
type
Type of Mutation (e.g., substitution, insertion, ...)
|
protected String |
wtResidue
Wildtype residue.
|
Constructor and Description |
---|
MutationMention()
Empty constructor
|
MutationMention(EntityOffset location,
String mutation) |
MutationMention(int start,
int end,
String text,
String ref,
String location,
String wild,
String mutated,
Type type,
MutationMention.Tool tool) |
MutationMention(String mutation)
Generates a Mutation object from a String like "A123T".
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<dbSNPNormalized> |
getBestNormalized()
Returns the best dbSNP entries associated with this mutation mention
The result is based on the ranking of dbSNPNormalized
|
int |
getEnd()
Gets the end-location of the mutation
|
EntityOffset |
getLocation()
Gets the location of the mutation
|
String |
getMutResidue()
Gets the residues.
|
List<dbSNPNormalized> |
getNormalized()
Returns all dbSNP entries associated with this mutation mention
|
int |
getPatternId()
Retrieves the pattern ID used for extracting the current Mutation mention
|
String |
getPosition()
Gets the position.
|
String |
getRef()
Returns reference sequence (e.g.
|
int |
getStart()
Gets the start-location of the mutation
|
String |
getText()
Returns text-mined text (e.g.
|
MutationMention.Tool |
getTool()
Returns
MutationMention.Tool used to find mutation (MutationFinder or SETH) |
Set<TranscriptNormalized> |
getTranscripts()
Returns all Transcripts covering this SNP
|
Type |
getType()
Returns Mutation
Type (e.g. |
String |
getWtResidue()
Gets the residue.
|
int |
hashCode() |
boolean |
isAmbiguous() |
boolean |
isNsm() |
boolean |
isPsm() |
void |
normalizeSequences(Set<Transcript> candidateTranscripts,
List<UniprotFeature> features,
boolean append)
This method evaluates if some of the
Transcript provided in candidateTranscripts
equals the text-mined MutationMention . |
void |
normalizeSNP(int id)
Method allows us to "manually" normalize a mutation mention to a dbSNP ID
Method is currently not invoked, but might be called for the dbSNPRecognized
|
void |
normalizeSNP(List<dbSNP> candidates,
List<UniprotFeature> features,
boolean append)
This method evaluates if some of the
dbSNP provided in candidates
actually equals the text-mined MutationMention |
static Map<Integer,List<MutationMention>> |
readMutations(String file)
This method loads Mutations from a file which are in the following format
described in data/snps.txt (PMID\tWMutM\tstart\tstop)
|
void |
setAmbiguous(boolean ambiguous) |
void |
setMutResidue(String mutResidue)
Sets the residues.
|
void |
setNsm(boolean nsm) |
void |
setPatternId(int patternId)
Sets pattern ID
|
void |
setPosition(String position)
Sets the position.
|
void |
setPsm(boolean psm) |
void |
setWtResidue(String wtResidue)
Sets the residue.
|
String |
toHGVS()
Generates a human genome variation nomenclature
compliant representation of the mutation mention
|
String |
toNormalized() |
String |
toString()
(non-Javadoc)
|
protected Type type
protected MutationMention.Tool tool
protected EntityOffset location
protected String text
protected String ref
protected String wtResidue
protected String mutResidue
protected String position
protected boolean nsm
protected boolean psm
protected boolean ambiguous
protected int patternId
protected List<dbSNPNormalized> normalized
protected Set<TranscriptNormalized> transcripts
public MutationMention()
public MutationMention(String mutation)
mutation
- Mutationstring (e.g. A123T)public MutationMention(EntityOffset location, String mutation)
location
- Location in textmutation
- Mutationstring (e.g. A123T)public void normalizeSequences(Set<Transcript> candidateTranscripts, List<UniprotFeature> features, boolean append)
Transcript
provided in candidateTranscripts
equals the text-mined MutationMention
. In difference to normalizeSNP(java.util.List, java.util.List, boolean)
this method tries to normalize to sequence-ID and not to dbSNP-IDscandidateTranscripts
- List of dbSNP-entries which might actually describe this SNPfeatures
- List of associated uniprot featuresappend
- Sometimes normalization has to be invoked several times (for several genes) Flag indicates if the result is appended or notpublic void normalizeSNP(int id)
id
- dbSNP ID we want to normalize topublic void normalizeSNP(List<dbSNP> candidates, List<UniprotFeature> features, boolean append)
dbSNP
provided in candidates
actually equals the text-mined MutationMention
candidates
- List of dbSNP-entries which might actually describe this SNPfeatures
- List of associated uniprot featuresappend
- Sometimes normalization has to be invoked several times (for several genes) Should we append result or not?public static Map<Integer,List<MutationMention>> readMutations(String file) throws IOException
file
- with mutationsFileNotFoundException
IOException
public EntityOffset getLocation()
public int getStart()
public int getEnd()
public String getWtResidue()
public void setWtResidue(String wtResidue)
wtResidue
- the new residuepublic String getMutResidue()
public void setMutResidue(String mutResidue)
mutResidue
- the new residuespublic String getPosition()
public void setPosition(String position)
position
- the new positionpublic boolean isNsm()
public void setNsm(boolean nsm)
public boolean isPsm()
public void setPsm(boolean psm)
public boolean isAmbiguous()
public void setAmbiguous(boolean ambiguous)
public MutationMention.Tool getTool()
MutationMention.Tool
used to find mutation (MutationFinder or SETH)MutationMention.Tool
used to find mutationpublic String getText()
public String getRef()
public List<dbSNPNormalized> getNormalized()
public List<dbSNPNormalized> getBestNormalized()
public Set<TranscriptNormalized> getTranscripts()
public int getPatternId()
public void setPatternId(int patternId)
patternId
- pattern IDpublic String toHGVS()
public String toString()
toString
in class Object
Object.toString()
public String toNormalized()
Copyright © 2016. All rights reserved.