public void process ( ) throws IOException , StructureException { if ( sequences == null ) { // only process once, then return cached values LinkedHashMap < String , ProteinSequence > sequenceMap = reader . process ( ) ; sequences = sequenceMap . values ( ) . toArray ( new ProteinSequence [ 0 ] ) ; accessions = new String [ sequences . length ] ; structures = new Structure [ sequences . length ] ; residues = new ResidueNumber [ sequences . length ] [ ] ; // Match each sequence to a series of PDB Residue numbers for ( int i = 0 ; i < sequences . length ; i ++ ) { accessions [ i ] = sequences [ i ] . getAccession ( ) . getID ( ) ; //System.out.println("Fetching "+accession); structures [ i ] = cache . getStructure ( accessions [ i ] ) ; residues [ i ] = StructureSequenceMatcher . matchSequenceToStructure ( sequences [ i ] , structures [ i ] ) ; assert ( residues [ i ] . length == sequences [ i ] . getLength ( ) ) ; } } }
Parses the fasta file and loads it into memory .