Help for this page

Select Code to Download


  1. or download this
    open (CYT, "C:/Work/ING_Occurrences_Companies/CytokineArrays.txt");
    
  2. or download this
    open (CYT, "C:/Work/ING_Occurrences_Companies/CytokineArrays.txt")
        or die "can't read 'C:/Work/ING_Occurrences_Companies/CytokineArra
    +ys.txt': $!\n";
    
  3. or download this
    use strict;
    my $cytok_file = "C:/Work/ING_Occurrences_Companies/CytokineArrays.txt
    +";
    open CYT, '<', $cytok_file or die "can't read '$cytok_file': $!\n";
    
  4. or download this
         while (<CYT>){
         chomp;
         @cytokine=split(/\t/,$_);}
    
  5. or download this
    while (<CYT>) {
        chomp;
        my ($name, $description, $ID ) = split /\t/;
        $occurrences{$ID} = 0;  # initial count
    }
    
  6. or download this
    while (<CYT>) {
        chomp;
        my $ID = (split /\t/)[2];
        $occurrences{$ID} = 0; # initial count
    }
    
  7. or download this
    while (<CYT>) {
        chomp;
        $occurrences{ (split /\t/)[2] } = 0; # initial count
    }
    
  8. or download this
    close CYT;
    
  9. or download this
    close CYT or die "can't close filehandle CYT properly: $!\n";
    
  10. or download this
    open (OUT, ">C:/Work/ING_Occurrences_Companies/ING_Count.txt"); 
    open (IN, "C:/Work/ING_Occurrences_Companies/ING.txt");
    
  11. or download this
    my $outfile = "C:/Work/ING_Occurrences_Companies/ING_Count.txt";
    my $infile  = "C:/Work/ING_Occurrences_Companies/ING.txt";
    
    open OUT, '>', $outfile or die "can't write '$outfile': $!\n"; 
    open IN,  '<', $infile  or die "can't read '$infile': $!\n";
    
  12. or download this
         while (<IN>){
         chomp;
    ...
         print OUT "$ING[0]\t$ING[1]\t$cytokine{$ING[2]}\t$count\t\n";
    
    }}
    
  13. or download this
    my %lines;
    while (<IN>) {
    ...
        $ocurrences{$ID}++;
        $lines{$ID} = $_;
    }
    
  14. or download this
    foreach my $ID (sort keys %ocurrences) {
        print $lines{$ID}, "\t", $ocurrences{$ID}, "\n";
    }