RBP AS生信流程(N)RBP表达量提取

use strict;
use warnings;
my %hash=();
open(RF,"RBPgene.txt") or die $!;
while(my $line=){
    chomp($line);
    $hash{$line}=1;
}
close(RF);
open(RF,"gene expression.txt") or die $!;
open(WF,">RBP expression.txt") or die $!;
while(my $line=){
    if($.==1){
        print WF $line;
        next;
    }
    my @arr=split(/\t/,$line);
    my @zeroArr=split(/\|/,$arr[0]);
    if(exists $hash{$zeroArr[0]}){
        print WF $line;
        delete($hash{$zeroArr[0]});
    }
}
close(WF);
close(RF);

你可能感兴趣的:(RBP AS生信流程(N)RBP表达量提取)