@@ -56,25 +56,25 @@ public static List<Site> parseSites(File f) throws IOException {
5656
5757 int proteinIndex = -1 ;
5858 int uniprotIndex = -1 ;
59- int modTypeIndex = -1 ;
6059 int residueIndex = -1 ;
6160 int orgIndex = -1 ;
6261 int groupIndex = -1 ;
62+ int geneIndex = -1 ;
6363
6464 boolean inHeader = true ;
6565
6666
6767 while ((line = buf .readLine ()) != null ){
68- if ( line .startsWith ("PROTEIN " )) {
68+ if ( line .startsWith ("GENE " )) {
6969
7070 headerFields = parseHeaderFields (line );
7171
7272 proteinIndex = headerFields .indexOf ("PROTEIN" );
7373 uniprotIndex = headerFields .indexOf ("ACC_ID" );
74- modTypeIndex = headerFields .indexOf ("MOD_TYPE" );
7574 residueIndex = headerFields .indexOf ("MOD_RSD" );
76- orgIndex = headerFields .indexOf ("ORG " );
75+ orgIndex = headerFields .indexOf ("ORGANISM " );
7776 groupIndex = headerFields .indexOf ("SITE_GRP_ID" );
77+ geneIndex = headerFields .indexOf ("GENE" );
7878
7979 inHeader = false ;
8080 continue ;
@@ -95,19 +95,25 @@ public static List<Site> parseSites(File f) throws IOException {
9595
9696 String protein = spl [proteinIndex ];
9797 String uniprot = spl [uniprotIndex ];
98- //String geneSymb = spl[2];
99- //String chrLoc = spl[3];
100- String modType = spl [modTypeIndex ];
98+
10199 String residue = spl [residueIndex ];
100+
101+ String [] resSpl = residue .split ("-" );
102+ String modType = null ;
103+ if ( resSpl .length == 2 ) {
104+
105+ modType = resSpl [1 ];
106+ }
102107 String group = spl [groupIndex ];
103108
104109 String organism = spl [orgIndex ];
105110
111+ String geneSymb = spl [geneIndex ];
112+
106113 Site s = new Site ();
107114 s .setProtein (protein );
108115 s .setUniprot (uniprot );
109- //s.setGeneSymb(geneSymb);
110- //s.setChrLoc(chrLoc);
116+ s .setGeneSymb (geneSymb );
111117 s .setModType (modType );
112118 s .setResidue (residue );
113119 s .setGroup (group );
0 commit comments