how to calculate elment compostion of fasta protein file using biojava?
how to calculate elment compostion of fasta protein file using biojava?
I'm not a Java programmer (I use its close cousin C#), but here's the step-by-step that you just need to translate into code:
1. Create a Map<string, int>
variable to store the distinct elements and their associated counts.
2. Examine the structure of the AminoAcidComposition.xml file. Each <aminoacid>
node has a schema akin to the following:
<aminoacid name="Alanine" shortname="Ala" symbol="A">
<elements count="3" name="Carbon"/>
<elements count="1" name="Nitrogen"/>
<elements count="1" name="Oxygen"/>
<isotopes count="5" name="Hydrogen"/>
</aminoacid>
3. Use the symbol
attribute to identify the correct <aminoacid>
node to use for each character in the FASTA sequence. Then cycle through the <elements>
nodes, using the name
attribute of the node as the key to your Map<string, int>
variable, incrementing the value for that key by the value of the count
attribute, which you'll probably need to coerce to an int
since Java is strongly-typed.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
I want atomic composition not amino acid composition
LMGTFY :