/// <summary> /// returns true if the annotation is on the reverse strand, false otherwise /// </summary> public static bool GetStrand(AbstractData ad) { int strandNum = DumperUtilities.GetInt32(ad); // sanity check: make sure the value is either 1 or -1 if (strandNum != -1 && strandNum != 1) { throw new GeneralException($"Expected the strand number to be either -1 or 1. Found: {strandNum}."); } return(strandNum == -1); }
/// <summary> /// returns the mapper unit type given the specialized string key/value type /// </summary> public static MapperUnitType GetMapperUnitType(AbstractData ad) { string mapperUnitTypeString = DumperUtilities.GetString(ad); MapperUnitType ret; if (!MapperUnitTypes.TryGetValue(mapperUnitTypeString, out ret)) { throw new GeneralException( $"Unable to find the specified mapper unit type ({mapperUnitTypeString}) in the MapperUnitType dictionary."); } return(ret); }
/// <summary> /// returns the biotype given the specialized string key/value type /// </summary> public static GeneSymbolSource GetGeneSymbolSource(AbstractData ad) { return(GeneSymbolSourceUtilities.GetGeneSymbolSourceFromString(DumperUtilities.GetString(ad))); }
/// <summary> /// returns the biotype given the specialized string key/value type /// </summary> public static BioType GetBiotype(AbstractData ad) { return(BioTypeUtilities.GetBiotypeFromString(DumperUtilities.GetString(ad))); }