pub fn calculate_stats(matches: &clap::ArgMatches) {
        // parse command line options
        let input_gff = matches.value_of("gff").unwrap();
        let input_fasta = matches.value_of("fasta").unwrap();
        let degeneracy =
            value_t!(matches.value_of("degeneracy"), String).unwrap_or_else(|e| e.exit());
        let spliced = matches.is_present("spliced");
        let output = matches.value_of("output").unwrap();

        // create directory for output
        if let Err(e) = create_dir_all("./gff-stats/") {
            eprintln!("[-]\tCreate directory error: {}", e.to_string());
        }

        let file_name = format!("./gff-stats/{}_stats.tsv", output);
        let stats = File::create(&file_name).expect("[-]\tUnable to create file");
        let stats = LineWriter::new(stats);
        let mut f = BufWriter::new(stats);

        if spliced {
            calculate_stats_spliced(input_gff, input_fasta, degeneracy, &mut f)
        } else {
            calculate_stats_unspliced(input_gff, input_fasta, degeneracy, &mut f)
        }
    }
// TODO: investigate indexing fasta files for random access.
investigate indexing fasta files for random access.
investigate indexing fasta files for random access .
pub fn calculate_stats(matches: &clap::ArgMatches) {
        // parse command line options
        let input_gff = matches.value_of("gff").unwrap();
        let input_fasta = matches.value_of("fasta").unwrap();
        let degeneracy =
            value_t!(matches.value_of("degeneracy"), String).unwrap_or_else(|e| e.exit());
        let spliced = matches.is_present("spliced");
        let output = matches.value_of("output").unwrap();
        // create directory for output
        if let Err(e) = create_dir_all("./gff-stats/") {
            eprintln!("[-]\tCreate directory error: {}", e.to_string());
        }
        let file_name = format!("./gff-stats/{}_stats.tsv", output);
        let stats = File::create(&file_name).expect("[-]\tUnable to create file");
        let stats = LineWriter::new(stats);
        let mut f = BufWriter::new(stats);
        if spliced {
            calculate_stats_spliced(input_gff, input_fasta, degeneracy, &mut f)
        } else {
            calculate_stats_unspliced(input_gff, input_fasta, degeneracy, &mut f)
        }
    }
pub fn calculate_stats ( matches : & clap :: ArgMatches ) { // parse command line options let input_gff = matches . value_of ( " " ) . unwrap ( ) ; let input_fasta = matches . value_of ( " " ) . unwrap ( ) ; let degeneracy = value_t ! ( matches value_of ( " " ) String ) . unwrap_or_else ( | e | e . exit ( ) ) ; let spliced = matches . is_present ( " " ) ; let output = matches . value_of ( " " ) . unwrap ( ) ; // create directory for output if let Err ( e ) = create_dir_all ( " " ) { eprintln ! ( " \t " e to_string ( ) ) ; } let file_name = format ! ( " " output ) ; let stats = File :: create ( & file_name ) . expect ( " \t " ) ; let stats = LineWriter :: new ( stats ) ; let mut f = BufWriter :: new ( stats ) ; if spliced { calculate_stats_spliced ( input_gff , input_fasta , degeneracy , & mut f ) } else { calculate_stats_unspliced ( input_gff , input_fasta , degeneracy , & mut f ) } }
TODO: investigate indexing fasta files for random access.
TODO : investigate indexing fasta files for random access .
matches
&clap::ArgMatches
matches
&clap::ArgMatches