From cf046406b3ec21b5f5d2781e5840851ae2134e31 Mon Sep 17 00:00:00 2001 From: dglemos Date: Mon, 18 Nov 2024 14:41:53 +0000 Subject: [PATCH] Remove prints --- .../AnnotationSource/Database/Variation.pm | 2 -- modules/Bio/EnsEMBL/VEP/OutputFactory.pm | 4 --- modules/Bio/EnsEMBL/VEP/OutputFactory/JSON.pm | 4 --- .../VEP/Pipeline/DumpVEP/Dumper/Variation.pm | 27 +++++-------------- 4 files changed, 7 insertions(+), 30 deletions(-) diff --git a/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Variation.pm b/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Variation.pm index 099b05aef..b320de367 100644 --- a/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Variation.pm +++ b/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Variation.pm @@ -62,8 +62,6 @@ use Digest::MD5 qw(md5_hex); use Bio::EnsEMBL::Utils::Exception qw(throw warning); -use Data::Dumper; - use base qw( Bio::EnsEMBL::VEP::AnnotationSource::Database Bio::EnsEMBL::VEP::AnnotationType::Variation diff --git a/modules/Bio/EnsEMBL/VEP/OutputFactory.pm b/modules/Bio/EnsEMBL/VEP/OutputFactory.pm index c700a3ab0..5d5b3f5b6 100755 --- a/modules/Bio/EnsEMBL/VEP/OutputFactory.pm +++ b/modules/Bio/EnsEMBL/VEP/OutputFactory.pm @@ -1022,8 +1022,6 @@ sub add_colocated_variant_info { ); my %clin_sigs; - - # print "***vf_existing: ", Dumper($vf->{existing}); foreach my $ex( sort { @@ -1044,8 +1042,6 @@ sub add_colocated_variant_info { # ID push @{$hash->{Existing_variation}}, $ex->{variation_name} if $ex->{variation_name}; - # print "\nvariation name: ", $ex->{variation_name}, "\n"; - # Variation Synonyms # VEP fetches the variation synonyms from the cache push @{$hash->{VAR_SYNONYMS}}, $ex->{var_synonyms} if $self->{var_synonyms} && $ex->{var_synonyms} && !$self->{_config}->{_params}->{is_vr}; diff --git a/modules/Bio/EnsEMBL/VEP/OutputFactory/JSON.pm b/modules/Bio/EnsEMBL/VEP/OutputFactory/JSON.pm index 7c9cf8bd0..793babc44 100755 --- a/modules/Bio/EnsEMBL/VEP/OutputFactory/JSON.pm +++ b/modules/Bio/EnsEMBL/VEP/OutputFactory/JSON.pm @@ -90,8 +90,6 @@ use Bio::EnsEMBL::VEP::Utils qw(numberify); use JSON; use Scalar::Util qw(looks_like_number); -use Data::Dumper; - my %SKIP_KEYS = ( 'Uploaded_variation' => 1, 'Location' => 1, @@ -474,8 +472,6 @@ sub add_colocated_variant_info_JSON { push @{$hash->{colocated_variants}}, $ex; - print "-> ", Dumper($hash->{colocated_variants}); - return $hash; } diff --git a/modules/Bio/EnsEMBL/VEP/Pipeline/DumpVEP/Dumper/Variation.pm b/modules/Bio/EnsEMBL/VEP/Pipeline/DumpVEP/Dumper/Variation.pm index 749ca1007..f26b4c8db 100644 --- a/modules/Bio/EnsEMBL/VEP/Pipeline/DumpVEP/Dumper/Variation.pm +++ b/modules/Bio/EnsEMBL/VEP/Pipeline/DumpVEP/Dumper/Variation.pm @@ -35,8 +35,6 @@ use warnings; use FileHandle; use File::Path qw(mkpath); -use Data::Dumper; - use Bio::EnsEMBL::VEP::Config; use Bio::EnsEMBL::VEP::AnnotationSource::Database::Variation; use Bio::EnsEMBL::VEP::AnnotationSource::Cache::Variation; @@ -69,20 +67,19 @@ sub run { my $region_size = $self->param('region_size'); my $hive_dbc = $self->dbc; - # die "(2) ", Dumper($hive_dbc); - # $hive_dbc->disconnect_if_idle() if defined $hive_dbc; - # die "(3)"; + $hive_dbc->disconnect_if_idle() if defined $hive_dbc; + my $as = Bio::EnsEMBL::VEP::AnnotationSource::Database::Variation->new({ config => $config, cache_region_size => $region_size, }); - # die "(4)"; + my $cache = Bio::EnsEMBL::VEP::AnnotationSource::Cache::Variation->new({ config => $config, cache_region_size => $region_size, dir => $self->get_cache_dir($vep_params) }); - # die "(5)"; + # create prefixed names here to use later if($vep_params->{freq_vcf} && !$self->{freq_vcf}) { foreach my $vcf_conf(@{$vep_params->{freq_vcf}}) { @@ -95,7 +92,7 @@ sub run { } $self->{freq_vcf} = $vep_params->{freq_vcf}; } - # die "(6)"; + $self->dump_chrs($as, $cache); # bgzip and tabix-index all_vars files @@ -226,23 +223,14 @@ sub dump_obj { } # get freqs from VCFs? - # $self->freqs_from_vcf($obj, $chr) if $self->{freq_vcf}; - - open(FH, '>>', "/hps/nobackup/flicek/ensembl/variation/dlemos/vep/test_code/clin_sig_clinvar_somatic/dump_cache/log.txt") or die $!; + $self->freqs_from_vcf($obj, $chr) if $self->{freq_vcf}; my $pubmed = $self->pubmed; my $var_synonyms = $self->var_synonyms; foreach my $v(@$obj) { - - print FH "->", Dumper($v); - my $tmp_clinical_impact = ''; - my @tmp_ci; if($v->{clinical_impact}) { - foreach my $pf (@{$v->{clinical_impact}}) { - push @tmp_ci, $pf->{final_somatic_clin_sig}; - } - $tmp_clinical_impact = join(";", @tmp_ci); + $tmp_clinical_impact = $v->{clinical_impact}; } my @tmp = ( @@ -276,7 +264,6 @@ sub dump_obj { print $all_vars_fh "\n"; } } - close(FH); close DUMP; }