Skip to content

Commit

Permalink
update with latest review
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiWaldrant committed Jan 31, 2024
1 parent 2f563e6 commit 4991805
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
5 changes: 3 additions & 2 deletions src/pear/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
22 changes: 11 additions & 11 deletions src/pear/script.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}"} \
Expand All @@ -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

0 comments on commit 4991805

Please sign in to comment.