001/* 002 * BioJava development code 003 * 004 * This code may be freely distributed and modified under the 005 * terms of the GNU Lesser General Public Licence. This should 006 * be distributed with the code. If you do not have a copy, 007 * see: 008 * 009 * http://www.gnu.org/copyleft/lesser.html 010 * 011 * Copyright for this code is held jointly by the individual 012 * authors. These should be listed in @author doc comments. 013 * 014 * For more information on the BioJava project and its aims, 015 * or to join the biojava-l mailing list, visit the home page 016 * at: 017 * 018 * http://www.biojava.org/ 019 * 020 */ 021package org.biojava.nbio.core.sequence.compound; 022 023/** 024 * Ambiguity set for hybrid DNA/RNA sequences. Needed for some instances of synthetic nucleotide sequences present in protein structures from the PDB. 025 * 026 * @author Jose Duarte 027 * 028 */ 029public class AmbiguityDNARNAHybridCompoundSet extends DNACompoundSet { 030 031 private static class InitaliseOnDemand { 032 public static final AmbiguityDNARNAHybridCompoundSet INSTANCE = new AmbiguityDNARNAHybridCompoundSet(); 033 } 034 035 public static AmbiguityDNARNAHybridCompoundSet getDNARNAHybridCompoundSet() { 036 return InitaliseOnDemand.INSTANCE; 037 } 038 039 public AmbiguityDNARNAHybridCompoundSet() { 040 super(); 041 042 // this is the only one needed to make it a hybrid DNA/RNA. The rest are the usual DNA/RNA ambiguity letters 043 addNucleotideCompound("U", "A"); 044 045 046 addNucleotideCompound("M", "K", 047 "A", "C"); 048 addNucleotideCompound("R", "Y", 049 "A", "G"); 050 addNucleotideCompound("W", "W", 051 "A", "T"); 052 addNucleotideCompound("S", "S", 053 "C", "G"); 054 addNucleotideCompound("Y", "R", 055 "C", "T"); 056 addNucleotideCompound("K", "M", 057 "G", "T"); 058 addNucleotideCompound("V", "B", 059 "A", "C", "G"); 060 addNucleotideCompound("H", "D", 061 "A", "C", "T"); 062 addNucleotideCompound("D", "H", 063 "A", "G", "T"); 064 addNucleotideCompound("B", "V", 065 "C", "G", "T"); 066 addNucleotideCompound("N", "N", "A", "C", "G", "T"); 067 068 addNucleotideCompound("I", "I", "N", "A", "C", "G", "T"); 069 070 071 calculateIndirectAmbiguities(); 072 073 } 074}