    001    package calhoun.analysis.crf.io;
    002
    003    import java.io.IOException;
    004    import java.util.ArrayList;
    005    import java.util.Collections;
    006    import java.util.HashMap;
    007    import java.util.Iterator;
    008    import java.util.List;
    009    import java.util.Map;
    010
    011    import org.apache.commons.logging.Log;
    012    import org.apache.commons.logging.LogFactory;
    013
    014    import calhoun.analysis.crf.io.GTFInputInterval13.CDS;
    015    import calhoun.util.Assert;
    016    import calhoun.util.FileUtil;
    017
    018    public class GTFInputInterval29 extends GTFInputInterval13 {
    019            private static final long serialVersionUID = 4413724139445660884L;
    020            private static final Log log = LogFactory.getLog(GTFInputInterval29.class);
    021
    022            public void readTrainingSequences(Object location, List<TrainingSequence<Map<String, Object>>> seqs) throws IOException {
    023                    super.readTrainingSequences(location, seqs);
    024
    025                    for (Iterator iter = seqs.iterator(); iter.hasNext();) {
    026                            TrainingSequence<Map<String, Object>> seq = (TrainingSequence<Map<String, Object>>)iter.next();
    027                            int[] states = seq.getY();
    028                            states = SequenceConverter.convertSeqFromInterval13ToInterval29(states);
    029                            seq.setY(states);
    030                    }
    031            }
    032    }