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

com.hfg.bio.AminoAcidFreqTable Maven / Gradle / Ivy

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

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;


//------------------------------------------------------------------------------
/**
 * Table of amino acid frequency data.
 * 
* @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 AminoAcidFreqTable { private Map mFreqMap; /** Amino acid frequencies in mammalian proteins. Based on data from ftp://ftp.ncbi.nih.gov/refseq/release/vertebrate_mammalian/vertebrate_mammalian.*.protein.faa.gz on 2014.09.15 */ public static final AminoAcidFreqTable MAMMALIAN = new AminoAcidFreqTable(); static { Map freqMap = new HashMap(); freqMap.put(AminoAcid.ALANINE, 0.0694f); freqMap.put(AminoAcid.ARGININE, 0.0569f); freqMap.put(AminoAcid.ASPARAGINE, 0.0539f); freqMap.put(AminoAcid.ASPARTIC_ACID, 0.0481f); freqMap.put(AminoAcid.CYSTEINE, 0.0219f); freqMap.put(AminoAcid.GLUTAMIC_ACID, 0.0713f); freqMap.put(AminoAcid.GLUTAMINE, 0.0481f); freqMap.put(AminoAcid.GLYCINE, 0.0648f); freqMap.put(AminoAcid.HISTIDINE, 0.0261f); freqMap.put(AminoAcid.ISOLEUCINE, 0.0434f); freqMap.put(AminoAcid.LEUCINE, 0.0991f); freqMap.put(AminoAcid.LYSINE, 0.0577f); freqMap.put(AminoAcid.METHIONINE, 0.0217f); freqMap.put(AminoAcid.PHENYLALANINE, 0.0361f); freqMap.put(AminoAcid.PROLINE, 0.0632f); freqMap.put(AminoAcid.SERINE, 0.0844f); freqMap.put(AminoAcid.THREONIE, 0.0534f); freqMap.put(AminoAcid.TRYPTOPHAN, 0.0119f); freqMap.put(AminoAcid.TYROSINE, 0.0262f); freqMap.put(AminoAcid.VALINE, 0.0602f); freqMap.put(AminoAcid.UNDEFINED, 0.0002f); MAMMALIAN.mFreqMap = Collections.unmodifiableMap(freqMap); } //########################################################################## // CONSTRUCTORS //########################################################################## //-------------------------------------------------------------------------- private AminoAcidFreqTable() { } //-------------------------------------------------------------------------- public AminoAcidFreqTable(Map inData) { mFreqMap = Collections.unmodifiableMap(inData); } //########################################################################## // PUBLIC METHODS //########################################################################## //-------------------------------------------------------------------------- public Set keySet() { return mFreqMap.keySet(); } //-------------------------------------------------------------------------- public Float get(AminoAcid inAA) { return mFreqMap.get(inAA); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy