diff --git a/src/pear/config.vsh.yaml b/src/pear/config.vsh.yaml index 6a9524e4..996f080e 100644 --- a/src/pear/config.vsh.yaml +++ b/src/pear/config.vsh.yaml @@ -10,7 +10,7 @@ functionality: repository: https://github.com/tseemann/PEAR documentation: https://cme.h-its.org/exelixis/web/software/pear/doc.html reference: doi:10.1093/bioinformatics/btt593 - licence: "['Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported']" + licence: "CC-BY-NC-SA-3.0" requirements: commands: [ pear , gzip ] argument_groups: @@ -161,5 +161,6 @@ platforms: setup: - type: docker run: | - pear -h | grep 'PEAR v' | sed 's/PEAR v//' | sed 's/ .*//' > /var/software_versions.txt + version=$(pear -h | grep 'PEAR v' | sed 's/PEAR v//' | sed 's/ .*//') && \ + echo "pear: $version" > /var/software_versions.txt - type: nextflow \ No newline at end of file diff --git a/src/pear/script.sh b/src/pear/script.sh index 21b4ac8c..c2bf0b83 100644 --- a/src/pear/script.sh +++ b/src/pear/script.sh @@ -1,7 +1,7 @@ #!/bin/bash ## VIASH START -## VIASh END +## VIASH END [[ "$par_emperical_freqs" == "false" ]] && unset par_emperical_freqs [[ "$par_nbase" == "false" ]] && unset par_nbase @@ -15,12 +15,12 @@ if [[ "${par_reverse_fastq##*.}" == "gz" ]]; then par_reverse_fastq=${par_reverse_fastq%.*} fi -par_output="pear_output" +output_dir=$(mktemp -d -p "$meta_temp_dir" "pear.XXXXXX") pear \ -f "$par_forward_fastq" \ -r "$par_reverse_fastq" \ - -o "$par_output" \ + -o "$output_dir" \ ${par_p_value:+-p "${par_p_value}"} \ ${par_min_overlap:+-v "${par_min_overlap}"} \ ${par_max_assembly_length:+-m "${par_max_assembly_length}"} \ @@ -39,25 +39,25 @@ pear \ if [[ "${par_assembled##*.}" == "gz" ]]; then - gzip -9 -c ${par_output}.assembled.fastq > ${par_assembled} + gzip -9 -c ${output_dir}.assembled.fastq > ${par_assembled} else - mv ${par_output}.assembled.fastq ${par_assembled} + mv ${output_dir}.assembled.fastq ${par_assembled} fi if [[ "${par_unassembled_forward##*.}" == "gz" ]]; then - gzip -9 -c ${par_output}.unassembled.forward.fastq > ${par_unassembled_forward} + gzip -9 -c ${output_dir}.unassembled.forward.fastq > ${par_unassembled_forward} else - mv ${par_output}.unassembled.forward.fastq ${par_unassembled_forward} + mv ${output_dir}.unassembled.forward.fastq ${par_unassembled_forward} fi if [[ "${par_unassembled_reverse##*.}" == "gz" ]]; then - gzip -9 -c ${par_output}.unassembled.reverse.fastq > ${par_unassembled_reverse} + gzip -9 -c ${output_dir}.unassembled.reverse.fastq > ${par_unassembled_reverse} else - mv ${par_output}.unassembled.reverse.fastq ${par_unassembled_reverse} + mv ${output_dir}.unassembled.reverse.fastq ${par_unassembled_reverse} fi if [[ "${par_discarded##*.}" == "gz" ]]; then - gzip -9 -c ${par_output}.discarded.fastq > ${par_discarded} + gzip -9 -c ${output_dir}.discarded.fastq > ${par_discarded} else - mv ${par_output}.discarded.fastq ${par_discarded} + mv ${output_dir}.discarded.fastq ${par_discarded} fi