Skip to content
Snippets Groups Projects
Commit b2a78f42 authored by tcarver's avatar tcarver
Browse files

test for selenocysteine qualifier

parent 3aeae377
No related branches found
No related tags found
No related merge requests found
......@@ -1320,6 +1320,36 @@ public class GFFStreamFeature extends SimpleDocumentFeature
return false;
}
/**
* Test if this is feature is marked as having a stop codon
* redefined as selenocysteine
* @param f
* @return
*/
public static boolean isSelenocysteine(Feature f)
{
if(!(f instanceof GFFStreamFeature))
return false;
try
{
ChadoCanonicalGene gffGene = ((GFFStreamFeature)f).getChadoGene();
if(gffGene == null)
return false;
String transcript = gffGene.getTranscriptFromName(
GeneUtils.getUniqueName(f));
if(transcript == null)
return false;
Feature pep = gffGene.getProteinOfTranscript(transcript);
if(pep == null)
return false;
if(pep.getQualifierByName("stop_codon_redefined_as_selenocysteine") != null)
return true;
}
catch (Exception e){}
return false;
}
public static void main(String args[])
{
Key key = new Key("region");
......
......@@ -677,6 +677,9 @@ public class ValidateFeature
if(!cds_predicate.testPredicate (f))
return false;
if(feature instanceof GFFStreamFeature && GFFStreamFeature.isSelenocysteine(feature))
return false;
final AminoAcidSequence aa = f.getTranslation ();
return aa.containsStopCodon ();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment