public static void main(String[] args) { ProteinSequence proteinSequence = new ProteinSequence("ARNDCEQGHILKMFPSTWYVBZJX"); System.out.println(proteinSequence.toString()); StringProxySequenceReader<AminoAcidCompound> sequenceStringProxyLoader = new StringProxySequenceReader<AminoAcidCompound>( "XRNDCEQGHILKMFPSTWYVBZJA", AminoAcidCompoundSet.getAminoAcidCompoundSet()); ProteinSequence proteinSequenceFromProxy = new ProteinSequence(sequenceStringProxyLoader); System.out.println(proteinSequenceFromProxy.toString()); }
public static void main(String[] args) { try { UniprotProxySequenceReader<AminoAcidCompound> uniprotSequence = new UniprotProxySequenceReader<AminoAcidCompound>( "YA745_GIBZE", AminoAcidCompoundSet.getAminoAcidCompoundSet()); ProteinSequence proteinSequence = new ProteinSequence(uniprotSequence); logger.info("Accession: {}", proteinSequence.getAccession().getID()); logger.info("Sequence: {}", proteinSequence.getSequenceAsString()); } catch (Exception e) { logger.error("Exception: ", e); } }
/** * A protein sequence where the storage of the sequence is somewhere else. Could be loaded from a * large Fasta file or via a Uniprot Proxy reader via Uniprot ID * * @param proxyLoader */ public ProteinSequence(ProxySequenceReader<AminoAcidCompound> proxyLoader) { this(proxyLoader, AminoAcidCompoundSet.getAminoAcidCompoundSet()); }
/** * Create a protein from a string * * @param seqString */ public ProteinSequence(String seqString) { this(seqString, AminoAcidCompoundSet.getAminoAcidCompoundSet()); }