Skip to content
Commits on Source (8)
Copyright (c) 2014, MarBL
All rights reserved.
PURPOSE
Parsnp is a command-line-tool for efficient microbial core genome alignment
and SNP detection. Parsnp was designed to work in tandem with Gingr,
a flexible platform for visualizing genome alignments and phylogenetic trees;
both Parsnp and Gingr form part of the Harvest suite. Parsnp is implemented in C++ and Python.
COPYRIGHT LICENSE
Copyright © 2014, Battelle National Biodefense Institute (BNBI);
all rights reserved. Authored by: Brian Ondov, Todd Treangen, and
Adam Phillippy
This Software was prepared for the Department of Homeland Security
(DHS) by the Battelle National Biodefense Institute, LLC (BNBI) as
part of contract HSHQDC-07-C-00020 to manage and operate the National
Biodefense Analysis and Countermeasures Center (NBACC), a Federally
Funded Research and Development Center.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the {organization} nor the names of its
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
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 HOLDER 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
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
HOLDER 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.
This diff is collapsed.
......@@ -5,4 +5,6 @@ make install
cd ..
./autogen.sh
./configure
echo "Fix MUSCLE-3.7 linker"
make LDADD=-lMUSCLE-3.7
make install
......@@ -7,4 +7,6 @@ make install
cd ..
./autogen.sh
./configure
echo "Fix MUSCLE-3.7 linker"
make LDADD=-lMUSCLE-3.7
make install
parsnp (1.2.1+dfsg-1) unstable; urgency=medium
* New upstream version
* Standards-Version: 4.4.1
-- Andreas Tille <tille@debian.org> Thu, 14 Nov 2019 11:27:23 +0100
parsnp (1.2+dfsg-6) unstable; urgency=medium
* Use 2to3 to port to Python3
......
......@@ -9,7 +9,7 @@ Build-Depends: debhelper-compat (= 12),
python3-setuptools,
cython3,
libmuscle-dev
Standards-Version: 4.4.0
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/med-team/parsnp
Vcs-Git: https://salsa.debian.org/med-team/parsnp.git
Homepage: https://harvest.readthedocs.org/en/latest/content/parsnp.html
......
This diff is collapsed.
......@@ -49,7 +49,7 @@ Description: Fix path to Debian installed tools
#set MUMmer paths
if os.path.exists("%s/MUMmer/nucmer_run"%(PARSNP_DIR)):
ff = open("%s/MUMmer/nucmer_run"%(PARSNP_DIR))
@@ -784,12 +770,12 @@ if __name__ == "__main__":
@@ -789,12 +775,12 @@ if __name__ == "__main__":
if use_parsnp_mumi and not curated:
sys.stderr.write( "-->Calculating MUMi..\n")
if not inifile_exists:
......@@ -64,7 +64,7 @@ Description: Fix path to Debian installed tools
run_command(command)
try:
mumif = open(outputDir+os.sep+"all.mumi",'r')
@@ -962,14 +948,14 @@ if __name__ == "__main__":
@@ -967,14 +953,14 @@ if __name__ == "__main__":
if command == "" and xtrafast and 0:
command = "%s/parsnpA_fast %sparsnpAligner.ini"%(PARSNP_DIR,outputDir+os.sep)
elif command == "":
......@@ -82,7 +82,7 @@ Description: Fix path to Debian installed tools
run_command(command)
@@ -1159,21 +1145,21 @@ if __name__ == "__main__":
@@ -1164,21 +1150,21 @@ if __name__ == "__main__":
if xtrafast or 1:
#add genbank here, if present
if len(genbank_ref) != 0:
......@@ -107,15 +107,15 @@ Description: Fix path to Debian installed tools
- command = "%s/ft -nt -quote -gamma -slow -boot 100 "%(PARSNP_DIR)+outputDir+os.sep+"parsnp.snps.mblocks > "+outputDir+os.sep+"parsnp.tree"
+ command = "fasttree -nt -quote -gamma -slow -boot 100 "+outputDir+os.sep+"parsnp.snps.mblocks > "+outputDir+os.sep+"parsnp.tree"
print "-->Reconstructing core genome phylogeny.."
print("-->Reconstructing core genome phylogeny..")
run_command(command)
#7)reroot to midpoint
@@ -1204,7 +1190,7 @@ if __name__ == "__main__":
@@ -1209,7 +1195,7 @@ if __name__ == "__main__":
if xtrafast or 1:
#if newick available, add
#new flag to update branch lengths
- run_command("%s/harvest --midpoint-reroot -u -q -i "%(PARSNP_DIR)+outputDir+os.sep+"parsnp.ggr -o "+outputDir+os.sep+"parsnp.ggr -n %s"%(outputDir+os.sep+"parsnp.tree "))
+ run_command("harvesttools --midpoint-reroot -u -q -i "+outputDir+os.sep+"parsnp.ggr -o "+outputDir+os.sep+"parsnp.ggr -n %s"%(outputDir+os.sep+"parsnp.tree "))
print " |->["+OK_GREEN+"OK"+ENDC+"]"
print(" |->["+OK_GREEN+"OK"+ENDC+"]")
import os,sys,string
#parsnp basic INSTALL script
user_home = os.environ["HOME"]
print "<<Welcome to Parsnp utility script install>>"
print("<<Welcome to Parsnp utility script install>>")
#check for python version
if (sys.version_info[0] < 2) or (sys.version_info[0] == 2 and sys.version_info[1] < 6):
if (sys.version_info[0] < 3) or (sys.version_info[0] == 3 and sys.version_info[1] < 1):
print "Python version is %s. Parsnp requires at least 2.6"%(sys.version)
print("Python version is %s. Parsnp requires at least 3.1"%(sys.version))
sys.exit(1)
#complete shebang
......
......@@ -51,7 +51,7 @@ if __name__ == "__main__":
rnumber = 0
shuffleperseq = 1
if len(sys.argv) < 6:
print "\nUsage: shuffleGenome <FastA input file> <output file> <Rearrangement size> <Number of rearrangements> <Shuffled sequences per seq>"
print("\nUsage: shuffleGenome <FastA input file> <output file> <Rearrangement size> <Number of rearrangements> <Shuffled sequences per seq>")
sys.exit(1)
else:
infileName = sys.argv[1]
......@@ -77,22 +77,22 @@ if __name__ == "__main__":
header = infile.readline()
infiled = infile.read()
filelen = len(infiled)
print "\nInput sequence:%s"%seqfile
print "Input sequence length: %d\n"%filelen
print("\nInput sequence:%s"%seqfile)
print("Input sequence length: %d\n"%filelen)
#split genome into filelen/rsize parts
partlist = []
pos = 0
if rsize > filelen:
rsize = filelen
for part in xrange(0,filelen/rsize):
for part in range(0,filelen/rsize):
partlist.append(infiled[pos:(part+1)*rsize])
pos +=rsize
partlist.append(infiled[pos:])
for shuffleit in xrange(0,shuffleperseq):
for shuffleit in range(0,shuffleperseq):
count = 0
seq = ""
parttemp = ""
......@@ -114,13 +114,13 @@ if __name__ == "__main__":
parttemp = partlist[part1]
partlist[part1] = partlist[part2]
partlist[part2] = parttemp
print "Transposition"
print " Positions %d and %d swapped"%(part1,part2)
print("Transposition")
print(" Positions %d and %d swapped"%(part1,part2))
elif operation == 2:
#inversion
partlist[part1] = invertSeq(partlist[part1])
print "Inversion"
print " Position %d"%part1
print("Inversion")
print(" Position %d"%part1)
......@@ -137,7 +137,7 @@ if __name__ == "__main__":
#write output to file
fname = seqfile[:-4]
fname+= "_Shuffled_%d.fna"%(shuffleit+1)
print "output: %s"%(fname)
print("output: %s"%(fname))
fout = open(fname,'w')
fout.write(output)
......