Repository 'snmf'
hg clone https://toolshed.g2.bx.psu.edu/repos/dereeper/snmf

Changeset 10:ad5e3d3c809e (2024-02-04)
Previous changeset 9:e44eb2ba80ec (2019-01-08) Next changeset 11:2dbead3a2c91 (2024-02-04)
Commit message:
Uploaded
modified:
Snmf.pl
b
diff -r e44eb2ba80ec -r ad5e3d3c809e Snmf.pl
--- a/Snmf.pl Tue Jan 08 11:22:09 2019 -0500
+++ b/Snmf.pl Sun Feb 04 10:07:19 2024 +0000
[
@@ -68,7 +68,7 @@
  print E "K=$k $ent\n";
 
  print $O2 "Indiv";
- print $O3 "Indiv;Group\n";
+ print $O3 "Indiv\tGroup\n";
  for (my $j = 0; $j <$k; $j++){
  print $O2 " Q$j";
  }
@@ -89,7 +89,7 @@
  my $ind = $individuals[$i];
  for (my $j = 0; $j <$k; $j++){
  my $val = $infos[$j];
- if ($val > 0.5){$group = "Q$j";}
+ if ($val > ($threshold/100)){$group = "Q$j";}
  }
  if ($ind){
  $hash_indv{$ind} = join(" ",@infos);
@@ -103,7 +103,7 @@
  my @inds = split(",",$hash_groupes{$group}{"ind"});
  foreach my $ind(@inds){
  if ($ind =~/\w+/){
- print $O3 "$ind;$group\n";
+ print $O3 "$ind\t$group\n";
  print $O2 $ind." ".$hash_indv{$ind}. "\n";
  }
  }