All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hfg.bio.molbio.RestrictionEnzyme Maven / Gradle / Ivy

There is a newer version: 20240423
Show newest version
package com.hfg.bio.molbio;


import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.hfg.bio.Strand;
import com.hfg.bio.seq.SeqLocation;
import com.hfg.bio.seq.pattern.NucleotidePattern;
import com.hfg.bio.seq.pattern.SeqPatternConfigurationException;
import com.hfg.util.StringBuilderPlus;
import com.hfg.util.StringUtil;
import com.hfg.util.collection.CollectionUtil;
import com.hfg.util.collection.OrderedSet;

//------------------------------------------------------------------------------
/**
 Restriction enzyme is an endonuclease used for cutting DNA/RNA at specific locations.
 
@author J. Alex Taylor, hairyfatguy.com
*/ //------------------------------------------------------------------------------ // com.hfg Library // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com // [email protected] //------------------------------------------------------------------------------ public class RestrictionEnzyme extends NucleotidePattern { // This declaration has to come before the public constants below. private static Set sValues = new OrderedSet<>(); public static final Comparator LOCATION_COMPARATOR = new RestrictionEnzyme().new LocationComparator(); private static final Pattern s5PrimeNonPalindromicCutSpecPattern = Pattern.compile("^\\((\\-?\\d+)/(\\-?\\d+)\\)"); private static final Pattern s3PrimeNonPalindromicCutSpecPattern = Pattern.compile("\\((\\-?\\d+)/(\\-?\\d+)\\)$"); private String mRecognitionSequence; private boolean mIsPalindromic; private int[] mFwdStrandCutSiteIndices; private int[] mRevStrandCutSiteIndices; //########################################################################## // PUBLIC FIELDS //########################################################################## // Recognition site syntax: // - A backslash in binding site indicates the blunt-end cut site // - An (optional) numbers in parenthesis following the binding site residues indicates the offset of the forward and reverse strand cuts // Ex: AarI CACCTGC(4/8) Ex: AciI CCGC(-3/-1) // CACCTGCNNNN^NNNN C^CGC // GTGGACGNNNN NNNN^ GGC^G public static final RestrictionEnzyme AarI = new RestrictionEnzyme().setName("AarI").setRecognitionSequence("CACCTGC(4/8)").lock().register(); public static final RestrictionEnzyme AatII = new RestrictionEnzyme().setName("AatII").setRecognitionSequence("GACGT/C").lock().register(); public static final RestrictionEnzyme AcII = new RestrictionEnzyme().setName("AcII").setRecognitionSequence("AA/CGTT").lock().register(); public static final RestrictionEnzyme AccI = new RestrictionEnzyme().setName("AccI").setRecognitionSequence("GT/MKAC").lock().register(); public static final RestrictionEnzyme Acc65I = new RestrictionEnzyme().setName("Acc65I").setRecognitionSequence("G/GTACC").lock().register(); public static final RestrictionEnzyme AciI = new RestrictionEnzyme().setName("AciI").setRecognitionSequence("CCGC(-3/-1)").lock().register(); public static final RestrictionEnzyme AcuI = new RestrictionEnzyme().setName("AcuI").setRecognitionSequence("CTGAAG(16/14)").lock().register(); public static final RestrictionEnzyme AfeI = new RestrictionEnzyme().setName("AfeI").setRecognitionSequence("AGC/GCT").lock().register(); public static final RestrictionEnzyme AflII = new RestrictionEnzyme().setName("AflII").setRecognitionSequence("C/TTAAG").lock().register(); public static final RestrictionEnzyme AflIII = new RestrictionEnzyme().setName("AflIII").setRecognitionSequence("A/CRYGT").lock().register(); public static final RestrictionEnzyme AgeI = new RestrictionEnzyme().setName("AgeI").setRecognitionSequence("A/CCGGT").lock().register(); public static final RestrictionEnzyme AhdI = new RestrictionEnzyme().setName("AhdI").setRecognitionSequence("GACNNN/NNGTC").lock().register(); public static final RestrictionEnzyme AleI = new RestrictionEnzyme().setName("AleI").setRecognitionSequence("CACNN/NNGTG").lock().register(); public static final RestrictionEnzyme AluI = new RestrictionEnzyme().setName("AluI").setRecognitionSequence("AG/CT").lock().register(); public static final RestrictionEnzyme AlwI = new RestrictionEnzyme().setName("AlwI").setRecognitionSequence("GGATC(4/5)").lock().register(); public static final RestrictionEnzyme AlwNI = new RestrictionEnzyme().setName("AlwNI").setRecognitionSequence("CAGNNN/CTG").lock().register(); public static final RestrictionEnzyme ApaI = new RestrictionEnzyme().setName("ApaI").setRecognitionSequence("GGGCC/C").lock().register(); public static final RestrictionEnzyme ApaLI = new RestrictionEnzyme().setName("ApaLI").setRecognitionSequence("G/TGCAC").lock().register(); public static final RestrictionEnzyme ApoI = new RestrictionEnzyme().setName("ApoI").setRecognitionSequence("R/AATTY").lock().register(); public static final RestrictionEnzyme AscI = new RestrictionEnzyme().setName("AscI").setRecognitionSequence("GG/CGCGCC").lock().register(); public static final RestrictionEnzyme AseI = new RestrictionEnzyme().setName("AseI").setRecognitionSequence("AT/TAAT").lock().register(); public static final RestrictionEnzyme AsiSI = new RestrictionEnzyme().setName("AsiSI").setRecognitionSequence("GCGAT/CGC").lock().register(); public static final RestrictionEnzyme AvaI = new RestrictionEnzyme().setName("AvaI").setRecognitionSequence("C/YCGRG").lock().register(); public static final RestrictionEnzyme AvaII = new RestrictionEnzyme().setName("AvaII").setRecognitionSequence("G/GWCC").lock().register(); public static final RestrictionEnzyme AvrII = new RestrictionEnzyme().setName("AvrII").setRecognitionSequence("C/CTAGG").lock().register(); public static final RestrictionEnzyme BaeI = new RestrictionEnzyme().setName("BaeI").setRecognitionSequence("(10/15)ACNNNNGTAYC(12/7)").lock().register(); public static final RestrictionEnzyme BaeGI = new RestrictionEnzyme().setName("BaeGI").setRecognitionSequence("GKGCM/C").lock().register(); public static final RestrictionEnzyme BamHI = new RestrictionEnzyme().setName("BamHI").setRecognitionSequence("G/GATCC").lock().register(); public static final RestrictionEnzyme BanI = new RestrictionEnzyme().setName("BanI").setRecognitionSequence("G/GYRCC").lock().register(); public static final RestrictionEnzyme BanII = new RestrictionEnzyme().setName("BanII").setRecognitionSequence("GRGCY/C").lock().register(); public static final RestrictionEnzyme BbsI = new RestrictionEnzyme().setName("BbsI").setRecognitionSequence("GAAGAC(2/6)").lock().register(); public static final RestrictionEnzyme BbvI = new RestrictionEnzyme().setName("BbvI").setRecognitionSequence("GCAGC(8/12)").lock().register(); public static final RestrictionEnzyme BbvCI = new RestrictionEnzyme().setName("BbvCI").setRecognitionSequence("CCTCAGC(-5/-2)").lock().register(); public static final RestrictionEnzyme BccI = new RestrictionEnzyme().setName("BccI").setRecognitionSequence("CCATC(4/5)").lock().register(); public static final RestrictionEnzyme BceAI = new RestrictionEnzyme().setName("BceAI").setRecognitionSequence("ACGGC(12/14)").lock().register(); public static final RestrictionEnzyme BcgI = new RestrictionEnzyme().setName("BcgI").setRecognitionSequence("(10/12)CGANNNNNNTGC(12/10)").lock().register(); public static final RestrictionEnzyme BciVI = new RestrictionEnzyme().setName("BciVI").setRecognitionSequence("GTATCC(6/5)").lock().register(); public static final RestrictionEnzyme BclI = new RestrictionEnzyme().setName("BclI").setRecognitionSequence("T/GATCA").lock().register(); public static final RestrictionEnzyme BfaI = new RestrictionEnzyme().setName("BfaI").setRecognitionSequence("C/TAG").lock().register(); public static final RestrictionEnzyme BglI = new RestrictionEnzyme().setName("BglI").setRecognitionSequence("GCCNNNN/NGGC").lock().register(); public static final RestrictionEnzyme BglII = new RestrictionEnzyme().setName("BglII").setRecognitionSequence("A/GATCT").lock().register(); public static final RestrictionEnzyme BlpI = new RestrictionEnzyme().setName("BlpI").setRecognitionSequence("GC/TNAGC").lock().register(); public static final RestrictionEnzyme BmgBI = new RestrictionEnzyme().setName("BmgBI").setRecognitionSequence("CACGTC(-3/-3)").lock().register(); public static final RestrictionEnzyme BmrI = new RestrictionEnzyme().setName("BmrI").setRecognitionSequence("ACTGGG(5/4)").lock().register(); public static final RestrictionEnzyme BmtI = new RestrictionEnzyme().setName("BmtI").setRecognitionSequence("GCTAG/C").lock().register(); public static final RestrictionEnzyme BpmI = new RestrictionEnzyme().setName("BpmI").setRecognitionSequence("CTGGAG(16/14)").lock().register(); public static final RestrictionEnzyme BpuEI = new RestrictionEnzyme().setName("BpuEI").setRecognitionSequence("CTTGAG(16/14)").lock().register(); public static final RestrictionEnzyme Bpu10I = new RestrictionEnzyme().setName("Bpu10I").setRecognitionSequence("CCTNAGC(-5/-2)").lock().register(); public static final RestrictionEnzyme BsaI = new RestrictionEnzyme().setName("BsaI").setRecognitionSequence("GGTCTC(1/5)").lock().register(); public static final RestrictionEnzyme BsaAI = new RestrictionEnzyme().setName("BsaAI").setRecognitionSequence("YAC/GTR").lock().register(); public static final RestrictionEnzyme BsaBI = new RestrictionEnzyme().setName("BsaBI").setRecognitionSequence("GATNN/NNATC").lock().register(); public static final RestrictionEnzyme BsaHI = new RestrictionEnzyme().setName("BsaHI").setRecognitionSequence("GR/CGYC").lock().register(); public static final RestrictionEnzyme BsaJI = new RestrictionEnzyme().setName("BsaJI").setRecognitionSequence("C/CNNGG").lock().register(); public static final RestrictionEnzyme BsaXI = new RestrictionEnzyme().setName("BsaXI").setRecognitionSequence("(9/12)ACNNNNNCTCC(10/7)").lock().register(); public static final RestrictionEnzyme BseRI = new RestrictionEnzyme().setName("BseRI").setRecognitionSequence("GAGGAG(10/8)").lock().register(); public static final RestrictionEnzyme BsaWI = new RestrictionEnzyme().setName("BsaWI").setRecognitionSequence("W/CCGGW").lock().register(); public static final RestrictionEnzyme BseYI = new RestrictionEnzyme().setName("BseYI").setRecognitionSequence("CCCAGC(-5/-1)").lock().register(); public static final RestrictionEnzyme BsgI = new RestrictionEnzyme().setName("BsgI").setRecognitionSequence("GTGCAG(16/14)").lock().register(); public static final RestrictionEnzyme BsiEI = new RestrictionEnzyme().setName("BsiEI").setRecognitionSequence("CGRY/CG").lock().register(); public static final RestrictionEnzyme BsiHKAI = new RestrictionEnzyme().setName("BsiHKAI").setRecognitionSequence("GWGCW/C").lock().register(); public static final RestrictionEnzyme BsiWI = new RestrictionEnzyme().setName("BsiWI").setRecognitionSequence("C/GTACG").lock().register(); public static final RestrictionEnzyme BslI = new RestrictionEnzyme().setName("BslI").setRecognitionSequence("CCNNNNN/NNGG").lock().register(); public static final RestrictionEnzyme BsmI = new RestrictionEnzyme().setName("BsmI").setRecognitionSequence("GAATGC(1/-1)").lock().register(); public static final RestrictionEnzyme BsmAI = new RestrictionEnzyme().setName("BsmAI").setRecognitionSequence("GTCTC(1/5)").lock().register(); public static final RestrictionEnzyme BsmBI = new RestrictionEnzyme().setName("BsmBI").setRecognitionSequence("CGTCTC(1/5)").lock().register(); public static final RestrictionEnzyme BsmFI = new RestrictionEnzyme().setName("BsmFI").setRecognitionSequence("GGGAC(10/14)").lock().register(); public static final RestrictionEnzyme Bsp1286I = new RestrictionEnzyme().setName("Bsp1286I").setRecognitionSequence("GDGCH/C").lock().register(); public static final RestrictionEnzyme BspCNI = new RestrictionEnzyme().setName("BspCNI").setRecognitionSequence("CTCAG(9/7)").lock().register(); public static final RestrictionEnzyme BspEI = new RestrictionEnzyme().setName("BspEI").setRecognitionSequence("T/CCGGA").lock().register(); public static final RestrictionEnzyme BspHI = new RestrictionEnzyme().setName("BspHI").setRecognitionSequence("T/CATGA").lock().register(); public static final RestrictionEnzyme BspMI = new RestrictionEnzyme().setName("BspMI").setRecognitionSequence("ACCTGC(4/8)").lock().register(); public static final RestrictionEnzyme BsrI = new RestrictionEnzyme().setName("BsrI").setRecognitionSequence("ACTGG(1/-1)").lock().register(); public static final RestrictionEnzyme BsrBI = new RestrictionEnzyme().setName("BsrBI").setRecognitionSequence("CCGCTC(-3/-3)").lock().register(); public static final RestrictionEnzyme BsrDI = new RestrictionEnzyme().setName("BsrDI").setRecognitionSequence("GCAATG(2/0)").lock().register(); public static final RestrictionEnzyme BsrFI = new RestrictionEnzyme().setName("BsrFI").setRecognitionSequence("R/CCGGY").lock().register(); public static final RestrictionEnzyme BsrGI = new RestrictionEnzyme().setName("BsrGI").setRecognitionSequence("T/GTACA").lock().register(); public static final RestrictionEnzyme BssHII = new RestrictionEnzyme().setName("BssHII").setRecognitionSequence("G/CGCGC").lock().register(); public static final RestrictionEnzyme BssKI = new RestrictionEnzyme().setName("BssKI").setRecognitionSequence("/CCNGG").lock().register(); public static final RestrictionEnzyme BssSI = new RestrictionEnzyme().setName("BssSI").setRecognitionSequence("CACGAG(-5/-1)").lock().register(); public static final RestrictionEnzyme BstAPI = new RestrictionEnzyme().setName("BstAPI").setRecognitionSequence("GCANNNN/NTGC").lock().register(); public static final RestrictionEnzyme BstBI = new RestrictionEnzyme().setName("BstBI").setRecognitionSequence("TT/CGAA").lock().register(); public static final RestrictionEnzyme BstEII = new RestrictionEnzyme().setName("BstEII").setRecognitionSequence("G/GTNACC").lock().register(); public static final RestrictionEnzyme BstNI = new RestrictionEnzyme().setName("BstNI").setRecognitionSequence("CC/WGG").lock().register(); public static final RestrictionEnzyme BstUI = new RestrictionEnzyme().setName("BstUI").setRecognitionSequence("CG/CG").lock().register(); public static final RestrictionEnzyme BstXI = new RestrictionEnzyme().setName("BstXI").setRecognitionSequence("CCANNNNN/NTGG").lock().register(); public static final RestrictionEnzyme BstYI = new RestrictionEnzyme().setName("BstYI").setRecognitionSequence("R/GATCY").lock().register(); public static final RestrictionEnzyme BstZ17I = new RestrictionEnzyme().setName("BstZ17I").setRecognitionSequence("GTA/TAC").lock().register(); public static final RestrictionEnzyme Bsu36I = new RestrictionEnzyme().setName("Bsu36I").setRecognitionSequence("CC/TNAGG").lock().register(); public static final RestrictionEnzyme BtgI = new RestrictionEnzyme().setName("BtgI").setRecognitionSequence("C/CRYGG").lock().register(); public static final RestrictionEnzyme BtgZI = new RestrictionEnzyme().setName("BtgZI").setRecognitionSequence("GCGATG(10/14)").lock().register(); public static final RestrictionEnzyme BtsI = new RestrictionEnzyme().setName("BtsI").setRecognitionSequence("GCAGTG(2/0)").lock().register(); public static final RestrictionEnzyme BtsCI = new RestrictionEnzyme().setName("BtsCI").setRecognitionSequence("GGATG(2/0)").lock().register(); public static final RestrictionEnzyme BtsIMutI = new RestrictionEnzyme().setName("BtsIMutI").setRecognitionSequence("CAGTG(2/0)").lock().register(); public static final RestrictionEnzyme Cac8I = new RestrictionEnzyme().setName("Cac8I").setRecognitionSequence("GCN/NGC").lock().register(); public static final RestrictionEnzyme ClaI = new RestrictionEnzyme().setName("ClaI").setRecognitionSequence("AT/CGAT").lock().register(); public static final RestrictionEnzyme CspCI = new RestrictionEnzyme().setName("CspCI").setRecognitionSequence("(11/13)CAANNNNNGTGG(12/10)").lock().register(); public static final RestrictionEnzyme CviAII = new RestrictionEnzyme().setName("CviAII").setRecognitionSequence("C/ATG").lock().register(); public static final RestrictionEnzyme CviKI_1 = new RestrictionEnzyme().setName("CviKI-1").setRecognitionSequence("RG/CY").lock().register(); public static final RestrictionEnzyme CviQI = new RestrictionEnzyme().setName("CviQI").setRecognitionSequence("G/TAC").lock().register(); public static final RestrictionEnzyme DdeI = new RestrictionEnzyme().setName("DdeI").setRecognitionSequence("C/TNAG").lock().register(); public static final RestrictionEnzyme DpnI = new RestrictionEnzyme().setName("DpnI").setRecognitionSequence("GA/TC").lock().register(); public static final RestrictionEnzyme DraI = new RestrictionEnzyme().setName("DraI").setRecognitionSequence("TTT/AAA").lock().register(); public static final RestrictionEnzyme DraIII = new RestrictionEnzyme().setName("DraIII").setRecognitionSequence("CACNNN/GTG").lock().register(); public static final RestrictionEnzyme DrdI = new RestrictionEnzyme().setName("DrdI").setRecognitionSequence("GACNNNN/NNGTC").lock().register(); public static final RestrictionEnzyme EaeI = new RestrictionEnzyme().setName("EaeI").setRecognitionSequence("Y/GGCCR").lock().register(); public static final RestrictionEnzyme EagI = new RestrictionEnzyme().setName("EagI").setRecognitionSequence("C/GGCCG").lock().register(); public static final RestrictionEnzyme EarI = new RestrictionEnzyme().setName("EarI").setRecognitionSequence("CTCTTC(1/4)").lock().register(); public static final RestrictionEnzyme EciI = new RestrictionEnzyme().setName("EciI").setRecognitionSequence("GGCGGA(11/9)").lock().register(); public static final RestrictionEnzyme Eco53kI = new RestrictionEnzyme().setName("Eco53kI").setRecognitionSequence("GAG/CTC").lock().register(); public static final RestrictionEnzyme EcoO109I = new RestrictionEnzyme().setName("EcoO109I").setRecognitionSequence("RG/GNCCY").lock().register(); public static final RestrictionEnzyme EcoNI = new RestrictionEnzyme().setName("EcoNI").setRecognitionSequence("CCTNN/NNNAGG").lock().register(); public static final RestrictionEnzyme EcoP15I = new RestrictionEnzyme().setName("EcoP15I").setRecognitionSequence("CAGCAG(25/27)").lock().register(); public static final RestrictionEnzyme EcoRI = new RestrictionEnzyme().setName("EcoRI").setRecognitionSequence("G/AATTC").lock().register(); public static final RestrictionEnzyme EcoRV = new RestrictionEnzyme().setName("EcoRV").setRecognitionSequence("GAT/ATC").lock().register(); public static final RestrictionEnzyme FatI = new RestrictionEnzyme().setName("FatI").setRecognitionSequence("/CATG").lock().register(); public static final RestrictionEnzyme FauI = new RestrictionEnzyme().setName("FauI").setRecognitionSequence("CCCGC(4/6)").lock().register(); public static final RestrictionEnzyme Fnu4HI = new RestrictionEnzyme().setName("Fnu4HI").setRecognitionSequence("GC/NGC").lock().register(); public static final RestrictionEnzyme FokI = new RestrictionEnzyme().setName("FokI").setRecognitionSequence("GGATG(9/13)").lock().register(); public static final RestrictionEnzyme FseI = new RestrictionEnzyme().setName("FseI").setRecognitionSequence("GGCCGG/CC").lock().register(); public static final RestrictionEnzyme FspI = new RestrictionEnzyme().setName("FspI").setRecognitionSequence("TGC/GCA").lock().register(); public static final RestrictionEnzyme FspEI = new RestrictionEnzyme().setName("FspEI").setRecognitionSequence("CC(12/16)").lock().register(); public static final RestrictionEnzyme HaeII = new RestrictionEnzyme().setName("HaeII").setRecognitionSequence("RGCGC/Y").lock().register(); public static final RestrictionEnzyme HaeIII = new RestrictionEnzyme().setName("HaeIII").setRecognitionSequence("GG/CC").lock().register(); public static final RestrictionEnzyme HgaI = new RestrictionEnzyme().setName("HgaI").setRecognitionSequence("GACGC(5/10)").lock().register(); public static final RestrictionEnzyme HhaI = new RestrictionEnzyme().setName("HhaI").setRecognitionSequence("GCG/C").lock().register(); public static final RestrictionEnzyme HincII = new RestrictionEnzyme().setName("HincII").setRecognitionSequence("GTY/RAC").lock().register(); public static final RestrictionEnzyme HindIII = new RestrictionEnzyme().setName("HindIII").setRecognitionSequence("A/AGCTT").lock().register(); public static final RestrictionEnzyme HinfI = new RestrictionEnzyme().setName("HinfI").setRecognitionSequence("G/ANTC").lock().register(); public static final RestrictionEnzyme HinP1I = new RestrictionEnzyme().setName("HinP1I").setRecognitionSequence("G/CGC").lock().register(); public static final RestrictionEnzyme HpaI = new RestrictionEnzyme().setName("HpaI").setRecognitionSequence("GTT/AAC").lock().register(); public static final RestrictionEnzyme HphI = new RestrictionEnzyme().setName("HphI").setRecognitionSequence("GGTGA(8/7)").lock().register(); public static final RestrictionEnzyme Hpy99I = new RestrictionEnzyme().setName("Hpy99I").setRecognitionSequence("CGWCG/").lock().register(); public static final RestrictionEnzyme Hpy166II = new RestrictionEnzyme().setName("Hpy166II").setRecognitionSequence("GTN/NAC").lock().register(); public static final RestrictionEnzyme Hpy188I = new RestrictionEnzyme().setName("Hpy188I").setRecognitionSequence("TCN/GA").lock().register(); public static final RestrictionEnzyme Hpy188III = new RestrictionEnzyme().setName("Hpy188III").setRecognitionSequence("TC/NNGA").lock().register(); public static final RestrictionEnzyme HpyAV = new RestrictionEnzyme().setName("HpyAV").setRecognitionSequence("CCTTC(6/5)").lock().register(); public static final RestrictionEnzyme HpyCH4III = new RestrictionEnzyme().setName("HpyCH4III").setRecognitionSequence("ACN/GT").lock().register(); public static final RestrictionEnzyme HpyCH4IV = new RestrictionEnzyme().setName("HpyCH4IV").setRecognitionSequence("A/CGT").lock().register(); public static final RestrictionEnzyme HpyCH4V = new RestrictionEnzyme().setName("HpyCH4V").setRecognitionSequence("TG/CA").lock().register(); public static final RestrictionEnzyme I_CeuI = new RestrictionEnzyme().setName("I-CeuI").setRecognitionSequence("TAACTATAACGGTCCTAAGGTAGCGAA(-9/-13)").lock().register(); public static final RestrictionEnzyme I_SceI = new RestrictionEnzyme().setName("I-SceI").setRecognitionSequence("TAGGGATAACAGGGTAAT(-9/-13)").lock().register(); public static final RestrictionEnzyme KasI = new RestrictionEnzyme().setName("KasI").setRecognitionSequence("G/GCGCC").lock().register(); public static final RestrictionEnzyme KpnI = new RestrictionEnzyme().setName("KpnI").setRecognitionSequence("GGTAC/C").lock().register(); public static final RestrictionEnzyme LpnPI = new RestrictionEnzyme().setName("LpnPI").setRecognitionSequence("CCDG(10/14)").lock().register(); public static final RestrictionEnzyme MboI = new RestrictionEnzyme().setName("MboI").setRecognitionSequence("/GATC").lock().register(); public static final RestrictionEnzyme MboII = new RestrictionEnzyme().setName("MboII").setRecognitionSequence("GAAGA(8/7)").lock().register(); public static final RestrictionEnzyme MfeI = new RestrictionEnzyme().setName("MfeI").setRecognitionSequence("C/AATTG").lock().register(); public static final RestrictionEnzyme MluI = new RestrictionEnzyme().setName("MluI").setRecognitionSequence("A/CGCGT").lock().register(); public static final RestrictionEnzyme MluCI = new RestrictionEnzyme().setName("MluCI").setRecognitionSequence("/AATT").lock().register(); public static final RestrictionEnzyme MlyI = new RestrictionEnzyme().setName("MlyI").setRecognitionSequence("GAGTC(5/5)").lock().register(); public static final RestrictionEnzyme MmeI = new RestrictionEnzyme().setName("MmeI").setRecognitionSequence("TCCRAC(20/18)").lock().register(); public static final RestrictionEnzyme MnlI = new RestrictionEnzyme().setName("MnlI").setRecognitionSequence("CCTC(7/6)").lock().register(); public static final RestrictionEnzyme MscI = new RestrictionEnzyme().setName("MscI").setRecognitionSequence("TGG/CCA").lock().register(); public static final RestrictionEnzyme MseI = new RestrictionEnzyme().setName("MseI").setRecognitionSequence("T/TAA").lock().register(); public static final RestrictionEnzyme MslI = new RestrictionEnzyme().setName("MslI").setRecognitionSequence("CAYNN/NNRTG").lock().register(); public static final RestrictionEnzyme MspI = new RestrictionEnzyme().setName("MspI").setRecognitionSequence("C/CGG").lock().register(); public static final RestrictionEnzyme MspA1I = new RestrictionEnzyme().setName("MspA1I").setRecognitionSequence("CMG/CKG").lock().register(); public static final RestrictionEnzyme MspJI = new RestrictionEnzyme().setName("MspJI").setRecognitionSequence("CNNR(9/13)").lock().register(); public static final RestrictionEnzyme MwoI = new RestrictionEnzyme().setName("MwoI").setRecognitionSequence("GCNNNNN/NNGC").lock().register(); public static final RestrictionEnzyme NaeI = new RestrictionEnzyme().setName("NaeI").setRecognitionSequence("GCC/GGC").lock().register(); public static final RestrictionEnzyme NarI = new RestrictionEnzyme().setName("NarI").setRecognitionSequence("GG/CGCC").lock().register(); public static final RestrictionEnzyme NciI = new RestrictionEnzyme().setName("NciI").setRecognitionSequence("CC/SGG").lock().register(); public static final RestrictionEnzyme NcoI = new RestrictionEnzyme().setName("NcoI").setRecognitionSequence("C/CATGG").lock().register(); public static final RestrictionEnzyme NdeI = new RestrictionEnzyme().setName("NdeI").setRecognitionSequence("CA/TATG").lock().register(); public static final RestrictionEnzyme NgoMIV = new RestrictionEnzyme().setName("NgoMIV").setRecognitionSequence("G/CCGGC").lock().register(); public static final RestrictionEnzyme NheI = new RestrictionEnzyme().setName("NheI").setRecognitionSequence("G/CTAGC").lock().register(); public static final RestrictionEnzyme NlaIII = new RestrictionEnzyme().setName("NlaIII").setRecognitionSequence("CATG/").lock().register(); public static final RestrictionEnzyme NlaIV = new RestrictionEnzyme().setName("NlaIV").setRecognitionSequence("GGN/NCC").lock().register(); public static final RestrictionEnzyme NmeAIII = new RestrictionEnzyme().setName("NmeAIII").setRecognitionSequence("GCCGAG(21/19)").lock().register(); public static final RestrictionEnzyme NotI = new RestrictionEnzyme().setName("NotI").setRecognitionSequence("GC/GGCCGC").lock().register(); public static final RestrictionEnzyme NruI = new RestrictionEnzyme().setName("NruI").setRecognitionSequence("TCG/CGA").lock().register(); public static final RestrictionEnzyme NsiI = new RestrictionEnzyme().setName("NsiI").setRecognitionSequence("ATGCA/T").lock().register(); public static final RestrictionEnzyme NspI = new RestrictionEnzyme().setName("NspI").setRecognitionSequence("RCATG/Y").lock().register(); public static final RestrictionEnzyme Nt_AlwI = new RestrictionEnzyme().setName("Nt.AlwI").setRecognitionSequence("GGATC(4/-5)").lock().register(); public static final RestrictionEnzyme Nt_BbvCI = new RestrictionEnzyme().setName("Nt.BbvCI").setRecognitionSequence("CCTCAGC(-5/-7)").lock().register(); public static final RestrictionEnzyme Nt_BsmAI = new RestrictionEnzyme().setName("Nt.BsmAI").setRecognitionSequence("GTCTC(1/-5)").lock().register(); public static final RestrictionEnzyme Nt_BspQI = new RestrictionEnzyme().setName("Nt.BspQI").setRecognitionSequence("GCTCTTC(1/-7)").lock().register(); public static final RestrictionEnzyme Nt_BstNBI = new RestrictionEnzyme().setName("Nt.BstNBI").setRecognitionSequence("GAGTC(4/-5)").lock().register(); public static final RestrictionEnzyme Nt_CviPII = new RestrictionEnzyme().setName("Nt.CviPII").setRecognitionSequence("(0/-1)CCD").lock().register(); public static final RestrictionEnzyme PacI = new RestrictionEnzyme().setName("PacI").setRecognitionSequence("TTAAT/TAA").lock().register(); public static final RestrictionEnzyme PciI = new RestrictionEnzyme().setName("PciI").setRecognitionSequence("A/CATGT").lock().register(); public static final RestrictionEnzyme PflMI = new RestrictionEnzyme().setName("PflMI").setRecognitionSequence("CCANNNN/NTGG").lock().register(); public static final RestrictionEnzyme PI_PspI = new RestrictionEnzyme().setName("PI-PspI").setRecognitionSequence("TGGCAAACAGCTATTATGGGTATTATGGGT(-13/-17)").lock().register(); public static final RestrictionEnzyme PI_SceI = new RestrictionEnzyme().setName("PI-SceI").setRecognitionSequence("ATCTATGTCGGGTGCGGAGAAAGAGGTAAT(-15/-19)").lock().register(); public static final RestrictionEnzyme PleI = new RestrictionEnzyme().setName("PleI").setRecognitionSequence("GAGTC(4/5)").lock().register(); public static final RestrictionEnzyme PluTI = new RestrictionEnzyme().setName("PluTI").setRecognitionSequence("GGCGC/C").lock().register(); public static final RestrictionEnzyme PmeI = new RestrictionEnzyme().setName("PmeI").setRecognitionSequence("GTTT/AAAC").lock().register(); public static final RestrictionEnzyme PmlI = new RestrictionEnzyme().setName("PmlI").setRecognitionSequence("CAC/GTG").lock().register(); public static final RestrictionEnzyme PpuMI = new RestrictionEnzyme().setName("PpuMI").setRecognitionSequence("RG/GWCCY").lock().register(); public static final RestrictionEnzyme PshAI = new RestrictionEnzyme().setName("PshAI").setRecognitionSequence("GACNN/NNGTC").lock().register(); public static final RestrictionEnzyme PsiI = new RestrictionEnzyme().setName("PsiI").setRecognitionSequence("TTA/TAA").lock().register(); public static final RestrictionEnzyme PspGI = new RestrictionEnzyme().setName("PspGI").setRecognitionSequence("/CCWGG").lock().register(); public static final RestrictionEnzyme PspOMI = new RestrictionEnzyme().setName("PspOMI").setRecognitionSequence("G/GGCCC").lock().register(); public static final RestrictionEnzyme PspXI = new RestrictionEnzyme().setName("PspXI").setRecognitionSequence("VC/TCGAGB").lock().register(); public static final RestrictionEnzyme PstI = new RestrictionEnzyme().setName("PstI").setRecognitionSequence("CTGCA/G").lock().register(); public static final RestrictionEnzyme PvuI = new RestrictionEnzyme().setName("PvuI").setRecognitionSequence("CGAT/CG").lock().register(); public static final RestrictionEnzyme PvuII = new RestrictionEnzyme().setName("PvuII").setRecognitionSequence("CAG/CTG").lock().register(); public static final RestrictionEnzyme RsaI = new RestrictionEnzyme().setName("RsaI").setRecognitionSequence("GT/AC").lock().register(); public static final RestrictionEnzyme RsrII = new RestrictionEnzyme().setName("RsrII").setRecognitionSequence("CG/GWCCG").lock().register(); public static final RestrictionEnzyme SacI = new RestrictionEnzyme().setName("SacI").setRecognitionSequence("GAGCT/C").lock().register(); public static final RestrictionEnzyme SacII = new RestrictionEnzyme().setName("SacII").setRecognitionSequence("CCGC/GG").lock().register(); public static final RestrictionEnzyme SalI = new RestrictionEnzyme().setName("SalI").setRecognitionSequence("G/TCGAC").lock().register(); public static final RestrictionEnzyme SapI = new RestrictionEnzyme().setName("SapI").setRecognitionSequence("GCTCTTC(1/4)").lock().register(); public static final RestrictionEnzyme Sau96I = new RestrictionEnzyme().setName("Sau96I").setRecognitionSequence("G/GNCC").lock().register(); public static final RestrictionEnzyme SbfI = new RestrictionEnzyme().setName("SbfI").setRecognitionSequence("CCTGCA/GG").lock().register(); public static final RestrictionEnzyme ScaI = new RestrictionEnzyme().setName("ScaI").setRecognitionSequence("AGT/ACT").lock().register(); public static final RestrictionEnzyme ScrFI = new RestrictionEnzyme().setName("ScrFI").setRecognitionSequence("CC/NGG").lock().register(); public static final RestrictionEnzyme SexAI = new RestrictionEnzyme().setName("SexAI").setRecognitionSequence("A/CCWGGT").lock().register(); public static final RestrictionEnzyme SfaNI = new RestrictionEnzyme().setName("SfaNI").setRecognitionSequence("GCATC(5/9)").lock().register(); public static final RestrictionEnzyme SfcI = new RestrictionEnzyme().setName("SfcI").setRecognitionSequence("C/TRYAG").lock().register(); public static final RestrictionEnzyme SfiI = new RestrictionEnzyme().setName("SfiI").setRecognitionSequence("GGCCNNNN/NGGCC").lock().register(); public static final RestrictionEnzyme SfoI = new RestrictionEnzyme().setName("SfoI").setRecognitionSequence("GGC/GCC").lock().register(); public static final RestrictionEnzyme SgrAI = new RestrictionEnzyme().setName("SgrAI").setRecognitionSequence("CR/CCGGYG").lock().register(); public static final RestrictionEnzyme SmaI = new RestrictionEnzyme().setName("SmaI").setRecognitionSequence("CCC/GGG").lock().register(); public static final RestrictionEnzyme SmlI = new RestrictionEnzyme().setName("SmlI").setRecognitionSequence("C/TYRAG").lock().register(); public static final RestrictionEnzyme SnaBI = new RestrictionEnzyme().setName("SnaBI").setRecognitionSequence("TAC/GTA").lock().register(); public static final RestrictionEnzyme SpeI = new RestrictionEnzyme().setName("SpeI").setRecognitionSequence("A/CTAGT").lock().register(); public static final RestrictionEnzyme SphI = new RestrictionEnzyme().setName("SphI").setRecognitionSequence("GCATG/C").lock().register(); public static final RestrictionEnzyme SrfI = new RestrictionEnzyme().setName("SrfI").setRecognitionSequence("GCCC/GGGC").lock().register(); public static final RestrictionEnzyme SspI = new RestrictionEnzyme().setName("SspI").setRecognitionSequence("AAT/ATT").lock().register(); public static final RestrictionEnzyme StuI = new RestrictionEnzyme().setName("StuI").setRecognitionSequence("AGG/CCT").lock().register(); public static final RestrictionEnzyme StyI = new RestrictionEnzyme().setName("StyI").setRecognitionSequence("C/CWWGG").lock().register(); public static final RestrictionEnzyme SwaI = new RestrictionEnzyme().setName("SwaI").setRecognitionSequence("ATTT/AAAT").lock().register(); public static final RestrictionEnzyme TaqAI = new RestrictionEnzyme().setName("TaqAI").setRecognitionSequence("T/CGA").lock().register(); public static final RestrictionEnzyme TfiI = new RestrictionEnzyme().setName("TfiI").setRecognitionSequence("G/AWTC").lock().register(); public static final RestrictionEnzyme TseI = new RestrictionEnzyme().setName("TseI").setRecognitionSequence("G/CWGC").lock().register(); public static final RestrictionEnzyme Tsp45I = new RestrictionEnzyme().setName("Tsp45I").setRecognitionSequence("/GTSAC").lock().register(); public static final RestrictionEnzyme TspRI = new RestrictionEnzyme().setName("TspRI").setRecognitionSequence("NNCASTGNN/").lock().register(); public static final RestrictionEnzyme Tth111I = new RestrictionEnzyme().setName("Tth111I").setRecognitionSequence("GACN/NNGTC").lock().register(); public static final RestrictionEnzyme XbaI = new RestrictionEnzyme().setName("XbaI").setRecognitionSequence("T/CTAGA").lock().register(); public static final RestrictionEnzyme XcmI = new RestrictionEnzyme().setName("XcmI").setRecognitionSequence("CCANNNNN/NNNNTGG").lock().register(); public static final RestrictionEnzyme XhoI = new RestrictionEnzyme().setName("XhoI").setRecognitionSequence("C/TCGAG").lock().register(); public static final RestrictionEnzyme XmaI = new RestrictionEnzyme().setName("XmaI").setRecognitionSequence("C/CCGGG").lock().register(); public static final RestrictionEnzyme XmnI = new RestrictionEnzyme().setName("XmnI").setRecognitionSequence("GAANN/NNTTC").lock().register(); public static final RestrictionEnzyme ZraI = new RestrictionEnzyme().setName("ZraI").setRecognitionSequence("GAC/GTC").lock().register(); //########################################################################### // CONSTRUCTORS //########################################################################### //--------------------------------------------------------------------------- public RestrictionEnzyme() { } //########################################################################### // PUBLIC METHODS //########################################################################### //--------------------------------------------------------------------------- public RestrictionEnzyme setName(String inValue) { return (RestrictionEnzyme) super.setName(inValue); } //--------------------------------------------------------------------------- @Override public String toString() { return name(); } //--------------------------------------------------------------------------- public RestrictionEnzyme setRecognitionSequence(String inValue) { if (! StringUtil.isSet(inValue)) { throw new SeqPatternConfigurationException("Empty recognition sequence specified!"); } mRecognitionSequence = inValue; setPrositePattern(extractPrositePattern()); if (!mIsPalindromic) { setStrandsToSearch(Strand.values()); } else { setStrandsToSearch(Strand.FORWARD); } return this; } //--------------------------------------------------------------------------- public String getRecognitionSequence() { return mRecognitionSequence; } //-------------------------------------------------------------------------- /** Returns the forward strand cut site indices relative to the start of the motif. * @return Usually one but possibly two cut site indices on the forward strand. */ public int[] getFwdStrandCutSiteIndices() { return mFwdStrandCutSiteIndices; } //-------------------------------------------------------------------------- /** Returns the reverse strand cut site indices relative to the start of the motif. * @return Usually one but possibly two cut site indices on the reverse strand. */ public int[] getRevStrandCutSiteIndices() { return mRevStrandCutSiteIndices; } //--------------------------------------------------------------------------- public boolean isPalindromic() { return mIsPalindromic; } //-------------------------------------------------------------------------- @Override public RestrictionEnzyme lock() { return (RestrictionEnzyme) super.lock(); } //-------------------------------------------------------------------------- /** Puts the AminoAcid into the Set of unique RestrictionEnzymes returned by RestrictionEnzyme.values(). */ public RestrictionEnzyme register() { if (! isLocked()) { throw new RuntimeException("Only locked RestrictionEnzymes can be added to the values list!"); } sValues.add(this); return this; } //-------------------------------------------------------------------------- /** Returns the RestrictionEnzyme whose name matches the specified String. @param inString the name for the RestrictionEnzyme to retrieve @return the RestrictionEnzyme whose name matches the specified String */ public static RestrictionEnzyme valueOf(String inString) { RestrictionEnzyme value = null; if (StringUtil.isSet(inString)) { for (RestrictionEnzyme enzyme : sValues) { if (enzyme.name().equalsIgnoreCase(inString)) { value = enzyme; break; } } } return value; } //-------------------------------------------------------------------------- public static RestrictionEnzyme[] values() { return sValues.toArray(new RestrictionEnzyme[sValues.size()]); } //########################################################################### // PROTECTED METHODS //########################################################################### //-------------------------------------------------------------------------- @Override protected RestrictionSite createMatch(String inSeq, SeqLocation inLocation) { return new RestrictionSite(this, inSeq, inLocation); } //--------------------------------------------------------------------------- protected void setIsPalindromic(boolean inValue) { mIsPalindromic = inValue; } //########################################################################### // PRIVATE METHODS //########################################################################### //-------------------------------------------------------------------------- private String extractPrositePattern() { String patternString = mRecognitionSequence; List forwardCutSiteIndicesList = new ArrayList<>(2); List reverseCutSiteIndicesList = new ArrayList<>(2); boolean isPalindromic = true; Matcher m = s5PrimeNonPalindromicCutSpecPattern.matcher(patternString); if (m.find()) { forwardCutSiteIndicesList.add(- Integer.parseInt(m.group(1)) - 1); reverseCutSiteIndicesList.add(- Integer.parseInt(m.group(2)) - 1); patternString = patternString.substring(m.group().length()); isPalindromic = false; } m = s3PrimeNonPalindromicCutSpecPattern.matcher(patternString); if (m.find()) { patternString = patternString.substring(0, patternString.length() - m.group().length()); forwardCutSiteIndicesList.add(patternString.length() + Integer.parseInt(m.group(1))); reverseCutSiteIndicesList.add(patternString.length() + Integer.parseInt(m.group(2))); isPalindromic = false; } StringBuilderPlus prositePattern = new StringBuilderPlus().setDelimiter("-"); for (int i = 0; i < patternString.length(); i++) { char theChar = patternString.charAt(i); if (theChar == '/') { forwardCutSiteIndicesList.add(i); // forwardCutSiteIndicesList.add(patternString.length() - i - 1); } else { prositePattern.delimitedAppend(theChar); } } prositePattern.append("."); mFwdStrandCutSiteIndices = new int[forwardCutSiteIndicesList.size()]; for (int i = 0; i < forwardCutSiteIndicesList.size(); i++) { mFwdStrandCutSiteIndices[i] = forwardCutSiteIndicesList.get(i); } if (CollectionUtil.hasValues(reverseCutSiteIndicesList)) { mRevStrandCutSiteIndices = new int[reverseCutSiteIndicesList.size()]; for (int i = 0; i < reverseCutSiteIndicesList.size(); i++) { mRevStrandCutSiteIndices[i] = reverseCutSiteIndicesList.get(i); } } setIsPalindromic(isPalindromic); return prositePattern.toString(); } //########################################################################### // INNER CLASS //########################################################################### private class LocationComparator implements Comparator { //----------------------------------------------------------------------- @Override public int compare(RestrictionSite inObj1, RestrictionSite inObj2) { return inObj1.getSeqLocation().compareTo(inObj2.getSeqLocation()); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy