-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcombine-inactivated.pl
More file actions
executable file
·38 lines (28 loc) · 1021 Bytes
/
combine-inactivated.pl
File metadata and controls
executable file
·38 lines (28 loc) · 1021 Bytes
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
#!/usr/bin/perl
use strict;
my $THOUSAND="/home/bmajoros/1000G";
my $ASSEMBLY="$THOUSAND/assembly";
my $COMBINED="$ASSEMBLY/combined";
my @dirs=`ls $COMBINED`;
foreach my $indiv (@dirs) {
chomp $indiv;
next unless $indiv=~/HG\d+/ || $indiv=~/NA\d+/;
process("$COMBINED/$indiv/1-inactivated.txt",$indiv,1);
process("$COMBINED/$indiv/2-inactivated.txt",$indiv,2);
}
sub process {
my ($filename,$indiv,$allele)=@_;
open(IN,$filename) || die $filename;
while(<IN>) {
chomp; my @fields=split; next unless @fields>=4;
my ($gene,$transcript,$what,$why)=@fields;
print "$indiv\t$allele\t$gene\t$transcript\n";
}
close(IN);
}
#======================================================================
#======================================================================
#=====================================================
#=====================================================
#=====================================================
#=====================================================