Skip to content

Commit

Permalink
added extra check to pfam_enrich.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
eead-csic-compbio committed Oct 18, 2016
1 parent 562e3b5 commit a9754c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@
06102016: added extra check to extract_CDSs_from_genbank & extract_genes_from_genbank to skip pseudogenes
17102016: updated manual with FAQ about ANI calculation on soft-core clusters (thanks Raffael Inglin)
18102016: added FAQ explaining the meaning of branch numbers in compare_clusters.pl -T trees
18102016: added extra check to pfam_enrich.pl
14 changes: 12 additions & 2 deletions pfam_enrich.pl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@

if($cluster_full_ids{$full_id})
{
die "# WARNING: skipping sequence: $full_id , seems to be duplicated:\n$cluster_full_ids{$full_id}\n";
warn "# WARNING: skipping sequence: $full_id , seems to be duplicated:\n$cluster{$full_id},$cluster\n";
}
else
{
Expand Down Expand Up @@ -215,7 +215,7 @@

if($cluster_full_ids{$full_id})
{
print "# WARNING: skipping sequence $full_id , seems to be duplicated:\n$cluster_full_ids{$full_id}\n";
warn "# WARNING: skipping sequence $full_id , seems to be duplicated:\n$cluster{$full_id},$cluster\n";
}
else
{
Expand Down Expand Up @@ -458,6 +458,11 @@
my $total_exp = sum(values(%$ref_pfam1));
my $total_ctr = sum(values(%$ref_pfam2));

if($total_exp==0)
{
die "# ERROR : zero parsed Pfam domains (experiment), please check -x list\n";
}

print "# fisher exact test type: '$INP_test'\n";
print "# multi-testing p-value adjustment: $ADJUST\n";
print "# adjusted p-value threshold: $INP_pcutoff\n\n";
Expand All @@ -470,7 +475,12 @@
{
chomp;
($pfam,$pvalue,$adj) = split(/\s+/,$_);

last if($adj > $INP_pcutoff);

$ref_pfam1->{$pfam} |= 0;
$ref_pfam2->{$pfam} |= 0;

printf("%s\t%d\t%d\t%1.3e\t%1.3e\t%1.3e\t%1.3e\t%s\n",
$pfam,
$ref_pfam1->{$pfam},$ref_pfam2->{$pfam},
Expand Down

0 comments on commit a9754c0

Please sign in to comment.