-
Notifications
You must be signed in to change notification settings - Fork 0
/
filter01.pl
45 lines (35 loc) · 1012 Bytes
/
filter01.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## putcell02.pl
##
## assign the cell line into PubChem bioassay record
##
use warnings;
use strict;
my $infile="input.tsv";
if($ARGV[0]){$infile = $ARGV[0];}
open INPUT,"<$infile";
my $outfile1="review.tsv";
if($ARGV[1]){$outfile1 = $ARGV[1];}
open OUT1,">$outfile1";
my $outfile2="discard.tsv";
if($ARGV[2]){$outfile2 = $ARGV[2];}
open OUT2,">$outfile2";
my $line = <INPUT>; #read & print title;
print OUT1 $line;
print OUT2 $line;
while($line = <INPUT>){
my $oriline= $line;
chomp $line;
my @col = split "\t",$line;
my $cellname="";
if($col[14]){
my $test = uc $col[14];
if($test=~m/(KILLING|ANTITUMOR|ANTICANCER|ANTIPROLIFERATIVE|PROLIFERATION|ARREST|VIABILITY|CYTOSTATIC|CYTOTOXIC|TOXICITY|GROWTH|ANTIANGIOGENIC|BACTERIAL|INFLAMMATORY|MALARIAL|MICROBIAL|PLASMODIAL|ANTIVIRAL|VIRUS|MITOCHONDRIAL|PRODUCTION)/){
print OUT2 $oriline;
}else{
print OUT1 $oriline;
}
}#end if($col[14])
}#end while
close INPUT;
close OUT1;
close OUT2;