Mercurial > repos > amadeo > amadeo
diff Tools/CREF/list_motifs_galaxy.pl @ 3:b30ba2b06326 draft
Uploaded
author | amadeo |
---|---|
date | Mon, 05 Sep 2016 06:01:48 -0400 |
parents | 229d36377838 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Tools/CREF/list_motifs_galaxy.pl Mon Sep 05 06:01:48 2016 -0400 @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + + +$|=1; +use strict; #using this makes debugging your code much easier +use warnings; + +my $line; +my @cols; + + +if(@ARGV < 2){ +print "\nUsage: list_motifs.pl ame-shorted.txt list-motifs.txt\n\n"; +exit(0); +} +open (INPUT, "<$ARGV[0]") || + die "File '$ARGV[0]' not found\n" ; + +open (OUTPUT, ">$ARGV[1]") || + die "File '>$ARGV[1]' not found\n" ; + + while (<INPUT>){ + + $line = $_; + @cols=split; + if ($line =~ /MA/){ + printf OUTPUT "%s\n", $cols[5]; + } + } \ No newline at end of file