<commit_before>package org.biojava3.genome.parsers.gff;


import java.io.*;
import java.util.*;
import java.util.regex.Pattern;

import org.apache.log4j.Logger;

/**
 * http://www.bioperl.org/wiki/GTF
 * Read and write FeatureLists as GFF/GTF formatted files.
 *<br><br>
 * The GFF moniker is applied to a variety of tab-delimited formats
 * that mock the notion of a standard. This class should parse most files
 * bearing at least a passing resemblance to any of the formats. You will, however, need
 * to research the semantics of the files you encounter. Generally,
 * the format consists of 9 tab-delimited fields:
 * <br>
 * <pre>
 * seqname   source   featureType   start   end   score   strand   frame   attributes
 * </pre>
 * The 9th field consists of key-value pairs separated by semicolons, the first of which JavaGene interprets
 * as the group id (as used in GFF1). It is the precise meaning of this 9th field that
 * varies from week to week. The Feature and FeatureList objects provide various utility methods to
 * ease the task of accessing and using the attributes. The proper interpretation of any
 * particular attribute, however, is left to you.
 *
 * @author <NAME>, <NAME>
 */
public class GFF3Reader {
	private static final  Pattern p = Pattern.compile("\t");

    private static final Logger log = Logger.getLogger(GFF3Reader.class.getName());

    /**
     * Read a file into a FeatureList. Each line of the file becomes one Feature object.
     *
     * @param filename The path to the GFF file.
     * @return A FeatureList.
     * @throws IOException Something went wrong -- check exception detail message.
     */
    
    public static FeatureList read(String filename, List<String> indexes) throws IOException {
    	log.info("Gff.read(): Reading " + filename);

        FeatureList features = new FeatureList();
        features.addIndexes(indexes);
        BufferedReader br = new BufferedReader(new FileReader(filename));

        String s;
        for (s = br.readLine(); null != s; s = br.readLine()) {<commit_msg>Removed the Log4j dependencies from the GFF3 parser.<commit_after>package org.biojava3.genome.parsers.gff;


import java.io.*;
import java.util.*;
import java.util.regex.Pattern;
import java.util.logging.Logger;


/**
 * http://www.bioperl.org/wiki/GTF
 * Read and write FeatureLists as GFF/GTF formatted files.
 *<br><br>
 * The GFF moniker is applied to a variety of tab-delimited formats
 * that mock the notion of a standard. This class should parse most files
 * bearing at least a passing resemblance to any of the formats. You will, however, need
 * to research the semantics of the files you encounter. Generally,
 * the format consists of 9 tab-delimited fields:
 * <br>
 * <pre>
 * seqname   source   featureType   start   end   score   strand   frame   attributes
 * </pre>
 * The 9th field consists of key-value pairs separated by semicolons, the first of which JavaGene interprets
 * as the group id (as used in GFF1). It is the precise meaning of this 9th field that
 * varies from week to week. The Feature and FeatureList objects provide various utility methods to
 * ease the task of accessing and using the attributes. The proper interpretation of any
 * particular attribute, however, is left to you.
 *
 * @author <NAME>
 */
public class GFF3Reader {
	private static final  Pattern p = Pattern.compile("\t");

    private static final Logger log = Logger.getLogger(GFF3Reader.class.getName());

    /**
     * Read a file into a FeatureList. Each line of the file becomes one Feature object.
     *
     * @param filename The path to the GFF file.
     * @return A FeatureList.
     * @throws IOException Something went wrong -- check exception detail message.
     */
    
    public static FeatureList read(String filename, List<String> indexes) throws IOException {
    	log.info("Gff.read(): Reading " + filename);

        FeatureList features = new FeatureList();
        features.addIndexes(indexes);
        BufferedReader br = new BufferedReader(new FileReader(filename));

        String s;
        for (s = br.readLine(); null != s; s = br.readLine()) {
{'fraction_non_alphanumeric': 0.08558994197292069, 'fraction_numerical': 0.004110251450676982, 'mean_word_length': 3.3364779874213837, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3405668', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1106, 'n_words': 490}