annotate tools/filters/CreateInterval.pl @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 #! /usr/bin/perl -w
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 # Accepts chrom, start, end, name, and strand
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 # If strand is void sets it to plus
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 # CreateInterval.pl $chrom $start $end $name $strand $output
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 my $strand = "+";
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 die "Not enough arguments\n" unless @ARGV == 6;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 open OUT, ">$ARGV[5]" or die "Cannot open $ARGV[5]:$!\n";
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 $strand = "-" if $ARGV[4] eq "minus";
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 $ARGV[3] =~ s/\s+/_/g;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 $ARGV[3] =~ s/\t+/_/g;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 print OUT "$ARGV[0]\t$ARGV[1]\t$ARGV[2]\t$ARGV[3]\t0\t$strand\n";
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 close OUT;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19