-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
693 changed files
with
253,373 additions
and
5 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/python | ||
|
||
import sys | ||
import matplotlib | ||
# Force matplotlib to not use any Xwindows backend. | ||
matplotlib.use('Agg') | ||
import matplotlib.pyplot as plt | ||
import matplotlib.ticker as mtick | ||
|
||
f = open(sys.argv[1], 'r') | ||
coverage_map = dict() | ||
richness_map = dict() | ||
for line in f: | ||
data_list = line.split() | ||
coverage_map[int(data_list[0])] = float(data_list[1]) * 100 | ||
richness_map[int(data_list[0])] = float(data_list[2]) | ||
|
||
width = int(sys.argv[3]) | ||
height = int(sys.argv[4]) | ||
dpiVal = int(sys.argv[5]) | ||
|
||
plt.figure(figsize=(width,height)) | ||
ax = plt.subplot(2, 1, 1) | ||
plt.title('Coverage') | ||
plt.xlabel('Position in the Alignment') | ||
plt.ylabel('Proportional') | ||
plt.ylim(0,100) | ||
fmt = '%.0f%%' | ||
yticks = mtick.FormatStrFormatter(fmt) | ||
ax.yaxis.set_major_formatter(yticks) | ||
coverage = coverage_map.values() | ||
max_coverage = max(coverage) | ||
if max_coverage == 0: | ||
max_coverage = 1 | ||
fracs = [data/max_coverage for data in coverage] | ||
jet = plt.get_cmap('jet') | ||
plt.bar(range(len(coverage_map)), coverage, width=1, color=jet(fracs), linewidth=0.5) | ||
|
||
plt.subplots_adjust(hspace=0.25) | ||
ax = plt.subplot(2, 1, 2) | ||
plt.title('Richness') | ||
plt.xlabel('Position') | ||
plt.ylabel('Number of Unique k-mers') | ||
#plt.ylim(0,60) | ||
richness = richness_map.values() | ||
max_richness = max(richness) | ||
if max_richness == 0: | ||
max_richness = 1 | ||
fracs = [data/max_richness for data in richness] | ||
plt.bar(range(len(richness_map)), richness, width=1, color=jet(fracs), linewidth=0.5) | ||
plt.savefig(sys.argv[2], dpi=dpiVal) |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
#!/usr/bin/perl | ||
# | ||
# Logical compare (i.e. diff) of two settings files. | ||
# | ||
# For usage, see the usage statement in the code, below. | ||
# | ||
# ====================================================================== | ||
# (c) Copyright 1996,1997,1998,1999,2000,2001,2004,2006,2007,2008,2010, | ||
# 2011,2012 | ||
# Whitehead Institute for Biomedical Research, Steve Rozen, | ||
# Andreas Untergasser and Helen Skaletsky | ||
# All rights reserved. | ||
# | ||
# This file is part of the primer3 suite. | ||
# | ||
# The primer3 suite is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This software is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this file (file gpl-2.0.txt in the source distribution); if | ||
# not, write to the Free Software Foundation, Inc., 51 Franklin St, | ||
# Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# ====================================================================== | ||
|
||
|
||
|
||
use strict; | ||
use warnings "all"; | ||
use Getopt::Long; | ||
|
||
my $file1; | ||
my $file2; | ||
|
||
my %tags1; | ||
my %tags2; | ||
|
||
sub read_file($$) | ||
{ | ||
my ($file, $tags) = @_; | ||
open IN, $file or die "open $file: $!\n"; | ||
# skip first line | ||
my $line = <IN>; | ||
while ($line = <IN>) { | ||
chomp($line); | ||
# skip empty lines and comments | ||
if ($line =~ /^\s*$/) { next; } | ||
if ($line =~ "^#") { next; } | ||
unless ($line =~ /(\S*)=(.*)/) { print STDERR "wrong line format: $line\n"; next; } | ||
my $tag = $1; | ||
my $value = $2; | ||
$tags->{$tag} = $value; | ||
} | ||
close IN; | ||
} | ||
|
||
if (!GetOptions("file1=s" => \$file1, "file2=s" => \$file2) || !defined($file1) || !defined($file2)) { | ||
die "\nUsage:\n" | ||
. "$0 -file1 <filename1> -file2 <filename2>\n"; | ||
} | ||
|
||
read_file($file1, \%tags1); | ||
read_file($file2, \%tags2); | ||
|
||
my @only1; | ||
|
||
# cmp tags1 with tags2 print anything common different | ||
print "Common tags with different values:\n"; | ||
foreach my $tag (sort (keys %tags1)) { | ||
if (defined($tags2{$tag})) { | ||
if ($tags1{$tag} ne $tags2{$tag}) { | ||
print "\t$tag:\n\t\t$file1: $tag=$tags1{$tag}\n\t\t$file2: $tag=$tags2{$tag}\n" | ||
} | ||
} else { | ||
push(@only1, $tag); | ||
} | ||
} | ||
|
||
print "Tags that exist only in $file1:\n"; | ||
foreach my $tag (@only1) { | ||
print "\t$tag=$tags1{$tag}\n"; | ||
} | ||
|
||
print "Tags that exist only in $file2:\n"; | ||
foreach my $tag (keys %tags2) { | ||
if (!defined($tags1{$tag})) { | ||
print "\t$tag=$tags2{$tag}\n"; | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
SEQUENCE_ID=example | ||
SEQUENCE_TEMPLATE=GTAGTCAGTAGACNATGACNACTGACGATGCAGACNACACACACACACACAGCACACAGGTATTAGTGGGCCATTCGATCCCGACCCAAATCGATAGCTACGATGACG | ||
SEQUENCE_TARGET=37,21 | ||
PRIMER_TASK=pick_detection_primers | ||
PRIMER_PICK_LEFT_PRIMER=1 | ||
PRIMER_PICK_INTERNAL_OLIGO=1 | ||
PRIMER_PICK_RIGHT_PRIMER=1 | ||
PRIMER_OPT_SIZE=18 | ||
PRIMER_MIN_SIZE=15 | ||
PRIMER_MAX_SIZE=21 | ||
PRIMER_MAX_NS_ACCEPTED=1 | ||
PRIMER_PRODUCT_SIZE_RANGE=75-100 | ||
P3_FILE_FLAG=1 | ||
SEQUENCE_INTERNAL_EXCLUDED_REGION=37,21 | ||
PRIMER_EXPLAIN_FLAG=1 | ||
= |
Oops, something went wrong.