sesemin has asked for the wisdom of the Perl Monks concerning the following question:
The actual program is here: please forget ARGV0 and ARGV2foreach my $affyscore ( sort keys %{$row{$origin{$pip{$probe +set_id}}}}){ print "$affyscore\t"; foreach my $gc ( sort keys %{$row{$origin{$pip{$probeset_id{$affyscore +}}}}}){ . . .
#!/usr/bin/perl -w use strict; use warnings; ###################################################################### +############### # Open Input and Output Files + # ###################################################################### +############### if( @ARGV < 1){ print " Enter input file\n"; exit 0; } open(INPUT2,$ARGV[0]) || die "Cannot open file \"$ARGV[0]\""; # Analys +is file my @data =(); my %row =(); while(<INPUT2>){ chomp; @data=split (/\t/,$_); my $probeset_id = $data[0]; my $origin = $data[1]; my $probeseq = $data[2]; my $pip = $data[3]; my $gc = $data[4]; my $affyscore = $data[5]; $row{$origin}{$pip}{$probeset_id}{$affyscore}{$gc} =$probeseq; } print "Fished establishing hashs.\n"; foreach my $origin(sort keys %row) { print "\n$origin\t"; foreach my $pip (sort keys %{$row{$origin}}){ print "$pip\t"; foreach my $probeset_id (sort keys %{$row{$origin{$p +ip}}}){ print "$probeset_id\t"; foreach my $affyscore ( sort keys %{$row{$orig +in{$pip{$probeset_id}}}}){ print "$affyscore\t"; foreach my $gc ( sort keys %{$row{$origin{$pi +p{$probeset_id{$affyscore}}}}}){ print "$gc\t"; foreach my $probeseq ( sort keys %{$row{$origi +n{$pip{$probeset_id{$affyscore{$gc}}}}}}){ print "$probeseq\t"; print "\n"; } } } } } } close (INPUT2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Complex Data Structure
by GrandFather (Saint) on Sep 14, 2008 at 22:17 UTC | |
by sesemin (Beadle) on Sep 15, 2008 at 00:27 UTC | |
|
Re: Complex Data Structure
by hexcoder (Curate) on Sep 14, 2008 at 22:13 UTC | |
by sesemin (Beadle) on Sep 15, 2008 at 00:24 UTC | |
by GrandFather (Saint) on Sep 15, 2008 at 01:51 UTC | |
by sesemin (Beadle) on Sep 15, 2008 at 05:10 UTC | |
by jwkrahn (Abbot) on Sep 15, 2008 at 01:57 UTC | |
by sesemin (Beadle) on Sep 15, 2008 at 05:14 UTC | |
|
Re: Complex Data Structure
by oko1 (Deacon) on Sep 14, 2008 at 22:47 UTC | |
by GrandFather (Saint) on Sep 14, 2008 at 23:52 UTC | |
by oko1 (Deacon) on Sep 15, 2008 at 16:57 UTC | |
by sesemin (Beadle) on Sep 15, 2008 at 00:58 UTC | |
|
Re: Complex Data Structure
by injunjoel (Priest) on Sep 15, 2008 at 18:23 UTC | |
by planetscape (Chancellor) on Sep 15, 2008 at 21:41 UTC |