Pheno-Ranker

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "File::ShareDir::ProjectDistDir" : "1.000009",
            "Graph" : "0.9727",
            "Hash::Fold" : "0",
            "Inline::C" : "0.82",
            "JSON::Validator" : "5.14",
            "JSON::XS" : "4.03",
            "Math::CDF" : "0",
            "Moo" : "2.005005",
            "Path::Tiny" : "0.144",
            "Scalar::Util" : "1.50",
            "Sort::Naturally" : "1.03",
            "Statistics::Descriptive" : "0",
            "Term::ANSIColor" : "5.01",
            "Text::CSV_XS" : "1.50",
            "Types::Standard" : "2.004000",
            "YAML::XS" : "0.88",
            "perl" : "5.026000"
         }
      },
      "test" : {
         "requires" : {

META.yml  view on Meta::CPAN

  File::ShareDir::ProjectDistDir: '1.000009'
  Graph: '0.9727'
  Hash::Fold: '0'
  Inline::C: '0.82'
  JSON::Validator: '5.14'
  JSON::XS: '4.03'
  Math::CDF: '0'
  Moo: '2.005005'
  Path::Tiny: '0.144'
  Scalar::Util: '1.50'
  Sort::Naturally: '1.03'
  Statistics::Descriptive: '0'
  Term::ANSIColor: '5.01'
  Text::CSV_XS: '1.50'
  Types::Standard: '2.004000'
  YAML::XS: '0.88'
  perl: '5.026000'
resources:
  bugtracker: https://github.com/CNAG-Biomedical-Informatics/pheno-ranker/issues
  homepage: https://github.com/CNAG-Biomedical-Informatics/pheno-ranker
  license: http://www.opensource.org/licenses/artistic-license-2.0

Makefile.PL  view on Meta::CPAN

        },
        'x_contributors' => [],
    },
    PREREQ_PM => {
        'Scalar::Util'                   => '1.50', # core
        'JSON::XS'                       => '4.03',
        'YAML::XS'                       => '0.88',
        'Path::Tiny'                     => '0.144',
        'Term::ANSIColor'                => '5.01',
        'Text::CSV_XS'                   => '1.50',
        'Sort::Naturally'                => '1.03',
        'File::ShareDir::ProjectDistDir' => '1.000009',
        'Moo'                            => '2.005005',
        'JSON::Validator'                => '5.14',
        'Types::Standard'                => '2.004000',
        'Statistics::Descriptive'        => 0,
        'Hash::Fold'                     => 0,
        'Math::CDF'                      => 0,
        'Data::Fake'                     => '0.006',
        'Graph'                          => '0.9727',
        'Inline::C'                      => '0.82'

cpanfile  view on Meta::CPAN

# No specific version needed

requires 'JSON::XS';
requires 'YAML::XS';
requires 'Path::Tiny';
requires 'Term::ANSIColor';
requires 'Moo';
requires 'Types::Standard';
requires 'Hash::Fold';
requires 'Sort::Naturally';
requires 'Math::CDF';
requires 'Statistics::Descriptive';
requires 'JSON::Validator';
requires 'File::ShareDir::ProjectDistDir';
requires 'Graph';
requires 'Inline::C';

# t
requires 'Test::Exception';
requires 'List::MoreUtils';

lib/Pheno/Ranker/Compare/Matrix.pm  view on Meta::CPAN

package Pheno::Ranker::Compare::Matrix;

use strict;
use warnings;
use autodie;
use feature qw(say);

use Sort::Naturally qw(nsort);

use Pheno::Ranker::Metrics;

use Exporter 'import';
our @EXPORT_OK = qw(cohort_comparison);

sub cohort_comparison {
    my ( $ref_binary_hash, $self ) = @_;
    my $out_file          = $self->{out_file};
    my $similarity_metric = $self->{similarity_metric_cohort};

lib/Pheno/Ranker/Graph.pm  view on Meta::CPAN

package Pheno::Ranker::Graph;

use strict;
use warnings;
use autodie;
use feature qw(say);
use JSON::XS;
use Sort::Naturally qw(nsort);
use Pheno::Ranker::IO;
use Pheno::Ranker::Metrics;
use Exporter 'import';
our @EXPORT = qw(binary_hash2graph cytoscape2graph);
use constant DEVEL_MODE => 0;

############################
############################
#  SUBROUTINES FOR GRAPHS  #
############################

lib/Pheno/Ranker/IO.pm  view on Meta::CPAN

use File::Basename;
use File::Spec::Functions  qw(catdir catfile);
use List::Util             qw(any);
use Hash::Util             qw(lock_hash);
use IO::Uncompress::Gunzip qw(gunzip $GunzipError);
use YAML::XS               qw(Load LoadFile DumpFile);
use JSON::XS;

#use Data::Dumper;

#use Sort::Naturally qw(nsort);
use Exporter 'import';
our @EXPORT =
  qw(serialize_hashes write_alignment io_yaml_or_json read_json read_yaml write_json write_array2txt array2object validate_json write_poi poi_output_filename coverage_stats check_existence_of_include_terms append_and_rename_primary_key restructure_px...
use constant DEVEL_MODE => 0;

#########################
#########################
#  SUBROUTINES FOR I/O  #
#########################
#########################

lib/Pheno/Ranker/IO.pm  view on Meta::CPAN

        $data = LoadFile($file);
    }
    return $data;
}

sub write_json {
    my $arg       = shift;
    my $file      = $arg->{filepath};
    my $json_data = $arg->{data};

    # Note that canonical DOES not match the order of nsort from Sort::Naturally
    my $json = JSON::XS->new->utf8->canonical->pretty->encode($json_data);
    path($file)->spew($json);
    return 1;
}

sub write_yaml {
    my $arg       = shift;
    my $file      = $arg->{filepath};
    my $json_data = $arg->{data};
    local $YAML::XS::Boolean = 'JSON::PP';

utils/bff_pxf_simulator/bff-pxf-simulator  view on Meta::CPAN


    # Serialize the data and write
    write_json( { filepath => $output, data => $json_data } );
}

sub write_json {
    my $arg       = shift;
    my $file      = $arg->{filepath};
    my $json_data = $arg->{data};

    # Note that canonical DOES not match the order of nsort from Sort::Naturally
    my $json = JSON::XS->new->utf8->canonical->pretty->encode($json_data);
    path($file)->spew_utf8($json);
    return 1;
}

sub pxf_generator {
    my ( $id, $self ) = @_;
    my $result_hash = run_functions($self);
    my $subject_id  = "IndividualId_$id";
    my $pxf         = fake_hash(

utils/csv2pheno_ranker/csv2pheno-ranker  view on Meta::CPAN

    say "Writing <$yaml_file> " if $self->{verbose};
    write_yaml( { filepath => $yaml_file, data => $config } );
    return 1;
}

sub write_json {
    my $arg       = shift;
    my $file      = $arg->{filepath};
    my $json_data = $arg->{data};

    # Note that canonical DOES not match the order of nsort from Sort::Naturally
    my $json = JSON::XS->new->utf8->canonical->pretty->encode($json_data);
    path($file)->spew($json);
    return 1;
}

sub write_yaml {
    my $arg       = shift;
    my $file      = $arg->{filepath};
    my $json_data = $arg->{data};
    local $YAML::XS::Boolean = 'JSON::PP';



( run in 2.382 seconds using v1.01-cache-2.11-cpan-63c85eba8c4 )