Skip to content
Commits on Source (12)
velvet (1.2.10+dfsg1-6) unstable; urgency=medium
* Use 2to3 to port to Python3
Closes: #945743
* debhelper-compat 12
* Standards-Version: 4.4.1
* Secure URI in copyright format
* Remove trailing whitespace in debian/changelog
* Remove trailing whitespace in debian/control
* autopkgtest: s/ADTTMP/AUTOPKGTEST_TMP/g
* Use secure URI in Homepage field.
* Set upstream metadata fields: Repository-Browse.
* Remove obsolete fields Contact, Name from debian/upstream/metadata.
-- Andreas Tille <tille@debian.org> Mon, 02 Dec 2019 13:40:35 +0100
velvet (1.2.10+dfsg1-5) unstable; urgency=medium
[ Steffen Moeller ]
......
......@@ -4,14 +4,14 @@ Uploaders: Charles Plessy <plessy@debian.org>,
Andreas Tille <tille@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper-compat (= 12),
zlib1g-dev,
texlive-latex-base,
texlive-latex-recommended
Standards-Version: 4.1.4
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/med-team/velvet
Vcs-Git: https://salsa.debian.org/med-team/velvet.git
Homepage: http://www.ebi.ac.uk/~zerbino/velvet/
Homepage: https://www.ebi.ac.uk/~zerbino/velvet/
Package: velvet
Architecture: any
......@@ -49,7 +49,7 @@ Description: Nucleic acid sequence assembler for very short reads, long version
Package: velvet-example
Architecture: all
Depends: ${misc:Depends}
Recommends: python
Recommends: python3
Description: Example data for the Velvet sequence assembler
Velvet is a de novo genomic assembler specially designed for short read
sequencing technologies, such as Solexa or 454, developed by Daniel Zerbino and
......@@ -66,7 +66,7 @@ Description: Example data for the Velvet sequence assembler
Package: velvet-tests
Architecture: all
Depends: ${misc:Depends}
Recommends: python
Recommends: python3
Description: Test data for the Velvet sequence assembler
Velvet is a de novo genomic assembler specially designed for short read
sequencing technologies, such as Solexa or 454, developed by Daniel Zerbino and
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Velvet
Upstream-Contact: Daniel Zerbino <zerbino@ebi.ac.uk>
Source: http://www.ebi.ac.uk/~zerbino/velvet/velvet_1.2.10.tgz
......
Description: Use 2to3 to port to Python3
Bug-Debian: https://bugs.debian.org/945743
Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 02 Dec 2019 13:36:55 +0100
--- a/contrib/AssemblyAssembler1.3/AssemblyAssembler1.3.py
+++ b/contrib/AssemblyAssembler1.3/AssemblyAssembler1.3.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# AssemblyAssembler.pl
#
@@ -37,11 +37,11 @@ if sys.version_info < (2, 5):
## Setting working directory
parDir = os.getcwd()
-print str('============================================== \n')
+print(str('============================================== \n'))
## Retrieve user input
ptester = [0,0,0,0,0,0,0,0,0]
increads = str('n')
-print '\nRetrieving your input values \n'
+print('\nRetrieving your input values \n')
for i in range(len(sys.argv)):
if (sys.argv[i] == '-s'):
if(int(sys.argv[i+1])%2 == 1):
@@ -79,36 +79,36 @@ for i in range(len(sys.argv)):
ptester[8] = 1
## Check and set hash value range
-print 'Checking your hash value range...'
+print('Checking your hash value range...')
if ((int(hashe)-int(hashs))>=16):
- print 'Looks good\n'
- hashrange = range(int(hashs),(int(hashe)+1),2)
+ print('Looks good\n')
+ hashrange = list(range(int(hashs),(int(hashe)+1),2))
hashlist = [hashrange[0],hashrange[int(round(len(hashrange)*0.12))],hashrange[int(round(len(hashrange)*0.25))],hashrange[int(round(len(hashrange)*0.37))],hashrange[int(round(len(hashrange)*0.5))],hashrange[int(round(len(hashrange)*0.6))],hashrange[int(round(len(hashrange)*0.7))],hashrange[int(round(len(hashrange)*0.82))],hashrange[len(hashrange)-1]]
else:
sys.exit('Insufficient hash range. This routine is only useful if kmer range >= 16. \n\n')
## Checking to make sure minimum parameters are in place
-print 'Checking to make sure minimum parameters are in place...'
+print('Checking to make sure minimum parameters are in place...')
if (sum(ptester[0:4]) < 4):
sys.exit('Incorrect command line entry. Please enter parameters values for -s, -e, -f -v and -d \n')
elif(sum(ptester[0:4]) == 4):
if(sum(ptester[4:6])==0):
- print str('Okay, will conduct assemblies across range of kmer values from '+hashs+' to '+hashe+' with no coverage cutoff \n')
+ print(str('Okay, will conduct assemblies across range of kmer values from '+hashs+' to '+hashe+' with no coverage cutoff \n'))
elif(sum(ptester[4:6])==1):
sys.exit('Incorrect command line entry. Not quite enough information. Please enter both a coverage cutoff value (or auto) and the lowest kmer value to implement the cutoff \n')
elif(sum(ptester[4:6])==2):
- print str('Okay, will conduct assemblies across range of kmer values from '+hashs+' to '+hashe+' with coverage cutoff of '+covcut+' implemented at kmer values between '+thresh+' and '+hashe+ '\n')
+ print(str('Okay, will conduct assemblies across range of kmer values from '+hashs+' to '+hashe+' with coverage cutoff of '+covcut+' implemented at kmer values between '+thresh+' and '+hashe+ '\n'))
if(sum(ptester[6:8])==0):
- print str('Running assemblies with unpaired reads \n')
+ print(str('Running assemblies with unpaired reads \n'))
elif(sum(ptester[6:8])==1):
if(ptester[7]==0):
sys.exit('Incorrect command line entry. Not quite enough information. Please enter both a expected coverage value (or auto) and the expected length of the total sequenced fragment (see Velvet manual) \n')
elif(sum(ptester[6:8])==2):
- print str('Will run assemblies with paired reads \n')
+ print(str('Will run assemblies with paired reads \n'))
-print str('==============================================')
-print str('Step 1: Exploratory Assemblies \n')
+print(str('=============================================='))
+print(str('Step 1: Exploratory Assemblies \n'))
## Constructing Velvetg call
vgcallb = str(velvDir+'/velvetg ./')
if(sum(ptester[6:8])==2):
@@ -147,7 +147,7 @@ except:
hashes = [hashlist[0],hashlist[2],hashlist[4],hashlist[6],hashlist[8]]
## Call velveth and velvetg for hash values across coarse sampling of range and determining best assembly
-print 'Running velvet with intitial set of hash values \n'
+print('Running velvet with intitial set of hash values \n')
contigs = []
unu = []
MAXCONT = {}
@@ -155,17 +155,17 @@ maxcheck = [0,0,0,0,0]
for i in range(5):
os.mkdir(str('Dir'+str(hashes[i])))
os.chdir(str(os.getcwd()+'/Dir'+str(hashes[i])))
- print 'Running velveth with k= '+str(hashes[i])
+ print('Running velveth with k= '+str(hashes[i]))
os.system(str(velvDir+'/velveth ./ '+str(hashes[i])+' '+velvethcall+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
if(sum(ptester[4:6])==0):
- print 'Running velvetg on k= '+str(hashes[i])+' velveth files'
+ print('Running velvetg on k= '+str(hashes[i])+' velveth files')
os.system(vgcall)
elif(sum(ptester[4:6])==2):
if(hashes[i] < thresh):
- print 'Running velvetg on k= '+str(hashes[i])+' velveth files'
+ print('Running velvetg on k= '+str(hashes[i])+' velveth files')
os.system(vgcall)
elif(hashes[i] >= thresh):
- print 'Running velvetg with coverage cutoff on k= '+str(hashes[i])+' velveth files'
+ print('Running velvetg with coverage cutoff on k= '+str(hashes[i])+' velveth files')
os.system(vgcallat)
os.system(str('mv contigs.fa '+parDir+'/FinalDir/contigs'+str(hashes[i])+'.fa'))
os.system(str('mv Log '+parDir+'/FinalDir/Log'+str(hashes[i])))
@@ -181,7 +181,7 @@ for i in range(5):
for j in input:
j = j.split(' ')
if (j[0] == 'Final'):
- if not MAXCONT.has_key(hashes[i]):
+ if hashes[i] not in MAXCONT:
MAXCONT[hashes[i]] = 0
MAXCONT[hashes[i]] = int(j[10][:-1])
maxcheck[i] = 1
@@ -190,19 +190,19 @@ for i in range(5):
if (sum(maxcheck) < 5):
sys.exit('One or more of the exploratory assemblies failed. Please examine log files to determine the cause and try again.')
-print str('==============================================')
-print str('Step 2: Optimisation Assemblies \n')
+print(str('=============================================='))
+print(str('Step 2: Optimisation Assemblies \n'))
## Make directories and do additional velvet runs
BEST = max(MAXCONT, key = MAXCONT.get)
-print str('Of the first 5 assemblies k='+str(BEST)+' had the longest contig')
-print str('Sampling deeper around '+str(BEST)+'\n')
+print(str('Of the first 5 assemblies k='+str(BEST)+' had the longest contig'))
+print(str('Sampling deeper around '+str(BEST)+'\n'))
if (BEST == hashlist[0]):
- print 'Running velveth with k= '+str(hashlist[1])
+ print('Running velveth with k= '+str(hashlist[1]))
hashes.append(hashlist[1])
os.mkdir(str('Dir'+str(hashlist[1])))
os.chdir(str(os.getcwd()+'/Dir'+str(hashlist[1])))
os.system(str(velvDir+'/velveth ./ '+str(hashlist[1])+' '+velvethcall+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(hashlist[1])+' velveth files'
+ print('Running velvetg on k= '+str(hashlist[1])+' velveth files')
if(sum(ptester[4:6])==0):
os.system(vgcallOpt)
elif(sum(ptester[4:6])==2):
@@ -217,12 +217,12 @@ if (BEST == hashlist[0]):
os.system(str('rm -rf Dir'+str(hashlist[1])))
elif (BEST == hashlist[8]):
- print 'Running velveth with k= '+str(hashlist[7])
+ print('Running velveth with k= '+str(hashlist[7]))
hashes.append(hashlist[7])
os.mkdir(str('Dir'+str(hashlist[7])))
os.chdir(str(os.getcwd()+'/Dir'+str(hashlist[7])))
os.system(str(velvDir+'/velveth ./ '+str(hashlist[7])+' '+velvethcall+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(hashlist[7])+' velveth files'
+ print('Running velvetg on k= '+str(hashlist[7])+' velveth files')
if(sum(ptester[4:6])==2):
if(BEST < thresh):
os.system(vgcallOpt)
@@ -245,9 +245,9 @@ else:
hashes.append(HASHDWN)
os.mkdir(str('Dir'+str(HASHUP)))
os.chdir(str(os.getcwd()+'/Dir'+str(HASHUP)))
- print 'Running velveth with k= '+str(HASHUP)
+ print('Running velveth with k= '+str(HASHUP))
os.system(str(velvDir+'/velveth ./ '+str(HASHUP)+' '+velvethcall+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(HASHUP)+' velveth files'
+ print('Running velvetg on k= '+str(HASHUP)+' velveth files')
if(sum(ptester[4:6])==0):
os.system(vgcallOpt)
elif(sum(ptester[4:6])==2):
@@ -262,9 +262,9 @@ else:
os.system(str('rm -rf Dir'+str(HASHUP)))
os.mkdir(str('Dir'+str(HASHDWN)))
os.chdir(str(os.getcwd()+'/Dir'+str(HASHDWN)))
- print 'Running velveth with k= '+str(HASHDWN)
+ print('Running velveth with k= '+str(HASHDWN))
os.system(str(velvDir+'/velveth ./ '+str(HASHDWN)+' '+velvethcall+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(HASHDWN)+' velveth files'
+ print('Running velvetg on k= '+str(HASHDWN)+' velveth files')
if(sum(ptester[4:6])==0):
os.system(vgcallOpt)
elif(sum(ptester[4:6])==2):
@@ -280,18 +280,18 @@ else:
## Assemble unused reads
os.chdir(str(parDir+'/FinalDir/UU'))
-print '\nConducting assembly of Unused reads from exploratory assemblies'
-print 'Running velveth with k= '+str(hashlist[4])
+print('\nConducting assembly of Unused reads from exploratory assemblies')
+print('Running velveth with k= '+str(hashlist[4]))
os.system(str(velvDir+'/velveth ./ '+str(hashlist[4])+'-fasta -short '+''.join(unu)+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
-print 'Running velvetg on k= '+str(hashlist[4])+' velveth files'
+print('Running velvetg on k= '+str(hashlist[4])+' velveth files')
os.system(str(velvDir+'/velvetg ./ >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
os.system(str('mv contigs.fa '+parDir+'/FinalDir/UnusedOut.fa'))
os.system(str('mv Log '+parDir+'/FinalDir/LogUU'))
os.chdir('..')
os.system('rm -rf UU')
-print str('==============================================')
-print str('Step 3: Summary Assemblies \n')
+print(str('=============================================='))
+print(str('Step 3: Summary Assemblies \n'))
## Do first round of summary assemblies
sumhashes = [hashlist[2],hashlist[4],hashlist[6]]
contigsSum = []
@@ -302,14 +302,14 @@ for i in range(3):
for j in range(len(contigs)):
files = str(files+parDir+'/FinalDir/'+contigs[j]+' ')
files = str(files+parDir+'/FinalDir/UnusedOut.fa')
- print 'Running velveth with k= '+str(sumhashes[i])
+ print('Running velveth with k= '+str(sumhashes[i]))
if(increads==str('n')):
os.system(str(velvDir+'/velveth ./ '+str(sumhashes[i])+' -fasta -long '+files+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(sumhashes[i])+' velveth files'
+ print('Running velvetg on k= '+str(sumhashes[i])+' velveth files')
os.system(str(velvDir+'/velvetg ./ >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
elif(increads==str('y')):
os.system(str(velvDir+'/velveth ./ '+str(sumhashes[i])+' -fasta -long '+files+' '+velvethcall+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(sumhashes[i])+' velveth files'
+ print('Running velvetg on k= '+str(sumhashes[i])+' velveth files')
if(sum(ptester[6:8])<2):
os.system(str(velvDir+'/velvetg ./ >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
elif(sum(ptester[6:8])==2):
@@ -322,15 +322,15 @@ for i in range(3):
## Do final summary assembly
os.chdir(str(parDir+'/FinalDir'))
-print '\nConducting final summary assembly'
-print 'Running velveth with k= '+str(hashlist[4])
+print('\nConducting final summary assembly')
+print('Running velveth with k= '+str(hashlist[4]))
if(increads==str('n')):
os.system(str(velvDir+'/velveth ./ '+str(hashlist[4])+' -fasta -long '+' '.join(contigsSum)+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(hashlist[4])+' velveth files'
+ print('Running velvetg on k= '+str(hashlist[4])+' velveth files')
os.system(str(velvDir+'/velvetg ./ >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
elif(increads==str('y')):
os.system(str(velvDir+'/velveth ./ '+str(hashlist[4])+' -fasta -long '+' '.join(contigsSum)+' '+velvethcall+' >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
- print 'Running velvetg on k= '+str(hashlist[4])+' velveth files'
+ print('Running velvetg on k= '+str(hashlist[4])+' velveth files')
if(sum(ptester[6:8])<2):
os.system(str(velvDir+'/velvetg ./ >> '+parDir+'/FinalDir/GrandVelvetLog.txt'))
elif(sum(ptester[6:8])==2):
@@ -342,14 +342,14 @@ os.system('mv Log LogSumFinal')
os.chdir('..')
os.system('rm -rf SceneOfTheCrime')
-print str('============================================== \n')
-print 'Assembly Assembler Job Complete \n'
+print(str('============================================== \n'))
+print('Assembly Assembler Job Complete \n')
input = open(str(parDir+'/FinalDir/LogSumFinal'),'r')
for i in input:
i = i.split(' ')
if (i[0] == 'Final'):
- print ' '.join(i)
+ print(' '.join(i))
input.close()
--- a/contrib/shuffleSequences_fasta/shuffleSequences_fasta.py
+++ b/contrib/shuffleSequences_fasta/shuffleSequences_fasta.py
@@ -3,8 +3,8 @@ import sys
from Bio import SeqIO
def interleave(iter1, iter2) :
while True :
- yield iter1.next()
- yield iter2.next()
+ yield next(iter1)
+ yield next(iter2)
f1, f2 = open(sys.argv[1]), open(sys.argv[2])
outfile = open(sys.argv[3], 'w')
format = 'fasta' #or "fastq" or ...
......@@ -4,3 +4,4 @@ fix-perl-path.patch
0001-isCreateBinary-should-not-be-inline.patch
hardening.patch
spelling.patch
2to3.patch
#!/bin/sh -e
pkg=velvet
if [ "$ADTTMP" = "" ] ; then
ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $ADTTMP
cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
cd $AUTOPKGTEST_TMP
cp -a /usr/share/doc/${pkg}/tests/* $AUTOPKGTEST_TMP
gunzip [RS]*.gz
chmod +x run-tests*
./run-tests.sh
# rm -f $ADTTMP/*
# rm -f $AUTOPKGTEST_TMP/*
Contact: Daniel Zerbino <zerbino@ebi.ac.uk>
Name: Velvet
Reference:
- Author: Zerbino, Daniel R. and Birney, Ewan
Title: >
......@@ -23,3 +21,4 @@ Registry:
- Name: conda:bioconda
Entry: velvet
Repository: http://github.com/dzerbino/velvet
Repository-Browse: https://github.com/dzerbino/velvet