|
#!/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;
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-9 07:16
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社