首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

利用perl从大量数据中提取急需的有用信息

2012-10-13 
利用perl从大量数据中提取需要的有用信息open (YEAST,f:\\perl\\yeast_set2.S288C.stampy.pe.recal.varia

利用perl从大量数据中提取需要的有用信息

open (YEAST,"f:\\perl\\yeast_set2.S288C.stampy.pe.recal.variants.filter.vcf")||die("can not open the file!");while(<YEAST>){if($_=~/^##/){}elsif($_=~/^#/){@category= split/\s/,$_;open(COUNTBASE,">>f:\\perl\\a.csv")||die("can not open the file!");print COUNTBASE "             @category[0]   @category[1] @category[3] @category[4] @category[5]  \n"}else{@information=split/\s/,$_;$number=8;until($number>22){$number++;if(@information[$number]=~/^0\/0/){open(COUNTBASE,">>f:\\perl\\a.csv")||die("can not open the file!");printf COUNTBASE  "@category[$number]   @information[0]     @information[1]    @information[3]  @information[4]  @information[5]  S\n" ; }elsif(@information[9]=~/^0\/1/){open(COUNTBASE,">>f:\\perl\\a.csv")||die("can not open the file!");printf COUNTBASE  "@category[$number]   @information[0]     @information[1]    @information[3]  @information[4]  @information[5]  H\n"; }elsif(@information[9]=~/^1\/1/){open(COUNTBASE,">>f:\\perl\\a.csv")||die("can not open the file!");printf COUNTBASE  "@category[$number]   @information[0]     @information[1]    @information[3]  @information[4]  @information[5]  Y\n"; }}}}

热点排行