Get exon id from affymatrix.pl

From Augix' Wiki

Jump to: navigation, search
#!/usr/bin/perl -w
 
if(@ARGV!=1){ die "\nPlease input the chromosome name!\n\n";}
my $input=$ARGV[0];
 
$exon_list="/picb/home5/song/primer_design/gff/".$input.".hg18.gff";
 
open EXON_LIST, $exon_list or die "Cannot open $exon_list for read:$!";
 
$location_list="../output/".$input."_exon_location.txt";
 
open LOCATION_LIST, ">$location_list" or die "Cannot open $location_list for write:$!";
 
print LOCATION_LIST "TRANSCRIPT_CLUSTER_ID	CHROM_NAME	Chain	EXON_CLUSTER_ID		START	STOP\n";
 
while(<EXON_LIST>){
      if(/(chr.+)\t.+\texon_cluster\t(\d+)\t(\d+).*\.\s(.)\s\..*transcript_cluster_id\s(\d+).*exon_cluster_id\s(\d+)/){
               #print "$_";
               #print "$5	$1	$4	$6	$2	$3\n";
               print LOCATION_LIST "$5	$1	$4	$6	$2	$3\n";
      }
}
 
close(EXON_LIST);
Personal tools