Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
fescudie committed Apr 22, 2016
2 parents ba08192 + e130d41 commit 3c1865e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
3 changes: 3 additions & 0 deletions RELEASES_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ This section contain actions to execute if you update a previous FROGS version t
</section>
...

### Bugs fixes:
* Preprocess: missing values in lengths distribution graph.


# v1.2.0 [2016-04-06]
### Update notes:
Expand Down
2 changes: 1 addition & 1 deletion assessment/bin/assessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def frogs_affiliation(fasta_databank, in_biom, in_fasta, output_biom, nb_cpus):
group_output.add_argument( '--output-directory', required=True, help='Path to the output directory.' )
args = parser.parse_args()

if "mothur" in args.pipelines and (args.mothur_databank is None or args.mothur_taxonomy):
if "mothur" in args.pipelines and (args.mothur_databank is None or args.mothur_taxonomy is None):
raise Exception("'--mothur-databank' and '--mothur-taxonomy' must be provided to use the mothur pipeline.")

primers_param = {
Expand Down
41 changes: 25 additions & 16 deletions assessment/bin/mothur.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
__author__ = 'Plateforme bioinformatique Toulouse'
__copyright__ = 'Copyright (C) 2016 INRA'
__license__ = 'GNU General Public License'
__version__ = '1.1.0'
__version__ = '1.2.0'
__email__ = '[email protected]'
__status__ = 'beta'

import os
import sys
import time
import argparse
import subprocess
Expand Down Expand Up @@ -253,12 +252,22 @@ def exec_cmd( cmd, output=None ):
+ 'dereplicate=t, ' \
+ 'processors=' + str(args.nb_cpus) + ')"' )
# Outputs:
# stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.count_table
# stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.chimeras
# stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.accnos
# stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.count_table
# stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.chimeras
# stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.accnos
if os.path.exists("stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.accnos"): # mothur version < 1.35.0
exec_cmd( 'ln -sf ' \
+ 'stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.count_table ' \
+ 'stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.count_table' )
exec_cmd( 'ln -sf ' \
+ 'stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.chimeras ' \
+ 'stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.chimeras' )
exec_cmd( 'ln -sf ' \
+ 'stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.accnos ' \
+ 'stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.accnos' )
exec_cmd( 'mothur "#remove.seqs(' \
+ 'fasta=stability.trim.contigs.good.unique.good.filter.unique.precluster.fasta, ' \
+ 'accnos=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.accnos)"' )
+ 'accnos=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.accnos)"' )
# Outputs:
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.fasta

Expand All @@ -268,7 +277,7 @@ def exec_cmd( cmd, output=None ):
classif_lineage_time = time.time()
exec_cmd( 'mothur "#classify.seqs(' \
+ 'fasta=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.fasta, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.count_table, ' \
+ 'reference=restriction_db.fasta, ' \
+ 'taxonomy=restriction_db.tax, ' \
+ 'cutoff=' + str(args.affi_cutoff) + ')"' )################################### + 'processors=' + str(args.nb_cpus) + ')"'
Expand All @@ -278,13 +287,13 @@ def exec_cmd( cmd, output=None ):
classif_lineage_time = time.time() - classif_lineage_time
exec_cmd( 'mothur "#remove.lineage(' \
+ 'fasta=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.fasta, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.count_table, ' \
+ 'taxonomy=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.restriction_db.wang.taxonomy, ' \
+ 'taxon=Chloroplast-Mitochondria-unknown-Archaea-Eukaryota)"' )
# Outputs:
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.restriction_db.wang.pick.taxonomy
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.fasta
# stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count_table
# stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.pick.count_table


#### Clustering
Expand All @@ -296,7 +305,7 @@ def exec_cmd( cmd, output=None ):
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.dist
exec_cmd( 'mothur "#cluster(' \
+ 'column=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.dist, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count_table)"' )
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.pick.count_table)"' )
# Outputs:
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.list

Expand All @@ -305,7 +314,7 @@ def exec_cmd( cmd, output=None ):
#### BIOM
exec_cmd( 'mothur "#make.shared(' \
+ 'list=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.list, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.pick.count_table, ' \
+ 'label=' + str(args.otu_distance) + ')"' )
# Outputs:
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.shared
Expand All @@ -319,7 +328,7 @@ def exec_cmd( cmd, output=None ):

exec_cmd( 'mothur "#get.oturep(' \
+ 'method=abundance, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.pick.count_table, ' \
+ 'list=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.list, ' \
+ 'fasta=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.fasta, ' \
+ 'cutoff=' + str(args.otu_distance) + ')"' )
Expand All @@ -345,7 +354,7 @@ def exec_cmd( cmd, output=None ):
#### Affiliation
exec_cmd( 'mothur "#classify.seqs(' \
+ 'fasta=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.fasta, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.count_table, ' \
+ 'reference=affiliation_db.fasta, ' \
+ 'taxonomy=affiliation_db.tax, ' \
+ 'cutoff=0)"' )################################### + 'processors=' + str(args.nb_cpus) + ')"'
Expand All @@ -354,7 +363,7 @@ def exec_cmd( cmd, output=None ):
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.affiliation_db.wang.tax.summary
exec_cmd( 'mothur "#classify.otu('
+ 'list=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.list, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.pick.count_table, ' \
+ 'taxonomy=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.affiliation_db.wang.taxonomy, ' \
+ 'label=' + str(args.otu_distance) + ')"' )
# Outputs:
Expand All @@ -365,7 +374,7 @@ def exec_cmd( cmd, output=None ):
#### BIOM
exec_cmd( 'mothur "#make.shared(' \
+ 'list=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.list, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.pick.count_table, ' \
+ 'label=' + str(args.otu_distance) + ')"' )
# Outputs:
# stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.shared
Expand All @@ -380,7 +389,7 @@ def exec_cmd( cmd, output=None ):

exec_cmd( 'mothur "#get.oturep(' \
+ 'method=abundance, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count_table, ' \
+ 'count=stability.trim.contigs.good.unique.good.filter.unique.precluster.denovo.uchime.pick.pick.count_table, ' \
+ 'list=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique_list.list, ' \
+ 'fasta=stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.fasta, ' \
+ 'cutoff=' + str(args.otu_distance) + ')"' )
Expand Down

0 comments on commit 3c1865e

Please sign in to comment.