Skip to content

Commit

Permalink
v0.1c
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjijunekim committed Mar 7, 2017
1 parent a246a45 commit cb187ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 66 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@

### Requirements
* bowtie2-2.2.9: Download bowtie2-2.2.9 from [here.](https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.9)
* RAM: 2G per fastq/fasta file.
* RAM: 2.5G per fastq/fasta file.

65 changes: 0 additions & 65 deletions scripts/search1.pl
Original file line number Diff line number Diff line change
Expand Up @@ -75,71 +75,6 @@
}
$di_ct++;
}
=comment
#check which comes first I or D.
my $first = "";
foreach my $char (split //, $cig) {
if ($char eq 'I'){
$first = "I";
last;
}
if ($char eq 'D'){
$first = "D";
last;
}
}
my (%DP,%IP);
my $d_ct = 1;
my $i_ct = 1;
if ($first eq "D"){
while ($cig =~ /(\d+)M(\d+)D(\d+)M/){
my $N = $1+$2+$3;
my $str = $1 . "M" . $2 . "D" . $3 . "M";
my $dpos = $1;
my $dcnt = $2;
# print "dpos:$dpos\tdcnt:$dcnt\n";
$DP{"$d_ct.$dpos"} = "$dcnt";
my $new_str = $N . "M";
$cig =~ s/$str/$new_str/;
$d_ct++;
}
while ($cig =~ /(\d+)M(\d+)I(\d+)M/){ #insertion
# my $N = $1+$2+$3;
my $N = $1+$3;
my $str = $1 . "M" . $2 . "I" . $3 . "M";
my $Icnt = $2;
my $Ipos = $1;
$IP{"$i_ct.$Ipos"} = "$Icnt";
my $new_str = $N . "M";
$cig =~ s/$str/$new_str/;
$i_ct++;
}
}
else{
while ($cig =~ /(\d+)M(\d+)I(\d+)M/){ #insertion
# my $N = $1+$2+$3;
my $N = $1+$3;
my $str = $1 . "M" . $2 . "I" . $3 . "M";
my $Icnt = $2;
my $Ipos = $1;
$IP{"$i_ct.$Ipos"} = "$Icnt";
my $new_str = $N . "M";
$cig =~ s/$str/$new_str/;
$i_ct++;
}
while ($cig =~ /(\d+)M(\d+)D(\d+)M/){
my $N = $1+$2+$3;
my $str = $1 . "M" . $2 . "D" . $3 . "M";
my $dpos = $1;
my $dcnt = $2;
# print "dpos:$dpos\tdcnt:$dcnt\n";
$DP{"$d_ct.$dpos"} = "$dcnt";
my $new_str = $N . "M";
$cig =~ s/$str/$new_str/;
$d_ct++;
}
}
=cut
$cig =~ /[^M\d]*(\d+)M/;
my $M = $1;
my $A = $sizeA - $N;
Expand Down

0 comments on commit cb187ed

Please sign in to comment.