chenchengfly的个人博客分享 http://blog.sciencenet.cn/u/chenchengfly

博文

get_LOD_peak.pl(MapQTL6.0)

已有 4141 次阅读 2017-3-9 15:19 |系统分类:科研笔记

#!/usr/bin/perl -w

#===============================================================

# This script is used to extract the LOD value of a batch of files at 95% informative interval for MapQTL

# By chencheng hengbenxianfeng@163.com

# Start time: 2017/3/6 19:40

# End time: 2017/3/6 20:10

# Title get_LOD_peak.pl

# ===============================================================

use strict;

use File::Basename;

use FindBin qw($Bin);

die "perl $0 <out file>\n" unless @ARGV == 1;

open OUT, ">$ARGV[0]";

print OUT join("\t","Trait","LOD","p_value" ),"\n";

my @file = glob "*mqo";

foreach my $one(@file)

{

open IN, $one || die "cannot open the file\n";

my $count;

my $name = $one;

$name =~ s/Session\ \d\ \(PT\)_HR_bin_geno_//g;

$name =~ s/\.mqo//g;

while(<IN>)

{

chomp;

my @arr = split;

if($arr[1] eq 'GW' and $arr[6] >= 0.945)

{

$count ++;

if($count ==1 )

{

print OUT join ("\t",$name,@arr[2,6]),"n";

}

}

}

close IN;

}

close OUT;




https://wap.sciencenet.cn/blog-3262030-1038514.html

上一篇:岁月难留
下一篇:perl根据列合并多个文件(不超过5个)
收藏 IP: 103.250.227.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-11-9 07:16

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部