ftp://ftp.ncbi.nlm.nih.gov/pub/CCDS/current_human/CCDS.current.txt

#!usr/bin/perl open(FILE,"CCDS.CURRENT.TXT");while(){
next if /^#/;
@F=split;
/\[(.*?)\]/;#匹配到[]的任意内容
@tmp=split/,/,$1;
foreach(@tmp){
$_=~s/-/\t/;
print "$F[2]\t$F[6]\t$F[0]\t$_\n";}
}
结果

#!usr/bin/perl open FH,"norm.txt";while(){
chomp;
@F=split;
foreach ($F[3]..$F[4]){
$hash{"$F[2]:$_"}=1;}}
close FH;
$tmp++ foreach keys %hash;
print "$tmp\n";
网友评论