From 5a72e59723846a89b73db70d7976b1d61fa4c32a Mon Sep 17 00:00:00 2001 From: eead-csic-compbio Date: Wed, 3 Feb 2016 17:51:28 +0100 Subject: [PATCH] fixed bug in get_homologues.pl which meant pan genome was overestimated with -c --- CHANGES.txt | 1 + get_homologues.pl | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d34cce0..38a6261 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -90,3 +90,4 @@ 25012016: fixed bug in _cluster_makeHomolog.pl,_cluster_makeInparalog.pl,_cluster_makeOrtholog.pl reported by Maliha Aziz, which did not affect results, but produce them slower 01022016: updated download_genomes_ncbi.pl and sample_genome_list.txt to fit current NCBI repositories, and manual 01022016: removed estimate_RAM from get_homologues.pl, as RAM consumption has been reduced +03022016: fixed bug in get_homologues.pl which meant pan genome was overestimated with -c; EST not affected, thanks Joaquim Martins Jr! diff --git a/get_homologues.pl b/get_homologues.pl index d09f43e..10efce9 100755 --- a/get_homologues.pl +++ b/get_homologues.pl @@ -1719,7 +1719,6 @@ $LSE_reference = cluster_lineage_expansions($ref_inparalogues); } - for($t=1;$t<$n_of_taxa;$t++) { $coregenome[$s][$t] = 0; @@ -1835,7 +1834,7 @@ my $ref_homol = makeHomolog($saveRAM,$tmptaxa[$t],$tmptaxa[$t2],$evalue_cutoff, $MIN_PERSEQID_HOM,$MIN_COVERAGE_HOM,$redo_orth); - foreach $gene ($gindex{$tmptaxa[$t]}[0] .. $gindex{$tmptaxa[0]}[1]) + foreach $gene ($gindex{$tmptaxa[$t]}[0] .. $gindex{$tmptaxa[$t]}[1]) { if($ref_homol->{$gene}){ $n_of_homs_in_genomes{$gene}++; } } @@ -1858,13 +1857,13 @@ } # update pan total - foreach $gene ($gindex{$tmptaxa[$t]}[0] .. $gindex{$tmptaxa[0]}[1]) + foreach $gene ($gindex{$tmptaxa[$t]}[0] .. $gindex{$tmptaxa[$t]}[1]) { next if($n_of_homs_in_genomes{$gene} || $inparalogues{$gene}); $pangenome[$s][$t]++; } - print "# adding $tmptaxa[$t]: core=$coregenome[$s][$t] pan=$pangenome[$s][$t]\n"; + print "# adding $tmptaxa[$t]: core=$coregenome[$s][$t] pan=$pangenome[$s][$t]\n"; } }