Skip to content
Commits on Source (6)
repo: 092c2fe2278cb7f0b18d81faeb4aab98b89dc096
node: b2f9b3286d4be376805e3b5c26cf141ed375c605
node: cbd7880df400b453b8beb4e62b39e4a23b5523b6
branch: default
tag: 2.7.5
tag: 2.7.6
......@@ -11,3 +11,6 @@ e424931b4d94d50cf62381c79c335935415b33b9 2.5.0
8963e486f79043c79a299f7a684e4550b0115c32 2.7.0
d8ab9ca4244c09a7a4995042a99fbba1e3598ac0 2.7.1
a1fe0d15320c04f69d56f1b7dd31cff972a7b8df 2.7.2
b2f9b3286d4be376805e3b5c26cf141ed375c605 2.7.5
847b250adbe97b9f4adc7e15f0d4bb5a66e782ec 2.7.4
178d1aaf4ac76e5d5477833e8e614104dcd32088 2.7.3
metaphlan2 (2.7.6-1) UNRELEASED; urgency=medium
* New upstream version
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.1.4
* Avoid privacy breach by referencing remote files from README.html
-- Andreas Tille <tille@debian.org> Mon, 28 May 2018 07:27:16 +0200
metaphlan2 (2.7.5-1) unstable; urgency=medium
* New upstream version (no data shiped with this archive any more)
......
......@@ -8,9 +8,9 @@ Build-Depends: debhelper (>= 11~),
dh-python,
pandoc,
bowtie2
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/metaphlan2.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/metaphlan2.git
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/med-team/metaphlan2
Vcs-Git: https://salsa.debian.org/med-team/metaphlan2.git
Homepage: https://bitbucket.org/biobakery/metaphlan2
Package: metaphlan2
......@@ -21,7 +21,8 @@ Depends: ${python:Depends},
python-biom-format,
python-msgpack,
python-pandas,
bowtie2
bowtie2,
libjs-twitter-bootstrap
Description: Metagenomic Phylogenetic Analysis
MetaPhlAn is a computational tool for profiling the composition of
microbial communities (Bacteria, Archaea, Eukaryotes and Viruses) from
......
README.html
debian/images
\ No newline at end of file
#!/bin/sh
# fetch PNG images that are used in README.html and referenced at remote locations
wget https://bitbucket.org/repo/rM969K/images/476974413-tree_alignment.png
wget https://bitbucket.org/repo/rM969K/images/1771497600-snp_distance.png
wget https://bitbucket.org/repo/rM969K/images/1574126761-RAxML_bestTree.s__Bacteroides_caccae.tree.metadata.png
......@@ -7,12 +7,10 @@
override_dh_auto_build:
dh_auto_build
pandoc -s --from markdown --to html README.md > README.html
pandoc -s --from markdown --to html README.md | \
sed -e 's#"[^"]*//cdnjs.cloudflare.com/ajax/libs/html5shiv/.*/html5shiv-printshiv.min.js"#"file:///usr/share/twitter-bootstrap/files/html5shiv/html5shiv-printshiv.min.js"#' \
-e 's#"https://bitbucket.org/repo/r[Mm]969[Kk]/images#"images#' \
> README.html
override_dh_installchangelogs:
dh_installchangelogs changeset.txt
#override_dh_fixperms:
# dh_fixperms
# chmod +x debian/*/usr/share/metaphlan2/strainer_tutorial/*.sh
# chmod -x debian/*/usr/share/metaphlan2/strainer_src/*.ini
debian/images/1574126761-RAxML_bestTree.s__Bacteroides_caccae.tree.metadata.png
debian/images/1771497600-snp_distance.png
debian/images/476974413-tree_alignment.png
......@@ -16,8 +16,8 @@ from __future__ import with_statement
__author__ = ('Nicola Segata (nicola.segata@unitn.it), '
'Duy Tin Truong, '
'Francesco Asnicar (f.asnicar@unitn.it)')
__version__ = '2.7.5'
__date__ = '6 February 2018'
__version__ = '2.7.6'
__date__ = '2 March 2018'
import sys
......@@ -433,7 +433,7 @@ def read_params(args):
"\n------------------------------------------------------------------- \n \n\n"
"\n========== MetaPhlAn 2 strain tracking ============================ \n\n"
"\n========== Marker level analysis ============================ \n\n"
"MetaPhlAn 2 introduces the capability of charachterizing organisms at the strain level using non\n"
"aggregated marker information. Such capability comes with several slightly different flavours and \n"
"are a way to perform strain tracking and comparison across multiple samples.\n"
......@@ -499,18 +499,16 @@ def read_params(args):
arg('--mpa_pkl', type=str, default=None,
help="The metadata pickled MetaPhlAn file [deprecated]")
arg('--bowtie2db', metavar="METAPHLAN_BOWTIE2_DB", type=str, default=None,
arg('--bowtie2db', metavar="METAPHLAN_BOWTIE2_DB", type=str, default=DEFAULT_DB_FOLDER,
help=("The BowTie2 database file of the MetaPhlAn database. Used if "
"--input_type is fastq, fasta, multifasta, or multifastq "
"[deprecated]"))
"--input_type is fastq, fasta, multifasta, or multifastq [default "+DEFAULT_DB_FOLDER+"]\n"))
arg('-x', '--index', type=str, default='v20_m200',
help=("Specify the id of the database version to use. If the database "
"files are not found on the local MetaPhlAn2 installation they "
"will be automatically downloaded"))
help=("Specify the id of the database version to use. If the database\n"
"files are not found on the local MetaPhlAn2 installation they\n"
"will be automatically downloaded\n"))
bt2ps = ['sensitive', 'very-sensitive', 'sensitive-local',
'very-sensitive-local']
bt2ps = ['sensitive', 'very-sensitive', 'sensitive-local', 'very-sensitive-local']
arg('--bt2_ps', metavar="BowTie2 presets", default='very-sensitive',
choices=bt2ps, help="Presets options for BowTie2 (applied only when a "
"multifasta file is provided)\n"
......@@ -812,29 +810,32 @@ def download_unpack_tar(url, download_file_name, folder, bowtie2_build, nproc):
sys.stderr.write("Fatal error running '{}'\nError message: '{}'\n\n".format(' '.join(bt2_cmd), e))
sys.exit(1)
sys.stderr.write('Removing uncompress database {}\n'.format(fna_file))
os.remove(fna_file)
def check_and_install_database(index, bowtie2_build, nproc):
def check_and_install_database(index, bowtie2_db, bowtie2_build, nproc):
""" Check if the database is installed, if not download and install """
if len(glob(os.path.join(DEFAULT_DB_FOLDER, "mpa_{}*".format(index)))) >= 7:
if len(glob(os.path.join(bowtie2_db, "mpa_{}*".format(index)))) >= 7:
return
# download the tar archive and decompress
sys.stderr.write("\nDownloading MetaPhlAn2 database\nPlease note due to "
"the size this might take a few minutes\n")
download_unpack_tar(DATABASE_DOWNLOAD, index, DEFAULT_DB_FOLDER, bowtie2_build, nproc)
download_unpack_tar(DATABASE_DOWNLOAD, index, bowtie2_db, bowtie2_build, nproc)
sys.stderr.write("\nDownload complete\n")
def set_mapping_arguments(index):
def set_mapping_arguments(index, bowtie2_db):
mpa_pkl = 'mpa_pkl'
bowtie2db = 'bowtie2db'
if os.path.isfile(os.path.join(DEFAULT_DB_FOLDER, "mpa_{}.pkl".format(index))):
mpa_pkl = os.path.join(DEFAULT_DB_FOLDER, "mpa_{}.pkl".format(index))
if os.path.isfile(os.path.join(bowtie2_db, "mpa_{}.pkl".format(index))):
mpa_pkl = os.path.join(bowtie2_db, "mpa_{}.pkl".format(index))
if glob(os.path.join(DEFAULT_DB_FOLDER, "mpa_{}*.bt2".format(index))):
bowtie2db = os.path.join(DEFAULT_DB_FOLDER, "mpa_{}".format(index))
if glob(os.path.join(bowtie2_db, "mpa_{}*.bt2".format(index))):
bowtie2db = os.path.join(bowtie2_db, "mpa_{}".format(index))
return (mpa_pkl, bowtie2db)
......@@ -1354,15 +1355,14 @@ def metaphlan2():
pars = read_params(sys.argv)
# check if the database is installed, if not then install
check_and_install_database(pars['index'], pars['bowtie2_build'],
pars['nproc'])
check_and_install_database(pars['index'], pars['bowtie2db'], pars['bowtie2_build'], pars['nproc'])
if pars['install']:
sys.stderr.write('The database is installed\n')
return
# set correct map_pkl and bowtie2db variables
pars['mpa_pkl'], pars['bowtie2db'] = set_mapping_arguments(pars['index'])
pars['mpa_pkl'], pars['bowtie2db'] = set_mapping_arguments(pars['index'], pars['bowtie2db'])
#if pars['inp'] is None and ( pars['input_type'] is None or pars['input_type'] == 'automatic'):
# sys.stderr.write( "The --input_type parameter need top be specified when the "
......@@ -1440,7 +1440,7 @@ def metaphlan2():
for p in ["1.bt2", "2.bt2", "3.bt2", "4.bt2", "rev.1.bt2", "rev.2.bt2"]]):
sys.stderr.write("No MetaPhlAn BowTie2 database found (--index "
"option)!\nExpecting location {}\nExiting..."
.format(DEFAULT_DB_FOLDER))
.format(pars['bowtie2db']))
sys.exit(1)
if bow:
......
......@@ -11,7 +11,7 @@ import copy
import ConfigParser
import dendropy
import numpy
import ipdb
# import ipdb
def read_params():
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -50,6 +50,9 @@ def merge( aaastrIn, astrLabels, iCol, ostm ):
iLine = -1
# For a line in the file
for astrLine in iIn:
if astrLine[0].startswith('#'):
continue
iLine += 1
# ID is from first column, data are everything else
......