################ # parse_dis.pl # ################ #!/usr/bin/perl use strict; my $chrom; while (<>) { chomp; if ($_ =~ /chr(\S+)/) { $chrom = $1; } elsif ($_ =~ /^(\d+)\s+(\d+)\s+(\d+)\s+(\d+\.\d+)\s+(\d+)\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\.\d+\s+(\S+)\s+(\S+)/) { # pull out coords of interest my $chromStart= $1; my $chromEnd = $2; my $rptPeriod = $3; my $rptSize = $4; my $rptConsensus = $5; my $rptUnit = $6; my $rpt = $7; my $rptLength = length $rpt; if (($rptPeriod == 16) && ($rptSize > 10)) { print "$chrom\t$chromStart\t$chromEnd\t$rptUnit\t$rpt\t$rpt\t$rptPeriod\t$rptSize\n"; } } }