4 use lib
'/nas/RD_09C/resequencing/soft/lib';
5 #use GalaxyXS::ChromByte;
6 use Data
::Dump
qw(ddx);
9 print "perl $0 <In_file> <Out_prefix> <ChrID>\n";
20 my ($Count,$population)=(0);
22 open I
,'<',$ARGV[0] or die $!;
27 my ($Pos,$D)=split /\s+/,$_,2;
29 push @
{$deDup{$D}},$Pos;
34 $population=split(/\s+/,(values %DAT)[0]);
43 for my $D (keys %deDup) {
45 @T=sort {$a<=>$b} @
{$deDup{$D}};
47 $deDup{$D}=[ $T[0],$T[1] ]; # Remember the old version is $T[0,1] ! The correct is 0,-1 .
51 #$deDup{$D}=$max?[$min,$max]:[$min];
54 my @OrderD=sort {$deDup{$a}->[0] <=> $deDup{$b}->[0]} keys %deDup;
56 my ($lastPos,$CurrPos)=0;
58 $CurrPos = ($#{$deDup{$D}}==1)?($deDup{$D}->[1]):($deDup{$D}->[0]);
59 warn "[!]$lastPos covers [",join(',',@
{$deDup{$D}}),"].\n" if $CurrPos < $lastPos;
64 open O
,'>',$ARGV[1].'.intercross' or die $!;
65 open OO
,'>',$ARGV[1].'.order' or die $!;
66 open G
,'>',$ARGV[1].'.group' or die $!;
67 print O
"data type f2 intercross\n$population $Count\n";
68 #for my $pos (sort {$a<=>$b} keys %DAT) {
70 my $pos=join('-',@
{$deDup{$D}});
73 print O
$ARGV[2],"m$pos\t",join("\t",split /\s+/,$str),"\n";
74 print OO
'*',$ARGV[2],"m$pos\n";
75 print G
substr($ARGV[2].'m'.$pos,0,15),'=',$ARGV[2],"m$pos\n";
76 print G
$ARGV[2],'m',$_,"\n" for @
{$TtoMarkers{$D}};
84 ./tmapfmt.pl ./dat
2/Chr01_num Chr01
.ic Chr01
85 cat chrorder
| while read a
; do ./tmapfmt.pl ./dat
2/${a
}_num de
$a $a;done
&
87 ./tmap-1.0/pedmerge ril1206
.Chr01
.intercross tt
88 cat chrorder
| while read a
; do ./tmap-1.0/pedmerge
./marker/de
$a.intercross
./marker/de
$a.pedigree
;done
&
89 (Name beginning with Chr12m21531432
- too long
, truncating
)
93 #$ -v PERL5LIB,PATH,PYTHONPATH,LD_LIBRARY_PATH,BLASTDB
95 #$ -S /bin/bash -t 1-12
96 #$ -o /dev/null -e /dev/null
98 a
=$(sed
-n
-e
"$SGE_TASK_ID p" $SEEDFILE)
99 eval ./tmap-1.0/tmap
-i
./marker/de
$a.pedigree
./marker/de
$a.order
> ./marker/de
$a.imo
2> ./marker/de
$a.imo
.log