From 2e088155bb29d7aa327b84719f7cf7a99203316b Mon Sep 17 00:00:00 2001 From: Kevin Hsieh Date: Wed, 28 Nov 2018 10:30:08 -0800 Subject: [PATCH] Re-enable metaphlan --- README.md | 2 +- install.sh | 19 ++++++------------- rop.sh | 8 ++++---- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1458b6c..54abf01 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ of the pipeline. The following options are available: - A comma-separated list of one or more of the following: lowq, rdna, reference, repeats, circrna, immune, microbiome (which may be subdivided into metaphlan, bacteria, viral, fungi, protozoa). - - circrna, metaphlan, and bacteria are not available in the current release. + - circrna and bacteria are not available in the current release. - `-s all` selects everything. - `-a|--fasta`: Input unmapped reads in .fasta format instead of .fastq format. Forcibly disables low-quality read filtering. diff --git a/install.sh b/install.sh index fa1d121..4144218 100755 --- a/install.sh +++ b/install.sh @@ -182,13 +182,13 @@ else cd .. # Download MetaPhlAn 2. - #echo '----- Downloading MetaPhlAn 2 --------------------------------------------------' - #hg clone https://bitbucket.org/biobakery/metaphlan2 - #cd metaphlan2 + echo '----- Downloading MetaPhlAn 2 --------------------------------------------------' + hg clone https://bitbucket.org/biobakery/metaphlan2 + cd metaphlan2 #ln -s ../../db_human/databases - #cd .. + cd .. - # Download MiniConda and add shebangs. + # Download MiniConda. echo '----- Setting up Python environment --------------------------------------------' if [ $NATIVE = false ]; then ./install-MiniConda.sh @@ -196,13 +196,6 @@ else ln -s libncursesw.so.5 libtinfow.so.5 cd ../.. MiniConda="$PWD/MiniConda/bin/python" - # sed -i "1c #!$MiniConda" metaphlan2/metaphlan2.py - # sed -i "1c #!$MiniConda" metaphlan2/strainphlan.py - # sed -i "1c #!$MiniConda" metaphlan2/utils/read_fastx.py - #else - # sed -i '1c #!/usr/bin/env python2.7' metaphlan2/metaphlan2.py - # sed -i '1c #!/usr/bin/env python2.7' metaphlan2/strainphlan.py - # sed -i '1c #!/usr/bin/env python2.7' metaphlan2/utils/read_fastx.py fi fi @@ -260,7 +253,7 @@ for database in $SELECT_DB; do download_list+=$'\nmetaphlan\nviral\nviral_vipr\nfungi\nprotozoa' ;; metaphlan) - #download_list+=$'\nmetaphlan' + download_list+=$'\nmetaphlan' ;; viral) download_list+=$'\nviral\nviral_vipr' diff --git a/rop.sh b/rop.sh index 3adbadd..432c82a 100755 --- a/rop.sh +++ b/rop.sh @@ -45,9 +45,9 @@ eval set -- "$PARSED" # Set default options. ORGANISM='human' -STEPS='rdna reference repeats viral fungi protozoa' +STEPS='rdna reference repeats immune metaphlan viral fungi protozoa' # Non-default: lowq - # Disabled: circrna immune metaphlan bacteria + # Disabled: circrna bacteria FASTA=false BAM=false GZIP=false @@ -553,8 +553,8 @@ echo '7a. MetaPhlAn profiling (-s metaphlan)...' cd "${DIRS['07a_metaphlan']}" # No post file (don't reduce unmapped reads using MetaPhlAn results). -if ! grep -qE 'metaphlan|microbiome' <<<"$STEPS" || ! reads_present "$current" \ - || ! grep -q 'override' <<<"$STEPS"; then # Disabled (broken). +if ! grep -qE 'metaphlan|microbiome' <<<"$STEPS" || ! reads_present "$current"; +then echo '--> Skipped MetaPhlAn profiling.' else python "$DIR/tools/metaphlan2/metaphlan2.py" "$current" \