Created
September 1, 2015 09:05
-
-
Save wakuteka/aed0efcc66bfa60ddd39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $target="ATcgAGCGTTTCG"; | |
my $line; | |
open (DATAFILE, " < /home/work/biol/References/hg19/chr2.fa")) or die("error: no such file! \n!); | |
print $target."\n"; | |
while ($line = <DATAFILE>) | |
{ | |
$target=uc($line); | |
my @pos; | |
@pos[0]=0; | |
for(my $i=1; $i<=3; $i++){ | |
@pos[$i] = index($target,"CG",@pos[$i-1]) + 1; | |
print "$i\t@pos[$i]\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment