Skip to content

Commit

Permalink
version 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAxtell committed Mar 21, 2014
1 parent 049c36b commit ee75e2e
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LICENSE
ShortStack.pl

Copyright (C) 2012 Michael J. Axtell
Copyright (C) 2012-2013 Michael J. Axtell

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Expand All @@ -23,15 +23,15 @@ SYNOPSIS
CITATION
If you use ShortStack in your work, please cite

Axtell MJ. (2012) ShortStack: Comprehensive annotation and
Axtell MJ. (2013) ShortStack: Comprehensive annotation and
quantification of small RNA genes. In prep.

As of this version release, a manuscript describing ShortStack is being
revised. It might be published by the time you are reading this, so
please check Pubmed before citing!

VERSION
0.4.0 :: Released December 27, 2012
0.4.1 :: Released January 8, 2013

AUTHOR
Michael J. Axtell, Penn State University, mja18@psu.edu
Expand Down Expand Up @@ -236,7 +236,7 @@ OPTIONS
for details. Default = 0.8. Allowed values between 0.5 and 1.

--mindicerfrac [float] : Minimum fraction of mappings within Dicer size
range to annotate a locus as Dicer-derived. Default = 0.85. Allowed
range to annotate a locus as Dicer-derived. Default = 0.8. Allowed
values between 0 and 1.

--phasesize [integer] : Examine phasing only for clusters dominated by
Expand Down
2 changes: 2 additions & 0 deletions README_Prep_bam
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ OPTIONS

NOTES
Input format and assumptions

It is critical that the input sam, sam.gz, or bam file be sorted by read
name. Additionally, it is assumed that read names are unique within the
file. If either of these assumptions are not true, the results of this
script are not reliable.

Exisiting NH:i: tags

If there are already NH:i: tags in the input data, they will be
discarded and over-written by the script.

Expand Down
83 changes: 77 additions & 6 deletions ShortStack.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

###############MAIN PROGRAM BLOCK
##### VERSION
my $version = "0.4.0";
## December 27, 2012
my $version = "0.4.1";
## January 8, 2013
####

##### get options and validate them
Expand Down Expand Up @@ -3257,13 +3257,51 @@ sub get_star_coord {
@b_pos = sort {$b <=> $a} @b_pos;
}
my $c;

my $lkeymax;
my $lkeymin;
my $rkeymax;
my $rkeymin;

foreach my $b (@b_pos) {
if($$brax_hash{$b} eq "\(") {
push(@left,$b);
} elsif($$brax_hash{$b} eq "\)") {
$c = pop @left;
$leftpairs{$c} = $b;

if($lkeymax) {
if($c > $lkeymax) {
$lkeymax = $c;
}
} else {
$lkeymax = $c;
}
if($lkeymin) {
if($c < $lkeymin) {
$lkeymin = $c;
}
} else {
$lkeymin = $c;
}

$rightpairs{$b} = $c;

if($rkeymax) {
if($b > $rkeymax) {
$rkeymax = $b;
}
} else {
$rkeymax = $b;
}
if($rkeymin) {
if($b < $rkeymin) {
$rkeymin = $b;
}
} else {
$rkeymin = $b;
}

}
}

Expand All @@ -3281,6 +3319,10 @@ sub get_star_coord {
until(exists($leftpairs{$i})) {
--$i;
++$j;
if($i < ($lkeymin - 1)) {
return "fail";
last;
}
}
$star_start = $leftpairs{$i} - $j;

Expand All @@ -3289,6 +3331,10 @@ sub get_star_coord {
until(exists($leftpairs{$i})) {
++$i;
++$j;
if($i > ($lkeymax + 1)) {
return "fail";
last;
}
}
$star_stop = $leftpairs{$i} + 2 + $j;

Expand All @@ -3298,6 +3344,10 @@ sub get_star_coord {
until(exists($leftpairs{$i})) {
++$i;
++$j;
if($i > ($lkeymax + 1)) {
return "fail";
last;
}
}
$star_start = $leftpairs{$i} + $j;

Expand All @@ -3306,6 +3356,10 @@ sub get_star_coord {
until(exists($leftpairs{$i})) {
--$i;
++$j;
if($i < ($lkeymin - 1)) {
return "fail";
last;
}
}
$star_stop = $leftpairs{$i} - 2 - $j;
}
Expand All @@ -3317,6 +3371,10 @@ sub get_star_coord {
until(exists($rightpairs{$i})) {
--$i;
++$j;
if($i < ($rkeymin - 1)) {
return "fail";
last;
}
}
$star_start = $rightpairs{$i} - $j;

Expand All @@ -3325,6 +3383,10 @@ sub get_star_coord {
until(exists($rightpairs{$i})) {
++$i;
++$j;
if($i > ($rkeymax + 1)) {
return "fail";
last;
}
}
$star_stop = $rightpairs{$i} + 2 + $j;
} elsif ($strand eq "-") {
Expand All @@ -3333,6 +3395,10 @@ sub get_star_coord {
until(exists($rightpairs{$i})) {
++$i;
++$j;
if($i > ($rkeymax + 1)) {
return "fail";
last;
}
}
$star_start = $rightpairs{$i} + $j;

Expand All @@ -3341,6 +3407,10 @@ sub get_star_coord {
until(exists($rightpairs{$i})) {
--$i;
++$j;
if($i < ($rkeymin - 1)) {
return "fail";
last;
}
}
$star_stop = $rightpairs{$i} - 2 - $j;
}
Expand Down Expand Up @@ -6016,7 +6086,7 @@ =head1 LICENSE
ShortStack.pl
Copyright (C) 2012 Michael J. Axtell
Copyright (C) 2012-2013 Michael J. Axtell
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -6039,13 +6109,13 @@ =head1 CITATION
If you use ShortStack in your work, please cite
Axtell MJ. (2012) ShortStack: Comprehensive annotation and quantification of small RNA genes. In prep.
Axtell MJ. (2013) ShortStack: Comprehensive annotation and quantification of small RNA genes. In prep.
As of this version release, a manuscript describing ShortStack is being revised. It might be published by the time you are reading this, so please check Pubmed before citing!
=head1 VERSION
0.4.0 :: Released December 27, 2012
0.4.1 :: Released January 8, 2013
=head1 AUTHOR
Expand Down Expand Up @@ -6154,7 +6224,7 @@ =head1 OPTIONS
--minstrandfrac [float] : Minimum fraction of mappings to one or the other strand call a polarity for non-hairpin clusters. Also the minimum fraction of "non-dyad" mappings to the sense strand within potential hairpins/miRNAs to keep the locus annotated as a hp or miRNA. See below for details. Default = 0.8. Allowed values between 0.5 and 1.
--mindicerfrac [float] : Minimum fraction of mappings within Dicer size range to annotate a locus as Dicer-derived. Default = 0.85. Allowed values between 0 and 1.
--mindicerfrac [float] : Minimum fraction of mappings within Dicer size range to annotate a locus as Dicer-derived. Default = 0.8. Allowed values between 0 and 1.
--phasesize [integer] : Examine phasing only for clusters dominated by the indicated size range. Size must be within the bounds described by --dicermin and --dicermax. Set to 'all' to examine p-values of each locus within the Dicer range, in its dominant size. Set to 'none' to suppress all phasing analysis. Default = 21. Allowed values between --dicermin and --dicermax.
Expand Down Expand Up @@ -6377,3 +6447,4 @@ =head2 Analysis of Phasing
=cut

0 comments on commit ee75e2e

Please sign in to comment.