<commit_before>package MIP::Program::Variantcalling::Star_fusion;

use 5.026;
use Carp;
use charnames qw{ :full :short };
use English qw{ -no_match_vars };
use open qw{ :encoding(UTF-8) :std };
use Params::Check qw{ allow check last_error };
use strict;
use utf8;
use warnings;
use warnings qw{ FATAL utf8 };

## CPANM
use autodie qw{ :all };
use Readonly;

## MIPs lib/
use MIP::Unix::Standard_streams qw{ unix_standard_streams };
use MIP::Unix::Write_to_file qw{ unix_write_to_file };

BEGIN {
    require Exporter;
    use base qw{ Exporter };

    # Set the version for version checking
    our $VERSION = 1.04;

    # Functions and variables which can be optionally exported
    our @EXPORT_OK = qw{ star_fusion };
}

## Constants
Readonly my $SPACE => q{ };

sub star_fusion {

## Function : Splice site analysis using STAR-fusion.
## Returns  :
## Arguments: $cpu                    => Number of threads for running STAR
##          : $examine_coding_effect  => Append coding effect to fusion
##          : $fastq_r1_path          => The path of the R1 fastq
##          : $fastq_r2_path          => The path of the R2 fastq
##          : $FILEHANDLE             => Filehandle to write to
##          : $genome_lib_dir_path    => Path to the directory containing the genome library
##          : $output_directory_path  => output directory path
##          : $samples_file_path      => Sample file path
##          : $sjdb_path              => Splice junction database file path (the junctions tab file)
##          : $stderrfile_path        => Stderrfile path
##          : $stderrfile_path_append => Append stderr info to file path
##          : $stdoutfile_path        => Stdoutfile path

    my ($arg_href) = @_;

    ## Flatten argument(s)
    my $cpu;
    my $examine_coding_effect;
    my $fastq_r1_path;
    my $fastq_r2_path;
    my $FILEHANDLE;
    my $genome_lib_dir_path;
    my $output_directory_path;
    my $samples_file_path;
    my $sjdb_path;
    my $stderrfile_path;
    my $stderrfile_path_append;
    my $stdoutfile_path;

    ## Default(s)

    my $tmpl = {
        cpu => {
            store       => \$cpu,
            strict_type => 1,
        },
        examine_coding_effect => {
            allow       => [ undef, 0, 1 ],
            store       => \$examine_coding_effect,
            strict_type => 1,
        },
        fastq_r1_path => {
            store       => \$fastq_r1_path,
            strict_type => 1,<commit_msg>fix(STAR-Fusion): Add default option<commit_after>package MIP::Program::Variantcalling::Star_fusion;

use 5.026;
use Carp;
use charnames qw{ :full :short };
use English qw{ -no_match_vars };
use open qw{ :encoding(UTF-8) :std };
use Params::Check qw{ allow check last_error };
use strict;
use utf8;
use warnings;
use warnings qw{ FATAL utf8 };

## CPANM
use autodie qw{ :all };
use Readonly;

## MIPs lib/
use MIP::Unix::Standard_streams qw{ unix_standard_streams };
use MIP::Unix::Write_to_file qw{ unix_write_to_file };

BEGIN {
    require Exporter;
    use base qw{ Exporter };

    # Set the version for version checking
    our $VERSION = 1.04;

    # Functions and variables which can be optionally exported
    our @EXPORT_OK = qw{ star_fusion };
}

## Constants
Readonly my $SPACE => q{ };

sub star_fusion {

## Function : Splice site analysis using STAR-fusion.
## Returns  :
## Arguments: $cpu                    => Number of threads for running STAR
##          : $examine_coding_effect  => Append coding effect to fusion
##          : $fastq_r1_path          => The path of the R1 fastq
##          : $fastq_r2_path          => The path of the R2 fastq
##          : $FILEHANDLE             => Filehandle to write to
##          : $genome_lib_dir_path    => Path to the directory containing the genome library
##          : $output_directory_path  => output directory path
##          : $samples_file_path      => Sample file path
##          : $sjdb_path              => Splice junction database file path (the junctions tab file)
##          : $stderrfile_path        => Stderrfile path
##          : $stderrfile_path_append => Append stderr info to file path
##          : $stdoutfile_path        => Stdoutfile path

    my ($arg_href) = @_;

    ## Flatten argument(s)
    my $cpu;
    my $fastq_r1_path;
    my $fastq_r2_path;
    my $FILEHANDLE;
    my $genome_lib_dir_path;
    my $output_directory_path;
    my $samples_file_path;
    my $sjdb_path;
    my $stderrfile_path;
    my $stderrfile_path_append;
    my $stdoutfile_path;

    ## Default(s)
    my $examine_coding_effect;

    my $tmpl = {
        cpu => {
            store       => \$cpu,
            strict_type => 1,
        },
        examine_coding_effect => {
            allow       => [ undef, 0, 1 ],
            default     => 0,
            store       => \$examine_coding_effect,
            strict_type => 1,
        },
        fastq_r1_path => {
            store       => \$fastq_r1_path,
            strict_type => 1,
{'fraction_non_alphanumeric': 0.10504117292629042, 'fraction_numerical': 0.009439646515364532, 'mean_word_length': 2.280632411067194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4323533', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1572, 'n_words': 442}