-
Notifications
You must be signed in to change notification settings - Fork 86
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
16 changed files
with
68 additions
and
48 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
'Nicola Segata ([email protected]), ' | ||
'Duy Tin Truong, ' | ||
'Francesco Asnicar ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import sys | ||
try: | ||
|
@@ -337,6 +337,8 @@ def read_params(args): | |
help="The number of CPUs to use for parallelizing the mapping [default 4]") | ||
arg('--install', action='store_true', | ||
help="Only checks if the MetaPhlAn DB is installed and installs it if not. All other parameters are ignored.") | ||
arg('--offline', action='store_true', | ||
help="If used, MetaPhlAn will not check for new database updates.") | ||
arg('--force_download', action='store_true', | ||
help="Force the re-download of the latest MetaPhlAn database.") | ||
arg('--read_min_len', type=int, default=70, | ||
|
@@ -952,7 +954,7 @@ def main(): | |
ESTIMATE_UNK = pars['unclassified_estimation'] | ||
|
||
# check if the database is installed, if not then install | ||
pars['index'] = check_and_install_database(pars['index'], pars['bowtie2db'], pars['bowtie2_build'], pars['nproc'], pars['force_download']) | ||
pars['index'] = check_and_install_database(pars['index'], pars['bowtie2db'], pars['bowtie2_build'], pars['nproc'], pars['force_download'], pars['offline']) | ||
|
||
if pars['install']: | ||
sys.stderr.write('The database is installed\n') | ||
|
@@ -1129,7 +1131,7 @@ def main(): | |
if CAMI_OUTPUT: | ||
for clade, taxid, relab in sorted( outpred, reverse=True, | ||
key=lambda x:x[2]+(100.0*(8-(x[0].count("|"))))): | ||
if taxid: | ||
if taxid and clade.split('|')[-1][0] != 't': | ||
rank = ranks2code[clade.split('|')[-1][0]] | ||
leaf_taxid = taxid.split('|')[-1] | ||
taxpathsh = '|'.join([remove_prefix(name) if '_unclassified' not in name else '' for name in clade.split('|')]) | ||
|
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 |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
'Francesco Asnicar ([email protected]), ' | ||
'Moreno Zolfo ([email protected]), ' | ||
'Francesco Beghini ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
|
||
import sys | ||
|
@@ -415,7 +415,7 @@ def sample_markers_to_fasta(sample_path, filtered_samples, tmp_dir, filtered_cla | |
for r in sample: | ||
if r['marker'] in filtered_clade_markers: | ||
marker_name = parse_marker_name(r['marker']) | ||
seq = SeqRecord(Seq(r['sequence'][trim_sequences:-trim_sequences].replace("*","-")), id=marker_name, description=marker_name) | ||
seq = SeqRecord(Seq(r['sequence'][trim_sequences:-trim_sequences].replace("*","-").replace('-','N')), id=marker_name, description=marker_name) | ||
SeqIO.write(seq, marker_fna, 'fasta') | ||
|
||
|
||
|
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/usr/bin/env python | ||
__author__ = ('Duy Tin Truong ([email protected]), ' | ||
'Aitor Blanco Miguez ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import argparse as ap | ||
import pandas | ||
|
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 |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
'Francesco Asnicar ([email protected]), ' | ||
'Moreno Zolfo ([email protected]), ' | ||
'Francesco Beghini ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import os, sys, re, shutil, tempfile | ||
import subprocess as sb | ||
|
@@ -147,7 +147,7 @@ def execute_phylophlan(samples_markers_dir, conf_file, min_entries, min_markers, | |
" --databases_folder "+tmp_dir+" -t n -f "+conf_file+ | ||
" --diversity low"+accuracy+" --genome_extension fna"+ | ||
" --force_nucleotides --min_num_entries "+str(min_entries)+ | ||
" --min_num_markers "+str(min_markers), | ||
" --convert_N2gap --min_num_markers "+str(min_markers), | ||
"input" : "-i", | ||
"output_path" : "--output_folder", | ||
"output" : "-o", | ||
|
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 |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
'Francesco Asnicar ([email protected]), ' | ||
'Moreno Zolfo ([email protected]), ' | ||
'Francesco Beghini ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import sys | ||
try: | ||
|
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 |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
'Francesco Asnicar ([email protected]), ' | ||
'Moreno Zolfo ([email protected]), ' | ||
'Francesco Beghini ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
try: | ||
from .util_fun import error | ||
|
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
#!/usr/bin/env python | ||
__author__ = ('Duy Tin Truong ([email protected]), ' | ||
'Aitor Blanco Miguez ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import argparse as ap | ||
import dendropy | ||
from io import StringIO | ||
import re | ||
import random | ||
from collections import defaultdict | ||
import matplotlib.colors as colors | ||
import subprocess | ||
|
||
def for_shuffle(): | ||
return 0.1 | ||
|
||
def read_params(): | ||
p = ap.ArgumentParser() | ||
|
@@ -106,7 +109,10 @@ def main(): | |
count += 1 | ||
node.taxon = dendropy.Taxon(label='node_%d'%count) | ||
metadatas = sorted(list(metadatas)) | ||
color_names = list(colors.cnames.keys()) | ||
color_names = list(colors.TABLEAU_COLORS.keys()) | ||
color_names_plus = list(colors.CSS4_COLORS.keys()) | ||
random.shuffle(color_names_plus, for_shuffle) | ||
color_names += color_names_plus | ||
metadata2color = {} | ||
for i, md in enumerate(metadatas): | ||
metadata2color[md] = color_names[i % len(color_names)] | ||
|
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 |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
'Francesco Asnicar ([email protected]), ' | ||
'Moreno Zolfo ([email protected]), ' | ||
'Francesco Beghini ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import sys | ||
try: | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
__author__ = 'Aitor Blanco ([email protected]' | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import os, time, sys | ||
import argparse as ap | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
__author__ = ('Aitor Blanco ([email protected]), ' | ||
'Mireia Valles-Colomer ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
import os, time, sys | ||
import argparse as ap | ||
|
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 |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
'Francesco Asnicar ([email protected]), ' | ||
'Moreno Zolfo ([email protected]), ' | ||
'Francesco Beghini ([email protected])') | ||
__version__ = '4.0.0' | ||
__date__ = '22 Aug 2022' | ||
__version__ = '4.0.1' | ||
__date__ = '24 Aug 2022' | ||
|
||
|
||
import os, sys, re, pickletools, pickle, time, bz2, gzip | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
setuptools.setup( | ||
name='MetaPhlAn', | ||
version='4.0.0', | ||
version='4.0.1', | ||
author='Aitor Blanco-Miguez', | ||
author_email='[email protected]', | ||
url='http://github.com/biobakery/MetaPhlAn/', | ||
|