Mercurial > repos > pjbriggs > amplicon_analysis_pipeline
changeset 2:a898ee628343 draft
Updated to version 1.2.1.0
author | pjbriggs |
---|---|
date | Wed, 25 Apr 2018 03:45:37 -0400 |
parents | a00f366adc45 |
children | b9e2b3dd392d |
files | README.rst amplicon_analysis_pipeline.py amplicon_analysis_pipeline.xml install_tool_deps.sh |
diffstat | 4 files changed, 76 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/README.rst Thu Nov 09 10:09:33 2017 -0500 +++ b/README.rst Wed Apr 25 03:45:37 2018 -0400 @@ -218,6 +218,9 @@ ========== ====================================================================== Version Changes ---------- ---------------------------------------------------------------------- +1.2.1.0 Updated to Amplicon_Analysis_Pipeline version 1.2.1 (adds + option to use the Human Oral Microbiome Database v15.1, and + updates SILVA database to v123) 1.1.0 First official version on Galaxy toolshed. 1.0.6 Expand inline documentation to provide detailed usage guidance. 1.0.5 Updates including:
--- a/amplicon_analysis_pipeline.py Thu Nov 09 10:09:33 2017 -0500 +++ b/amplicon_analysis_pipeline.py Wed Apr 25 03:45:37 2018 -0400 @@ -120,6 +120,7 @@ type=str.lower, default="vsearch") p.add_argument("-S",dest="use_silva",action="store_true") + p.add_argument("-H",dest="use_homd",action="store_true") p.add_argument("-r",dest="reference_data_path") p.add_argument("-c",dest="categories_file") args = p.parse_args() @@ -150,6 +151,14 @@ final_name.write("%s\n" % '\t'.join((r2,sample_name))) sample_names.append(sample_name) + # Reference database + if args.use_silva: + ref_database = "silva" + elif args.use_homd: + ref_database = "homd" + else: + ref_database = "gg" + # Construct the pipeline command print "Amplicon analysis: constructing pipeline command" pipeline = PipelineCmd("Amplicon_analysis_pipeline.sh") @@ -168,8 +177,10 @@ if args.reference_data_path: pipeline.add_args("-r",args.reference_data_path) pipeline.add_args("-P",args.pipeline) - if args.use_silva: + if ref_database == "silva": pipeline.add_args("-S") + elif ref_database == "homd": + pipeline.add_args("-H") # Echo the pipeline command to stdout print "Running %s" % pipeline @@ -190,6 +201,7 @@ except Exception as ex: # Some other problem sys.stderr.write("Unexpected error: %s\n" % str(ex)) + exit_code = 1 # Write out the list of outputs outputs_file = "Pipeline_outputs.txt" @@ -298,8 +310,7 @@ boxplots_dir = os.path.abspath( os.path.join("RESULTS", "%s_%s" % (args.pipeline.title(), - ("gg" if not args.use_silva - else "silva")), + ref_database), "Alpha_diversity", "Alpha_diversity_boxplot", "Categories_shannon"))
--- a/amplicon_analysis_pipeline.xml Thu Nov 09 10:09:33 2017 -0500 +++ b/amplicon_analysis_pipeline.xml Wed Apr 25 03:45:37 2018 -0400 @@ -1,7 +1,7 @@ -<tool id="amplicon_analysis_pipeline" name="Amplicon Analysis Pipeline" version="1.0.6"> +<tool id="amplicon_analysis_pipeline" name="Amplicon Analysis Pipeline" version="1.2.1.0"> <description>analyse 16S rRNA data from Illumina Miseq paired-end reads</description> <requirements> - <requirement type="package" version="1.1">amplicon_analysis_pipeline</requirement> + <requirement type="package" version="1.2.1">amplicon_analysis_pipeline</requirement> <requirement type="package" version="1.11">cutadapt</requirement> <requirement type="package" version="1.33">sickle</requirement> <requirement type="package" version="27-08-2013">bioawk</requirement> @@ -22,10 +22,12 @@ </stdio> <command><![CDATA[ ## Set the reference database name - #if $reference_database == "" + #if $reference_database == "-S" + #set reference_database_name = "silva" + #else if $reference_database == "-H" + #set reference_database_name = "homd" + #else #set reference_database_name = "gg" - #else - #set reference_database_name = "silva" #end if ## Run the amplicon analysis pipeline wrapper @@ -52,7 +54,7 @@ -P $pipeline -r \$AMPLICON_ANALYSIS_REF_DATA_PATH #if str( $reference_database ) != "" - "${reference_database}" + ${reference_database} #end if #if str($categories_file_in) != 'None' -c "${categories_file_in}" @@ -186,6 +188,7 @@ label="Reference database"> <option value="" selected="true">GreenGenes</option> <option value="-S">Silva</option> + <option value="-H">Human Oral Microbiome Database (HOMD)</option> </param> </inputs> <outputs>
--- a/install_tool_deps.sh Thu Nov 09 10:09:33 2017 -0500 +++ b/install_tool_deps.sh Wed Apr 25 03:45:37 2018 -0400 @@ -35,6 +35,9 @@ rm -rf $wd/* rmdir $wd } +function install_amplicon_analysis_pipeline_1_2_1() { + install_amplicon_analysis_pipeline $1 1.2.1 +} function install_amplicon_analysis_pipeline_1_1() { install_amplicon_analysis_pipeline $1 1.1 } @@ -335,6 +338,9 @@ export ATLAS_ROOT_PATH=$INSTALL_DIR export LD_LIBRARY_PATH=$INSTALL_DIR/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$INSTALL_DIR/lib/atlas:$LD_LIBRARY_PATH + # Make installation directories + mkdir -p $INSTALL_DIR/bin + mkdir -p $INSTALL_DIR/lib/python2.7/site-packages # Numpy 1.7.1 local wd=$(mktemp -d) echo Moving to $wd @@ -357,13 +363,49 @@ popd rm -rf $wd/* rmdir $wd - # Python packages - ##install_python_package $INSTALL_DIR numpy 1.7.1 \ - ## https://pypi.python.org/packages/84/fb/5e9dfeeb5d8909d659e6892c97c9aa66d3798fad50e1d3d66b3c614a9c35/numpy-1.7.1.tar.gz \ - ## numpy-1.7.1 - install_python_package $INSTALL_DIR matplotlib 1.3.1 \ - https://pypi.python.org/packages/d4/d0/17f17792a4d50994397052220dbe3ac9850ecbde0297b7572933fa4a5c98/matplotlib-1.3.1.tar.gz \ - matplotlib-1.3.1 + # Setuptools 36.4.0 + install_python_package $INSTALL_DIR setuptools 38.2.4 \ + https://github.com/pypa/setuptools/archive/v38.2.4.tar.gz \ + setuptools-38.2.4 + # Distribute 0.6.28 + ##local wd=$(mktemp -d) + ##echo Moving to $wd + ##pushd $wd + ##wget -q https://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz + ##tar -zxvf distribute-0.6.28.tar.gz + ##cd distribute-0.6.28 + ##sed -i 's,index_url="http://pypi.python.org/simple",index_url="https://pypi.python.org/simple",g' setuptools/package_index.py + ##sed -i 's,"http://pypi.python.org/simple","https://pypi.python.org/simple",g' setuptools/command/easy_install.py + ##/bin/bash <<EOF +##export PYTHONPATH=$INSTALL_DIR:$PYTHONPATH && \ +##export PYTHONPATH=$INSTALL_DIR/lib/python2.7/site-packages:$PYTHONPATH && \ +##python setup.py install --prefix=$INSTALL_DIR --install-scripts=$INSTALL_DIR/bin --install-lib=$INSTALL_DIR/lib/python2.7/site-packages +##EOF + ##python setup.py install --install-lib $INSTALL_DIR/lib/python2.7 --install-scripts $INSTALL_DIR/bin + ##popd + ##rm -rf $wd/* + ##rmdir $wd + # Matplotlib 1.3.1 + local wd=$(mktemp -d) + echo Moving to $wd + pushd $wd + wget -q https://pypi.python.org/packages/d4/d0/17f17792a4d50994397052220dbe3ac9850ecbde0297b7572933fa4a5c98/matplotlib-1.3.1.tar.gz + tar -zxvf matplotlib-1.3.1.tar.gz + cd matplotlib-1.3.1 + sed -i 's,http://pypi.python.org/packages/source/d/distribute/,https://pypi.python.org/packages/source/d/distribute/,g' distribute_setup.py + /bin/bash <<EOF +export PYTHONPATH=$INSTALL_DIR:$PYTHONPATH && \ +export PYTHONPATH=$INSTALL_DIR/lib/python2.7/site-packages:$PYTHONPATH && \ +python setup.py install --prefix=$INSTALL_DIR --install-scripts=$INSTALL_DIR/bin --install-lib=$INSTALL_DIR/lib/python2.7/site-packages +EOF + ##python setup.py install --install-lib $INSTALL_DIR/lib/python2.7 --install-scripts $INSTALL_DIR/bin + popd + rm -rf $wd/* + rmdir $wd + # Remaining Python packages + ##install_python_package $INSTALL_DIR matplotlib 1.3.1 \ + ##https://pypi.python.org/packages/d4/d0/17f17792a4d50994397052220dbe3ac9850ecbde0297b7572933fa4a5c98/matplotlib-1.3.1.tar.gz \ + ##matplotlib-1.3.1 install_python_package $INSTALL_DIR qiime 1.8.0 \ https://github.com/biocore/qiime/archive/1.8.0.tar.gz \ qiime-1.8.0 @@ -686,7 +728,7 @@ mkdir -p $TOP_DIR fi # Install dependencies -install_amplicon_analysis_pipeline_1_1 $TOP_DIR +install_amplicon_analysis_pipeline_1_2_1 $TOP_DIR install_cutadapt_1_11 $TOP_DIR install_sickle_1_33 $TOP_DIR install_bioawk_27_08_2013 $TOP_DIR